summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobby Cai <R63905@freescale.com>2011-04-07 18:04:37 +0800
committerRobby Cai <R63905@freescale.com>2011-04-07 18:08:55 +0800
commitee0a0b7f700e4f65c3debdc95e1c37b71c31bceb (patch)
treee166121a1913592208500cf183e2145997cc3ec5
parent57345414831634f05a53eaea8401c8f3ab004fa5 (diff)
ENGR00141735 MX50 RD3: use platform_device_id to differentiate two pmics
we re-use rtc-mc13892.c, so use platform_device_id to make it clear. Signed-off-by: Robby Cai <R63905@freescale.com>
-rw-r--r--drivers/mxc/pmic/core/pmic_core_spi.c1
-rw-r--r--drivers/rtc/rtc-mc13892.c17
2 files changed, 15 insertions, 3 deletions
diff --git a/drivers/mxc/pmic/core/pmic_core_spi.c b/drivers/mxc/pmic/core/pmic_core_spi.c
index 156c50f0dfc3..70212aec4be5 100644
--- a/drivers/mxc/pmic/core/pmic_core_spi.c
+++ b/drivers/mxc/pmic/core/pmic_core_spi.c
@@ -231,6 +231,7 @@ static int __devinit pmic_probe(struct spi_device *spi)
adc_ldm.name = get_client_device_name(name, "%s_adc");
battery_ldm.name = get_client_device_name(name, "%s_battery");
light_ldm.name = get_client_device_name(name, "%s_light");
+ rtc_ldm.name = get_client_device_name(name, "%s_rtc");
/* Initialize the PMIC event handling */
pmic_event_list_init();
diff --git a/drivers/rtc/rtc-mc13892.c b/drivers/rtc/rtc-mc13892.c
index 8abe1ba02bc0..830fc028270e 100644
--- a/drivers/rtc/rtc-mc13892.c
+++ b/drivers/rtc/rtc-mc13892.c
@@ -1,5 +1,5 @@
/*
- * Copyright 2008-2010 Freescale Semiconductor, Inc. All Rights Reserved.
+ * Copyright 2008-2011 Freescale Semiconductor, Inc. All Rights Reserved.
*/
/*
@@ -197,7 +197,7 @@ static int mxc_rtc_probe(struct platform_device *pdev)
{
struct rtc_drv_data *pdata = NULL;
- printk(KERN_INFO "mc13892 rtc probe start\n");
+ printk(KERN_INFO "pmic rtc probe start\n");
pdata = kzalloc(sizeof(*pdata), GFP_KERNEL);
@@ -216,7 +216,7 @@ static int mxc_rtc_probe(struct platform_device *pdev)
if (IS_ERR(pdata->rtc))
return -1;
- printk(KERN_INFO "mc13892 rtc probe succeed\n");
+ printk(KERN_INFO "pmic rtc probe succeed\n");
return 0;
}
@@ -230,7 +230,18 @@ static int __exit mxc_rtc_remove(struct platform_device *pdev)
return 0;
}
+static const struct platform_device_id rtc_device_id[] = {
+ {
+ .name = "mc13892_rtc",
+ }, {
+ .name = "mc34708_rtc",
+ }, {
+ /* sentinel */
+ }
+};
+
static struct platform_driver mxc_rtc_driver = {
+ .id_table = rtc_device_id,
.driver = {
.name = "pmic_rtc",
},