Commit Graph

1483 Commits

Author SHA1 Message Date
Venu Byravarasu b7e537861a mfd: Correct tps65090 cell names
mfd cell names are mistyped as TPS65910 instead of TPS65090.

Signed-off-by: Venu Byravarasu <vbyravarasu@nvidia.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2012-07-25 00:44:48 +02:00
Laxman Dewangan 7a7487cb55 mfd: Remove gpio support from tps6586x core driver
The GPIO functionality of device tps6586x is added through
platform gpio driver and it can be register as the mfd sub
device and hence removing the duplicates code which register
the gpio functionality from core driver.

Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2012-07-25 00:40:11 +02:00
Laxman Dewangan 75edd5af60 mfd: Cache tps6586x register through regmap
To cache the interrupt mask register, use the regmap RB_TREE
cache-ing mechanism in place of implementing it locally.

Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2012-07-25 00:36:53 +02:00
Laxman Dewangan 1176b5be67 mfd: Use regmap for tps6586x register access.
Using regmap apis for accessing the device registers.

Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2012-07-25 00:36:53 +02:00
Laxman Dewangan b6719412dc mfd: Use devm managed resources for tps6586x
Allocate memory for device state using devm_kzalloc()
to simplify accounting and letting the kernel do the
garbage-collection.

Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2012-07-25 00:36:53 +02:00
Peter Ujfalusi 1fc74aef04 mfd: Add support for twl6041
The delta between twl6040 and twl6041 is small, the main difference is in
the number of GPOs (3 on twl6040, 1 on twl6041).

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2012-07-25 00:27:13 +02:00
Richard Zhao 9247135397 mfd: Matches should be NULL when populate anatop child devices
Signed-off-by: Richard Zhao <richard.zhao@freescale.com>
Reviewed-by: Ying-Chun Liu (PaulLiu) <paulliu@debian.org>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2012-07-17 11:17:24 +02:00
Alan Cox 18273c5b46 mfd: Add missing out of memory check for pcf50633
Resolves-bug: https://bugzilla.kernel.org/show_bug.cgi?id=44561
Reported-by: <rucsoftsec@gmail.com>
Cc: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2012-07-16 15:55:41 +02:00
Johan Hovold d02e83cbcc mfd: Add tps65910 32-kHz-crystal-input init
Replace tps65910_misc_init with a dedicated init function for the
32-kHz-crystal input, and make the code more readable.

Signed-off-by: Johan Hovold <jhovold@gmail.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2012-07-16 15:43:15 +02:00
Uwe Kleine-König 8b8495532c mfd: Drop modifying mc13xxx driver's id_table in probe
This was introduced in commit

        876989d (mfd: Add device tree probe support for mc13xxx)

for spi and later while introducing support for i2c copied to the i2c
driver.

Modifying driver details is very strange, for example probing an
mc13892 device (instantiated via dt) removes the driver's ability to
handle (traditionally probed) mc13783 devices in this case.
I'm not aware of any problems that make this hack necessary and if
there were some, they'd have to be fixed in the spi/i2c core, not in
a driver.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Acked-by: Shawn Guo <shawn.guo@linaro.org>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2012-07-16 15:40:17 +02:00
Axel Lin c600040f0d mfd: Remove unneeded io_mutex from struct twl6040
Current code has been converted to use regmap APIs, the io_mutex is not needed.
Thus remove the io_mutex.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2012-07-16 15:27:09 +02:00
Axel Lin 706c96b720 mfd: Remove __devexit annotation for pm80x_deinit
This fixes below section mismatch warning:

  LD      drivers/mfd/built-in.o
WARNING: drivers/mfd/built-in.o(.devinit.text+0x46c): Section mismatch in reference from the function pm800_probe() to the function .devexit.text:pm80x_deinit()
The function __devinit pm800_probe() references
a function __devexit pm80x_deinit().
This is often seen when error handling in the init function
uses functionality in the exit path.
The fix is often to remove the __devexit annotation of
pm80x_deinit() so it may be used outside an exit section.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2012-07-16 15:26:45 +02:00
Axel Lin 46b65a8fe6 mfd: Fix checking return value of 88pm8xx regmap_read()
Check the return value of regmap_read() rather than the read value.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2012-07-16 15:26:37 +02:00
Mark Brown e102befe7a mfd: Initial support for the WM5110
The WM5110 is a highly-integrated low-power audio system for smartphones,
tablets and other portable audio devices. It combines an advanced DSP
feature set with a flexible, high-performance audio hub CODEC.

