diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2012-10-04 23:01:30 -0400 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-10-04 23:01:30 -0400 |
| commit | 578f1ef91aa92beb571bfb9af8f4d18f405f3b9e (patch) | |
| tree | 8ff59e772d09180b7e7f952a8c90a1bcf25e1d19 /drivers/rtc | |
| parent | ecefbd94b834fa32559d854646d777c56749ef1c (diff) | |
| parent | 74d8378159de16a0a1d1975d4778120d263d6000 (diff) | |
Merge tag 'mfd-3.7-1' of git://git.kernel.org/pub/scm/linux/kernel/git/sameo/mfd-2.6
Pull MFD changes from Samuel Ortiz:
"MFD bits for the 3.7 merge window.
As usual we have a few new drivers:
- TI LP8788
- TI OMAP USB TLL
- Maxim MAX8907
- SMSC ECE1099
- Dialog Semiconductor DA9055
- A simpler syscon driver that allow us to get rid of the anatop one.
Drivers are also gradually getting Device Tree and IRQ domain support.
The following drivers got DT support:
- palmas, 88pm860x, tc3589x and twl4030-audio
And those ones now use the IRQ domain APIs:
- 88pm860x, tc3589x, db8500_prcmu
Also some other interesting changes:
- Intel's ICH LPC now supports Lynx Point
- TI's twl4030-audio added a GPO child
- tps6527 enabled its backlight subdevice
- The twl6030 pwm driver moved to the new PWM subsystem
And finally a bunch of cleanup and casual fixes for mc13xxx, 88pm860x,
palmas, ab8500, wm8994, wm5110, max8907 and the tps65xxx family."
Fix up various annoying conflicts: the DT and IRQ domain support came in
twice and was already in 3.6. And then it was apparently rebased.
Guys, DON'T REBASE!
* tag 'mfd-3.7-1' of git://git.kernel.org/pub/scm/linux/kernel/git/sameo/mfd-2.6: (89 commits)
ARM: dts: Enable 88pm860x pmic
mfd: 88pm860x: Move gpadc init into touch
mfd: 88pm860x: Device tree support
mfd: 88pm860x: Use irqdomain
mfd: smsc: Add support for smsc gpio io/keypad driver
backlight: tps65217_bl: Add missing platform_set_drvdata in tps65217_bl_probe
mfd: DA9055 core driver
mfd: tps65910: Add alarm interrupt of TPS65910 RTC to mfd device list
mfd: wm5110: Add register patches for revision B
mfd: wm5110: Disable control interface error report for WM5110 rev B
mfd: max8907: Remove regulator-compatible from DT docs
backlight: Add TPS65217 WLED driver
mfd: Add backlight as subdevice to the tps65217
mfd: Provide the PRCMU with its own IRQ domain
mfd: Fix max8907 sparse warning
mfd: Add lp8788 mfd driver
mfd: dbx500: Provide a more accurate smp_twd clock
mfd: rc5t583: Fix warning messages
regulator: palmas: Add DT support
mfd: palmas: Change regulator defns to better suite DT
...
Diffstat (limited to 'drivers/rtc')
| -rw-r--r-- | drivers/rtc/rtc-88pm860x.c | 43 |
1 files changed, 34 insertions, 9 deletions
diff --git a/drivers/rtc/rtc-88pm860x.c b/drivers/rtc/rtc-88pm860x.c index feddefc42109..de9e854b326a 100644 --- a/drivers/rtc/rtc-88pm860x.c +++ b/drivers/rtc/rtc-88pm860x.c | |||
| @@ -11,6 +11,7 @@ | |||
| 11 | 11 | ||
| 12 | #include <linux/kernel.h> | 12 | #include <linux/kernel.h> |
| 13 | #include <linux/module.h> | 13 | #include <linux/module.h> |
| 14 | #include <linux/of.h> | ||
| 14 | #include <linux/platform_device.h> | 15 | #include <linux/platform_device.h> |
| 15 | #include <linux/slab.h> | 16 | #include <linux/slab.h> |
| 16 | #include <linux/mutex.h> | 17 | #include <linux/mutex.h> |
| @@ -284,6 +285,28 @@ out: | |||
| 284 | } | 285 | } |
| 285 | #endif | 286 | #endif |
| 286 | 287 | ||
| 288 | #ifdef CONFIG_OF | ||
| 289 | static int __devinit pm860x_rtc_dt_init(struct platform_device *pdev, | ||
| 290 | struct pm860x_rtc_info *info) | ||
| 291 | { | ||
| 292 | struct device_node *np = pdev->dev.parent->of_node; | ||
| 293 | int ret; | ||
| 294 | if (!np) | ||
| 295 | return -ENODEV; | ||
| 296 | np = of_find_node_by_name(np, "rtc"); | ||
| 297 | if (!np) { | ||
| 298 | dev_err(&pdev->dev, "failed to find rtc node\n"); | ||
| 299 | return -ENODEV; | ||
| 300 | } | ||
| 301 | ret = of_property_read_u32(np, "marvell,88pm860x-vrtc", &info->vrtc); | ||
| 302 | if (ret) | ||
| 303 | info->vrtc = 0; | ||
| 304 | return 0; | ||
| 305 | } | ||
| 306 | #else | ||
| 307 | #define pm860x_rtc_dt_init(x, y) (-1) | ||
| 308 | #endif | ||
| 309 | |||
| 287 | static int __devinit pm860x_rtc_probe(struct platform_device *pdev) | 310 | static int __devinit pm860x_rtc_probe(struct platform_device *pdev) |
| 288 | { | 311 | { |
| 289 | struct pm860x_chip *chip = dev_get_drvdata(pdev->dev.parent); | 312 | struct pm860x_chip *chip = dev_get_drvdata(pdev->dev.parent); |
| @@ -294,8 +317,6 @@ static int __devinit pm860x_rtc_probe(struct platform_device *pdev) | |||
| 294 | int ret; | 317 | int ret; |
| 295 | 318 | ||
| 296 | pdata = pdev->dev.platform_data; | 319 | pdata = pdev->dev.platform_data; |
| 297 | if (pdata == NULL) | ||
| 298 | dev_warn(&pdev->dev, "No platform data!\n"); | ||
| 299 | 320 | ||
| 300 | info = kzalloc(sizeof(struct pm860x_rtc_info), GFP_KERNEL); | 321 | info = kzalloc(sizeof(struct pm860x_rtc_info), GFP_KERNEL); |
| 301 | if (!info) | 322 | if (!info) |
| @@ -345,9 +366,11 @@ static int __devinit pm860x_rtc_probe(struct platform_device *pdev) | |||
| 345 | } | 366 | } |
| 346 | } | 367 | } |
| 347 | rtc_tm_to_time(&tm, &ticks); | 368 | rtc_tm_to_time(&tm, &ticks); |
| 348 | if (pdata && pdata->sync) { | 369 | if (pm860x_rtc_dt_init(pdev, info)) { |
| 349 | pdata->sync(ticks); | 370 | if (pdata && pdata->sync) { |
| 350 | info->sync = pdata->sync; | 371 | pdata->sync(ticks); |
| 372 | info->sync = pdata->sync; | ||
| 373 | } | ||
| 351 | } | 374 | } |
| 352 | 375 | ||
| 353 | info->rtc_dev = rtc_device_register("88pm860x-rtc", &pdev->dev, | 376 | info->rtc_dev = rtc_device_register("88pm860x-rtc", &pdev->dev, |
| @@ -366,10 +389,12 @@ static int __devinit pm860x_rtc_probe(struct platform_device *pdev) | |||
| 366 | 389 | ||
| 367 | #ifdef VRTC_CALIBRATION | 390 | #ifdef VRTC_CALIBRATION |
| 368 | /* <00> -- 2.7V, <01> -- 2.9V, <10> -- 3.1V, <11> -- 3.3V */ | 391 | /* <00> -- 2.7V, <01> -- 2.9V, <10> -- 3.1V, <11> -- 3.3V */ |
| 369 | if (pdata && pdata->vrtc) | 392 | if (pm860x_rtc_dt_init(pdev, info)) { |
| 370 | info->vrtc = pdata->vrtc & 0x3; | 393 | if (pdata && pdata->vrtc) |
| 371 | else | 394 | info->vrtc = pdata->vrtc & 0x3; |
| 372 | info->vrtc = 1; | 395 | else |
| 396 | info->vrtc = 1; | ||
| 397 | } | ||
| 373 | pm860x_set_bits(info->i2c, PM8607_MEAS_EN2, MEAS2_VRTC, MEAS2_VRTC); | 398 | pm860x_set_bits(info->i2c, PM8607_MEAS_EN2, MEAS2_VRTC, MEAS2_VRTC); |
| 374 | 399 | ||
| 375 | /* calibrate VRTC */ | 400 | /* calibrate VRTC */ |
