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/mfd/tps6586x.c | |
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/mfd/tps6586x.c')
-rw-r--r-- | drivers/mfd/tps6586x.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/drivers/mfd/tps6586x.c b/drivers/mfd/tps6586x.c index 345960ca2fd8..467464368773 100644 --- a/drivers/mfd/tps6586x.c +++ b/drivers/mfd/tps6586x.c | |||
@@ -30,6 +30,10 @@ | |||
30 | #include <linux/mfd/core.h> | 30 | #include <linux/mfd/core.h> |
31 | #include <linux/mfd/tps6586x.h> | 31 | #include <linux/mfd/tps6586x.h> |
32 | 32 | ||
33 | #define TPS6586X_SUPPLYENE 0x14 | ||
34 | #define EXITSLREQ_BIT BIT(1) | ||
35 | #define SLEEP_MODE_BIT BIT(3) | ||
36 | |||
33 | /* interrupt control registers */ | 37 | /* interrupt control registers */ |
34 | #define TPS6586X_INT_ACK1 0xb5 | 38 | #define TPS6586X_INT_ACK1 0xb5 |
35 | #define TPS6586X_INT_ACK2 0xb6 | 39 | #define TPS6586X_INT_ACK2 0xb6 |
@@ -422,6 +426,7 @@ static struct tps6586x_platform_data *tps6586x_parse_dt(struct i2c_client *clien | |||
422 | pdata->subdevs = devs; | 426 | pdata->subdevs = devs; |
423 | pdata->gpio_base = -1; | 427 | pdata->gpio_base = -1; |
424 | pdata->irq_base = -1; | 428 | pdata->irq_base = -1; |
429 | pdata->pm_off = of_property_read_bool(np, "ti,system-power-controller"); | ||
425 | 430 | ||
426 | return pdata; | 431 | return pdata; |
427 | } | 432 | } |
@@ -454,6 +459,15 @@ static const struct regmap_config tps6586x_regmap_config = { | |||
454 | .cache_type = REGCACHE_RBTREE, | 459 | .cache_type = REGCACHE_RBTREE, |
455 | }; | 460 | }; |
456 | 461 | ||
462 | static struct device *tps6586x_dev; | ||
463 | static void tps6586x_power_off(void) | ||
464 | { | ||
465 | if (tps6586x_clr_bits(tps6586x_dev, TPS6586X_SUPPLYENE, EXITSLREQ_BIT)) | ||
466 | return; | ||
467 | |||
468 | tps6586x_set_bits(tps6586x_dev, TPS6586X_SUPPLYENE, SLEEP_MODE_BIT); | ||
469 | } | ||
470 | |||
457 | static int __devinit tps6586x_i2c_probe(struct i2c_client *client, | 471 | static int __devinit tps6586x_i2c_probe(struct i2c_client *client, |
458 | const struct i2c_device_id *id) | 472 | const struct i2c_device_id *id) |
459 | { | 473 | { |
@@ -519,6 +533,11 @@ static int __devinit tps6586x_i2c_probe(struct i2c_client *client, | |||
519 | goto err_add_devs; | 533 | goto err_add_devs; |
520 | } | 534 | } |
521 | 535 | ||
536 | if (pdata->pm_off && !pm_power_off) { | ||
537 | tps6586x_dev = &client->dev; | ||
538 | pm_power_off = tps6586x_power_off; | ||
539 | } | ||
540 | |||
522 | return 0; | 541 | return 0; |
523 | 542 | ||
524 | err_add_devs: | 543 | err_add_devs: |