The support is based on the Arizona core driver.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2012-07-16 15:00:32 +02:00
Mark Brown 9cd9e289dd mfd: Add data tables for the WM5110
The WM5110 is a highly integrated low power audio subsystem for
smartphones, tablets and other portable audio devices. It combines
an advanced DSP feature set with a flexible, high performance audio
hub CODEC.

This patch adds data tables for the WM5110.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2012-07-16 14:59:56 +02:00
Sangbeom Kim 6445b84abf mfd: Add s2mps11 irq driver
This patch support irq handling driver for s2mps11.
As this patch use regmap_irq, s5m8767 and s5m8763 are modified with
regmap_irq.

Signed-off-by: Sangbeom Kim <sbkim73@samsung.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2012-07-16 14:31:59 +02:00
Sangbeom Kim 9b6d134306 mfd: Add samsung s2mps11 mfd support
This patch add Samsung S2MPS11 mfd driver.
The S2MPS11 can support regulators and RTC.

Signed-off-by: Sangbeom Kim <sbkim73@samsung.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2012-07-16 14:30:47 +02:00
Sangbeom Kim 54227bcf20 mfd: Modify samsung mfd header
As Prefix of Samsung pmic changed from s5m to s2m,
To make common mfd driver for s2m and s5m series,
This patch rename header of Samsung mfd and modify mfd driver.

Signed-off-by: Sangbeom Kim <sbkim73@samsung.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2012-07-16 14:28:11 +02:00
Sangbeom Kim 63063bfbff mfd: Modify samsung mfd driver for common api
Previous naming rule of samsung pmic start with s5m prefix.
But It is changed by s2m.
To cover various samsung s2m and s5m series,
This patch modify function and variable name for common usage.

Signed-off-by: Sangbeom Kim <sbkim73@samsung.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2012-07-16 14:26:45 +02:00
Sangbeom Kim 66c9fbb989 mfd: Rename s5m file and directories to samsung
Previously, Samsung PMIC naming rule start with prefix of s5m.
But Naming rule is changed.
From now on, Prefix will be changed to s2m.
So, To support pmic series of s5m and s2m, change mfd file and directory name.

Signed-off-by: Sangbeom Kim <sbkim73@samsung.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2012-07-16 12:57:35 +02:00
Mark Brown 2a51da04fe mfd: Add support for multiple arizona PDM speaker outputs
The registers have stride 2 so we can write the loop properly now.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2012-07-10 11:03:02 +02:00
Axel Lin 78a73e59db mfd: Export pm80x_regmap_config
This fixes below build error when CONFIG_MFD_88PM800=m.

ERROR: "pm80x_regmap_config" [drivers/mfd/88pm800.ko] undefined!
make[1]: *** [__modpost] Error 1
make: *** [modules] Error 2

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2012-07-10 11:01:24 +02:00
Axel Lin 2984fc0093 mfd: Guard max77686_pmic_dt_match with CONFIG_OF
This fixes below build warning if CONFIG_OF is not set.

  CC      drivers/mfd/max77686.o
drivers/mfd/max77686.c:37:42: warning: 'max77686_pmic_dt_match' defined but not used [-Wunused-variable]

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2012-07-10 11:00:37 +02:00
Mark Brown af65a361d5 mfd: Error out if initial arizona boot fails
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2012-07-09 15:16:29 +02:00
Samuel Ortiz 31b3ffbdfb mfd: 88pm80[05] i2c device_id arrays should be NULL terminated
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2012-07-09 15:13:43 +02:00
Yadwinder Singh Brar c1516f840d mfd: Add device tree support for max77686
This patch adds device tree support for mfd driver and adds
Documentation/devicetree/bindings/mfd/max77686.txt.
This patch also intialize max77686 pointer to NULL in max77686_i2c_probe
to silent a compile time warning.

Signed-off-by: Yadwinder Singh Brar <yadi.brar@samsung.com>
Reviwed-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2012-07-09 15:13:42 +02:00
Yadwinder Singh Brar 2b40459b7e mfd: Allow to specify max77686 interrupt through DT or platform file also
Presently driver expects irq_gpio pin in platform data and maps it to irq
itself. But we can also directly specify the interrupt in DT or platform file.

Signed-off-by: Yadwinder Singh Brar <yadi.brar@samsung.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2012-07-09 15:13:42 +02:00
Yadwinder Singh Brar 9bdf9b4ec7 mfd: Apply irq_mask_cur before handling max77686 interrupts
According to TRM, though we mask the interrupts in interrupt-mask register,
interrupt source-register still provide the status of the masked interrupts.
So we should apply irq_mask_cur to read interrupt source-register value before
handling.

Signed-off-by: Yadwinder Singh Brar <yadi.brar@samsung.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2012-07-09 15:13:42 +02:00
Yadwinder Singh Brar 84d70ee78b mfd: Use pmic regmap to read max77686 pmic interrupt register
PMIC's regmap should be used to read pmic interrupt registers.

Signed-off-by: Yadwinder Singh Brar <yadi.brar@samsung.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2012-07-09 15:13:41 +02:00
NeilBrown 17ffba6ad2 mfd: Move twl-core device_init_wakeup to after platform_device_add
device_init_wakeup uses the dev_name() of the device to set the
name of the wakeup_source which appears in
/sys/kernel/debug/wakeup_sources.

For a platform device, that name is not set until platform_device_add
calls dev_set_name.

So the call to device_init_wakeup() must be after the call to
platform_device_add().
Making this change causes correct names to appear in the
wakeup_sources file.

Signed-off-by: NeilBrown <neilb@suse.de>
Acked-by: Rafael J. Wysocki <rjw@sisk.pl>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2012-07-09 15:13:41 +02:00
Qiao Zhou 5500e3964b mfd: Add companion chip in 88pm80x
in hw design, 800 is mainly for pmic control, while 805 for audio.
but there are 3 registers which controls class D speaker property,
and they are defined in 800 i2c client domain. so 805 codec driver
needs to use 800 i2c client to access class D speaker reg for
audio path management. so add this workaround for the purpose to
let 805 access 800 i2c in some scenario.

Signed-off-by: Qiao Zhou <zhouqiao@marvell.com>
Reviewed-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2012-07-09 15:13:31 +02:00
Qiao Zhou 70c6cce040 mfd: Support 88pm80x in 80x driver
88PM800 and 88PM805 are two discrete chips used for power management.
Hardware designer can use them together or only one of them according
to requirement.

88pm80x.c provides common i2c driver handling for both 800 and
805, such as i2c_driver init, regmap init, read/write api etc.

88pm800.c handles specifically for 800, such as chip init, irq
init/handle, mfd device register, including rtc, onkey, regulator(
to be add later) etc. besides that, 800 has three i2c device, one
regular i2c client, two other i2c dummy for gpadc and power purpose.

88pm805.c handles specifically for 805, such as chip init, irq
init/handle, mfd device register, including codec, headset/mic detect
etc.

the i2c operation of both 800 and 805 are via regmap, and 88pm80x-i2c
exported a group of r/w bulk r/w and bits set API for facility.

Signed-off-by: Qiao Zhou <zhouqiao@marvell.com>
Reviewed-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2012-07-09 15:12:51 +02:00
Samuel Ortiz 49003a6892 mfd: Fix Arizona Kconfig entry
The core and irq Arizona parts should be boolean as they depend on non
exported symbols.

This fixes the following build errors:

ERROR: "wm5102_aod" [drivers/mfd/arizona-irq.ko] undefined!
ERROR: "wm5102_irq" [drivers/mfd/arizona-irq.ko] undefined!
ERROR: "irq_set_chip_and_handler_name" [drivers/mfd/arizona-irq.ko]  undefined!
ERROR: "wm5102_patch" [drivers/mfd/arizona-core.ko] undefined!
ERROR: "arizona_irq_init" [drivers/mfd/arizona-core.ko] undefined!
ERROR: "arizona_irq_exit" [drivers/mfd/arizona-core.ko] undefined!

Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2012-07-09 12:43:05 +02:00
Mark Brown c6a5d9ff6f mfd: Mark headphone detect readback wm5102 register volatile
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2012-07-09 00:46:29 +02:00
Mark Brown 3a36a0db5b mfd: Don't free unallocated arizona supplies on error
ARRAY_SIZE() may be larger than the number of supplies actually used.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2012-07-09 00:45:53 +02:00
Mark Brown 863df8d5f1 mfd: Add missing WM5102 ifdefs
References to the WM5102 tables need to be guarded.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2012-07-09 00:39:07 +02:00
Mark Brown cfe775ce62 mfd: Treat arizona register read errors as non-fatal during resume
We're testing for a specific value and while SPI does not detect I/O
errors I2C can.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2012-07-09 00:39:07 +02:00
Mark Brown 5879f5710e mfd: Release arizona DCVDD if we fail to resume the device
Ensures we don't leak the enable we just did.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2012-07-09 00:39:06 +02:00
Mark Brown 1a2017b714 mfd: Also restore wm8994 GPIO IRQ masks after reset
This ensures that if we are using a GPIO as a wake source it continues to
function while we're suspended.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2012-07-09 00:33:29 +02:00
Mark Brown ed393dcd41 mfd: Use regcache_sync_region() to sync wm8994 GPIO registers on suspend
Now we have regcache sync region we can use it to do a more efficient
sync of the pin configuration after we reset the device during suspend.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2012-07-09 00:33:04 +02:00
Mark Brown 59db96913c mfd: Move arizona digital core supply management to the regulator API
Rather than open coding the enable GPIO control in the MFD core use the
API to push the management on to the regulator driver. The immediate
advantage is slight for most systems but this will in future allow device
configurations where an external regulator is used for DCVDD.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2012-07-09 00:31:36 +02:00
Mark Brown 14b5bd5cf5 mfd: Force on REGMAP for the arizona core
While the core isn't useful by itself it does depend on regmap so try to
force that on.

Reported-by: MyungJoo Ham <myungjoo.ham@samsung.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2012-07-09 00:31:06 +02:00
Samuel Ortiz 0620de5983 mfd: Initial support for Wolfson Arizona platform and WM5102 devices
The Wolfson Arizona platform is used to provide common register
 interface to a series of low power audio hub CODECs, starting with the
 WM5102. Since the features of these devices work over a range of
 subsystems an MFD core driver is provided to instantiate the subdevices
 and arbitrate access between them.
 
 As the new regmap wake IRQ functionality is used as part of the driver
 it is incorporated as a dependency.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.12 (GNU/Linux)
 
 iQIcBAABAgAGBQJP5biQAAoJEBus8iNuMP3d8iYP/ip31jYOeOxGsj8oatPdJgur
 1xE3hvtBCDSTIliV7s21PunDsOTrv/FQQR8ehmLSweFxud3mrjACfky4nwU5A4li
 X3uunePRyZIOrC0XaYiDmVqja03p65zxoH2E/Pf82g/2+VVn/P0maH2+JCOQb7RL
 VxaFauzO/qUVF9/CGCl9wNVYctwU4b2uzGXI9vzCstMsRd5+3PNbF0RgpriBX0tC
 a1e5w+WltmWGQqwl7qYFWN3dp5JQTgfK1wWuS2uhbeEHakCF5BlGq9RuO+U9WJnn
 q71q3ld3OoDsl4TP6hEb8+tBHe0dtbmHFAG5wvi0iIReXCIcHeX51fbMBC1gX+PV
 buArHMGAfZqkWUWC2jpX4YjHoP8stcI85CKWvln8PYnOoD1KTvWzbnYO/5zevyV1
 PLGjl4w8gwounWt4+G+hTnspfYMoG+PR/jmstfs0cG/RBQLSzhKkT13LVCnC8ZM+
 AfMlfjv3ofIfkkuzC5tlX8yYcedfJmQaulJJHleQQiXsZ5xurBu+vdT5eNNgBYBn
 xfopsImaDw+qgvF/ey1ie9r4fzSUNw1NTeA6HJStN2V2EUTx3oEMvuiOwvMZ97px
 AMszTpWUyER+IROw6xVs+0Yx2Hug1WTI3I2OR2t66gbTXbwkpaFVoV1NDzN+1pPJ
 sj1NssmhjM9LK80QHASv
 =8pCq
 -----END PGP SIGNATURE-----

Merge tag 'mfd/wm5102' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/misc into for-next

mfd: Initial support for Wolfson Arizona platform and WM5102 devices

The Wolfson Arizona platform is used to provide common register
interface to a series of low power audio hub CODECs, starting with the
WM5102. Since the features of these devices work over a range of
subsystems an MFD core driver is provided to instantiate the subdevices
and arbitrate access between them.

As the new regmap wake IRQ functionality is used as part of the driver
it is incorporated as a dependency.
2012-07-09 00:17:44 +02:00
Lee Jones 3a8e39c9f4 ARM: ux500: Register the AB8500 from DB8500 MFD
As the AB8500 is a subordinate MFD device to the DB8500-PRCMU,
for consistency and a better 1:1 depiction of how the hardware
is laid out, it is a good idea to register it in the same way
as we do for the other MFD child devices. In order for us to do
this successfully we have to pass AB8500's platform data when
registering the DB8500-PRCMU from platform code.

Also solves this issue:
WARNING: at fs/sysfs/dir.c:526 sysfs_add_one+0x88/0xb0()
sysfs: cannot create duplicate filename '/bus/platform/devices/ab8500-core.0'

Reported-by: Linus Walleij <linus.walleij@linaro.org>
Suggested-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2012-07-09 00:16:14 +02:00
Axel Lin b874809611 mfd: Remove unused max77686 iolock mutex
Now this driver is using regmap API, the iolock mutex is not used and
can be removed.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2012-07-09 00:16:14 +02:00
Jett.Zhou 2573f6d36e mfd: Add pre-regulator device for 88pm860x
Pre-regulator of 88pm8606 is mainly for support charging based on vbus,
it needs to be enabled for charging battery, and will be disabled in
some exception condition like over-temp.
Add the pre-regulator device init data and resource for mfd subdev.

Signed-off-by: Jett.Zhou <jtzhou@marvell.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2012-07-09 00:16:14 +02:00
Johan Hovold bcc1dd4cd7 mfd: Add device-tree entry to enable tps65910 external 32-kHz oscillator
Add device-tree entry to enable external 32-kHz crystal oscillator
input.

Compile-only tested.

Signed-off-by: Johan Hovold <jhovold@gmail.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2012-07-09 00:16:14 +02:00
Johan Hovold 712db99df1 mfd: Add support for enabling tps65910 external 32-kHz oscillator
Add flag to platform data to enable external 32-kHz crystal oscillator
(or square wave) input.

The tps6591x can use either an internal 32-kHz RC oscillator or an
external crystal (or square wave) to generate the 32-kHz clock.

The default setting depends on the selected boot mode. In boot mode 00
the internal RC oscillator is used at power-on, but the external crystal
oscillator (or square wave) can be enabled by clearing the ck32k_ctrl
flag in the device control register.

Note that there is no way to switch from the external crystal oscillator
to the internal RC oscillator.

Signed-off-by: Johan Hovold <jhovold@gmail.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2012-07-09 00:16:14 +02:00
Graeme Gregory 54210c97c8 mfd: Add missing hunk to change palmas irq to clear on read
During conversion to regmap_irq this hunk was missing being moved
to MFD driver to put the chip into clear on read mode. Also as slave
is now set use it to determine which slave for the register call.

Signed-off-by: Graeme Gregory <gg@slimlogic.co.uk>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2012-07-09 00:16:13 +02:00
Graeme Gregory 56dbd61f29 mfd: Fix palmas regulator pdata missing
Due to a merge error the section of code passing the pdata for the
regulator driver to the mfd_add_devices via the children structure
was missing. This corrects this problem.

Signed-off-by: Graeme Gregory <gg@slimlogic.co.uk>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2012-07-09 00:16:13 +02:00