Commit graph

388356 commits

Author SHA1 Message Date
Chao Xie 2b274fe522 mfd: 88pm805: Fix potential NULL pdata dereference
User pass platform data to device, and platform data may be
NULL. Add the check for pdata.

Signed-off-by: Chao Xie <chao.xie@marvell.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2013-09-02 11:00:16 +02:00
Chao Xie b432fc25b5 mfd: 88pm800: Fix potential NULL pdata dereference
User pass platform data to device, and platform data may be
NULL. Add the check for pdata.

Signed-off-by: Chao Xie <chao.xie@marvell.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2013-09-02 10:59:57 +02:00
Samuel Ortiz f4388ca7f1 Merge branch 'topic/for-asoc' 2013-09-02 10:31:08 +02:00
Mark Brown c6f39257c9 mfd: twl6040: Use regmap for register cache
Rather then open coding a cache of the vibra control registers use the
regmap cache code.  Also cache the interrupt mask register, providing
a small performance improvement for the interrupt code.

Signed-off-by: Mark Brown <broonie@linaro.org>
Acked-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2013-09-02 10:30:14 +02:00
Mark Brown 921a2c870f mfd: davinci_voicecodec: Provide a regmap for register I/O
This will be used to support refactoring of the ASoC CODEC driver to use
a regmap.

Signed-off-by: Mark Brown <broonie@linaro.org>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2013-09-02 10:27:49 +02:00
Mark Brown 6a01766076 mfd: davinci_voicecodec: Remove unused read and write functions
These functions are not referenced anywhere, nor prototyped, so just
remove them.

Signed-off-by: Mark Brown <broonie@linaro.org>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2013-09-02 10:27:49 +02:00
Wei WANG 6228218064 mmc: memstick: rtsx: Modify copyright comments
Update copyright date, and remove author address.

Signed-off-by: Wei WANG <wei_wang@realsil.com.cn>
Acked-by: Chris Ball <cjb@laptop.org>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2013-08-30 14:25:10 +02:00
Wei WANG 1b8055b490 mmc: rtsx: Clear SD_CLK toggle enable bit if switching voltage fail
If switching voltage fails, SD_CLK toggle enable bit should been cleared
so that SD host can control SD clock automatically.

Signed-off-by: Wei WANG <wei_wang@realsil.com.cn>
Acked-by: Chris Ball <cjb@laptop.org>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2013-08-30 14:25:00 +02:00
Wei WANG 84d72f9cc2 mfd: mmc: rtsx: Change default tx phase
The default phase can meet most cards' requirement, but it is not the
optimal one. In some extreme situation, the rx phase point produced by
the following tuning process will drift quite a distance.
Before tuning UHS card, this patch will set a more proper initial tx
phase point, which is calculated from statistic data, and can achieve
a much better tx signal quality.

Signed-off-by: Wei WANG <wei_wang@realsil.com.cn>
Acked-by: Lee Jones <lee.jones@linaro.org>
Acked-by: Chris Ball <cjb@laptop.org>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2013-08-30 14:24:07 +02:00
Samuel Ortiz 828fa1e601 Hi Sam,
These are the patches due for the MFD Next tree.
 
 If there are any dramas with them, please let me know.
 
 Kind regards,
 Lee
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.12 (GNU/Linux)
 
 iQIcBAABAgAGBQJSE3XBAAoJEFGvii+H/HdhvboP/RNRXbRufJ1/9NGHLafcWE8C
 5d71o9xy7mBdeGzhNRH5mWRB8bdse0cRXEjTavQGv52ohxUdoNG95RwHO1xCZpvF
 hAITRfIoVbpmPXG4KTfmEEW97yPkrUEIB7zH/yJtYi8gyPW0JeNFk2tlpdGsPc1g
 rTNic5RGo89zoQPw0HsCOkO4DWIQe+2y6FqbOjykjWNJTzcSW4YjRg3IuoiXKtHd
 Q2LBsgpv6gofKa9ZWdbKQfdt0/V+snw/hGEMhpEqcBZgSuvivv3hLjSc8K5OCDY7
 /z5ynE1WdLf9sJK8GAY6DuGUA6HsfDHQKACEtOf9AWP4cYheGoE/JGvC7KkQS86X
 1z+nw5LfrQf8SVkFLEaCroTC0X7UJodVdRnmcZmAWz4dcTKhKdRV6aXOYhzHK6cP
 1iXQmpNzWL5Jz8YXwNQ9MlXggv8qCrRGB4sTsj2bTOrDb44xBFzAYwtpIb+w8J7K
 NrNoEq8MwUBYTOXjzMdYlb0PjsLXmZLMqeMBjx0VH/TR39Jj3qX2kEnIRisIliEc
 qYP4FMi/rshTv67OSMvUfvkOZ3uTSgG1ufdvAYUSDCQ5T+a+7b63tOVwX64Hzx7P
 YPPIeO/7VXNOP8XYEtNyRhsmJtdT1JruT00PBKYL9NRuMOmBxoF6pdK3TsOZzRBb
 pNmJJPnVaF221LKfQ0q7
 =e/El
 -----END PGP SIGNATURE-----

Merge tag 'mfd-lee-3.12-1' of git://git.linaro.org/people/ljones/mfd

Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2013-08-21 12:08:14 +02:00
Jingoo Han 8a105ca202 mfd: pcf50633-adc: Use devm_*() functions
Use devm_*() functions to make cleanup paths simpler.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
2013-08-20 09:27:35 +01:00
Wei WANG 09fd86780b mfd: rtsx: Copyright modifications
Update copyright date, remove author address and add Roger Tseng.

Signed-off-by: Wei WANG <wei_wang@realsil.com.cn>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2013-08-20 10:22:01 +02:00
Wei WANG eb891c65c9 mfd: rtsx: Configure to enter a deeper power-saving mode in S3
Set a bit to enable rts5227 and rts5249 to enter a deeper internal
power-saving mode in S3, and recover it after resuming.

Signed-off-by: Wei WANG <wei_wang@realsil.com.cn>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2013-08-20 10:22:01 +02:00
Wei WANG 0ccc0065c9 mfd: rtsx: Clear hardware PFM mode in rtl8411b
Clear hw_pfm_en to disable hardware PFM mode, to fix a bug that in some
situation registers in 0xFDxx domain can't be accessed.

Signed-off-by: Wei WANG <wei_wang@realsil.com.cn>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2013-08-20 10:22:00 +02:00
Wei WANG 7140812c4a mfd: rtsx: Move some actions from rtsx_pci_init_hw to individual extra_init_hw
These actions are individual for each reader model, so should be put in
extra_init_hw instead of rtsx_pci_init_hw.

Signed-off-by: Wei WANG <wei_wang@realsil.com.cn>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2013-08-20 10:22:00 +02:00
Wei WANG 5947c167d1 mfd: rtsx: Add shutdown callback in rtsx_pci_driver
Some actions to clear power state should be handled in .shutdown
callback in rtsx_pci_driver. This patch adopts the following measures to
catch this goal:
1. Add a function rtsx_pci_power_off to abstract the common ops in
.shutdown and .suspend
2. Add pcr->ops->force_power_down to fulfill the individual action for
each reader model

Signed-off-by: Wei WANG <wei_wang@realsil.com.cn>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2013-08-20 10:22:00 +02:00
Wei WANG 773ccdfd9c mfd: rtsx: Read vendor setting from config space
Normally OEMs will set vendor setting to the config space of Realtek
card reader in BIOS stage. This patch reads the setting at the first,
and configure the internal registers according to it, to improve card
reader's compatibility condition.

Signed-off-by: Wei WANG <wei_wang@realsil.com.cn>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2013-08-20 10:22:00 +02:00
Oleksandr Dmytryshyn 74d85e47ab mfd: twl6030-irq: Add interrupt mapping table for the twl6032
The TWL6032 PMIC has different IRQ status bits meaning.
Hence, add interrupt mapping table for the twl6032.

Signed-off-by: Oleksandr Dmytryshyn <oleksandr.dmytryshyn@ti.com>
Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>
Acked-by: Graeme Gregory <gg@slimlogic.co.uk>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2013-08-20 10:19:38 +02:00
Grygorii Strashko 0aa8c68531 mfd: twl6030-irq: Create struct twl6030_irq
Create "struct twl6030_irq" and place all local variables inside it.
Also allocate twl6030_irq structure dynamically during initialization.

Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>
Acked-by: Graeme Gregory <gg@slimlogic.co.uk>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2013-08-20 10:19:29 +02:00
Grygorii Strashko b32408f644 mfd: twl6030-irq: Convert to use linear irq_domain
Since the TWL6030 PMIC is used with OMAP4 SoCs only and OMAP4 legacy
boot is dropped there are no needs to allocate the range of IRQ
descriptors during system boot to support TWL6030 IRQs.

Hence, convert it to use linear irq_domain and move IRQ configuration in
.map()/.unmap() callbacks of irq_domain. So, IRQ mapping and descriptors
allocation will be performed dynamically basing on DT configuration.

The error message will be reported in case if unmapped IRQ is received by
TWL6030 (virq==0).

Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>
Acked-by: Graeme Gregory <gg@slimlogic.co.uk>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2013-08-20 10:19:21 +02:00
Grygorii Strashko a820e5686f mfd: twl6030-irq: Add error check when IRQs are masked initially
Add a missed check for errors when TWL IRQs are masked
initially on probe and report an error in case of failure.

Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>
Acked-by: Graeme Gregory <gg@slimlogic.co.uk>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2013-08-20 10:19:10 +02:00
Naga Venkata Srikanth V 87343e5341 mfd: twl6030-irq: Migrate to IRQ threaded handler
1) Removed request_irq() and replaced it with request_threaded_irq().

2) Removed generic_handle_irq() and replaced it with
handle_nested_irq().
  Handling of these interrupts is nested, as we are handling an
interrupt (for e.g rtc, mmc1) when we are still servicing TWL irq.

3) Removed I2C read-retry logic for the case when twl_i2c_read() is
failed inside IRQ handler - there is no sense to do that, so just report
an error and return.

4) Each nested IRQ is configured with corresponding parent_irq,
which need to be retriggered in case if nested IRQ is marked
as IRQS_PENDING.

Signed-off-by: Naga Venkata Srikanth V <vnv.srikanth@samsung.com>
Signed-off-by: Oleg_Kosheliev <oleg.kosheliev@ti.com>
Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>
Acked-by: Graeme Gregory <gg@slimlogic.co.uk>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2013-08-20 10:19:02 +02:00
Jingoo Han bba078273e mfd: wl1273: Use devm_*() functions
Use devm_*() functions to make cleanup paths simpler.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
2013-08-20 08:51:58 +01:00
Jingoo Han eac1dcbd3e mfd: tps65010: Use devm_*() functions
Use devm_*() functions to make cleanup paths simpler.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
2013-08-20 08:51:48 +01:00
Jingoo Han 7a40431127 mfd: menelaus: Use devm_*() functions
Use devm_*() functions to make cleanup paths simpler.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
2013-08-20 08:51:32 +01:00
Jingoo Han 0010dd3883 mfd: max8998: Use devm_*() functions
Use devm_*() functions to make cleanup paths simpler.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
2013-08-20 08:51:23 +01:00
Jingoo Han 6922ffcfad mfd: max8997: Use devm_*() functions
Use devm_*() functions to make cleanup paths simpler.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
2013-08-20 08:51:13 +01:00
Jingoo Han b2cdcfacfe mfd: pm8921: Use devm_*() functions
Use devm_*() functions to make cleanup paths simpler.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
2013-08-20 08:51:04 +01:00
Jingoo Han 5cddd5de8c mfd: pm8921: Remove unnecessary platform_set_drvdata()
The driver core clears the driver data to NULL after device_release
or on probe failure, since commit 0998d06310
(device-core: Ensure drvdata = NULL when no driver is bound).
Thus, it is not needed to manually clear the device driver data to NULL.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
2013-08-20 08:50:54 +01:00
Jingoo Han ef310f4bbf mfd: pm8921: Include missing linux/module.h
Include <linux/module.h> in order to fix the following errors.

drivers/mfd/pm8921-core.c:209:16: error: expected declaration specifiers or '...' before string constant
drivers/mfd/pm8921-core.c:210:20: error: expected declaration specifiers or '...' before string constant
drivers/mfd/pm8921-core.c:211:16: error: expected declaration specifiers or '...' before string constant
drivers/mfd/pm8921-core.c:212:14: error: expected declaration specifiers or '...' before string constant

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
2013-08-20 08:50:42 +01:00
Laxman Dewangan cc01b4639c mfd: palmas: Add support for external control configuration
Some of Palmas resources like clock, SMPSs, LDOs etc can be controlled
by external pins ENABLE1, ENABLE2 or NSLEEP.

Add support to configure these resources to externally controlled.

Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Acked-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2013-08-20 03:23:52 +02:00
Krystian Garbaciak a0e08b8606 mfd: da9063: Add IRQ support
This patch adds a regmap irqchip for DA9063 IRQs. It depends on

  git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap.git tags/regmap-irq-ack-mask

Signed-off-by: Krystian Garbaciak <krystian.garbaciak@diasemi.com>
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Reviewed-by: Mark Brown <broonie@linaro.org>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2013-08-20 03:16:00 +02:00
Krystian Garbaciak 8e685483b0 mfd: da9063: Add Dialog DA9063 core driver
This is MFD module providing access to registers and interrupts of DA906x
series PMIC. It is used by other functional modules, registered as MFD cells.
Driver uses regmap with paging to access extended register list. Register map
is divided into two pages, where the second page is used during initialisation.

This module provides support to following functional cells:
 - Regulators
 - RTC
 - HWMON
 - OnKey (power key misc input device)
 - Vibration (force-feedback input device)
 - Watchdog
 - LEDs

Signed-off-by: Krystian Garbaciak <krystian.garbaciak@diasemi.com>
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Reviewed-by: Mark Brown <broonie@linaro.org>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2013-08-20 03:15:52 +02:00
Krystian Garbaciak 36ec66e033 mfd: da9063: Add register definitions for DA9063 driver
This patch adds register definitions for the DA9063 PMIC. They will be used
by the following DA9063 mfd core driver and functional module drivers.

Signed-off-by: Krystian Garbaciak <krystian.garbaciak@diasemi.com>
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Reviewed-by: Mark Brown <broonie@linaro.org>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2013-08-20 03:15:41 +02:00
Samuel Ortiz a849212f6e regmap: Support for acknowledging masked IRQs
Some devices need interrupts to be clear when they are masked otherwise
 the interrupt is not deasserted by the mask being set - add support for
 this to regmap-irq from Philipp Zabel.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.12 (GNU/Linux)
 
 iQIcBAABAgAGBQJR9RRgAAoJELSic+t+oim91RUQAIas5Oj4Gi8w0r4TOCjRx17t
 La1M6eL6ANU84cB/9KZWvERkN/JrXereGuk2FLNg32diI8GtAv4ee++Sk2vac2rp
 WZkf32A8uEkUi/kErVcOdH85UWckcvgljt1zzTaNGz6l6K+VdF34Lu8/l4+EdsaZ
 6YBAhtL4t0ScrshqMIt48XdS3ZajuzKmUmEydM7/7M7FUZRNOiWmVOkoYBS5QrYH
 63HTDVPxC1DYmgXR/Manp7SbYF2uzLbu5spBC3DFqXT0rOrwzFxR60ZBFZISRArF
 xjRRuEY8m+vQku1mjYZd+iEKNnkYyw/YrskoJeimIEJOP2aGEQlqTOll2MHnpQFt
 P+T7he/DBwOnX81JwP1Ign0MYayQKnr9dw4KuReP+5ogf/THZ5+YOuDbqO8fZZIt
 t+RahmozKDi2yGjVHu/65YJV3+iX7d5KFQs3VBTGCr4f9H8uTw75ZlBKbY4J04dz
 YWMjsEG/lvfvHQtSYeXqaVfIUB/5mAv2mMtXDydq1Bv9bcxrUuJnmVIuJ58YG5pY
 B0f2mBhehQZG5x86Zh2m9U6JlxpIHcjYU8Ksmkx9wTtMa2s93kU7Z4KCi18xQ6GV
 rHy0Z7LoJ3PU4AB0k4kEQhrgMtwPIo5/gtH0fzPnEdCR0BNIW6bBUM1wzuFJiywj
 veyFzRMjnmrKVK0AduN/
 =SAte
 -----END PGP SIGNATURE-----

Merge tag 'regmap-irq-ack-mask' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap

regmap: Support for acknowledging masked IRQs

Some devices need interrupts to be clear when they are masked otherwise
the interrupt is not deasserted by the mask being set - add support for
this to regmap-irq from Philipp Zabel.
2013-08-20 03:07:25 +02:00
Zubair Lutfullah 5d945d94a1 mfd: ti_am335x_tscadc: Update reg_cache variable in clr function
The reg_cache variable should be updated with current
steps in the reg_se register. Then the mask should
apply and clear the register. Previously, the reg_cache
can be an old redundant value that isn't updated.

Signed-off-by: Zubair Lutfullah <zubair.lutfullah@gmail.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
2013-08-14 18:55:40 +01:00
Benedikt Spranger b018e1361b mfd: core: Copy DMA mask and params from parent
The child device intends to perform DMA operations then it needs a dma
mask and params set. This patches copies them from the parent device.

Signed-off-by: Benedikt Spranger <b.spranger@linutronix.de>
Signed-off-by: Holger Dengler <dengler@linutronix.de>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
2013-08-14 18:55:38 +01:00
Mark Brown bb3d593420 mfd: tps65010: Use power efficient workqueue for power polling
There is no need to use a per CPU workqueue to poll, especially with the
5s delay used, so allow the scheduler to use any CPU.

Signed-off-by: Mark Brown <broonie@linaro.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
2013-08-14 18:55:12 +01:00
Michael Brunner c1d33b1b18 mfd: Add support for COMe-bHL6 and COMe-cTH6 to Kontron PLD driver
This patch adds DMI system IDs for the new Kontron modules COMe-bHL6 and
COMe-cTH6 to the Kontron PLD driver.

Acked-by: Kevin Strasser <strassek@engr.orst.edu>
Signed-off-by: Michael Brunner <michael.brunner@kontron.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
2013-08-14 18:53:19 +01:00
Bill Huang b81eec09a4 mfd: palmas: Add power off control
Hook up "pm_power_off" to palmas power off routine if there is DT
property "ti,system-power-controller" defined, so platform which is
powered by this regulator can be powered off properly.

Acked-by: Nishanth Menon <nm@ti.com>
Signed-off-by: Mallikarjun Kasoju <mkasoju@nvidia.com>
Signed-off-by: Bill Huang <bilhuang@nvidia.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
2013-08-14 18:53:17 +01:00
Yadwinder Singh Brar 3134bcae4f mfd: sec: Add clock cell for s2mps11
This patch adds clock to list of mfd cells for s2mps11 and DT documentation
for clock part.

Reviewed-by: Mike Turquette <mturquette@linaro.org>
Signed-off-by: Yadwinder Singh Brar <yadi.brar@samsung.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
2013-08-14 18:53:15 +01:00
Charles Keepax 44955ab50a mfd: wm5110: Set FX_CTRL2 to volatile
FX_CTRL2 is a volatile register and should be marked as such, this patch
does so.

Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
2013-08-14 18:53:12 +01:00
Charles Keepax f5abfaa439 mfd: wm5110: Add missing Mic Detect 3 register into defaults
Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
2013-08-14 18:53:10 +01:00
Charles Keepax acf0be1783 mfd: wm5110: Add mic detect level registers
The mic detect level registers are used from common code to configure
the button detection code. Add these registers to the defaults list and
mark them as readable for wm5110.

Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
2013-08-14 18:53:08 +01:00
Charles Keepax c78d20350d mfd: wm5110: Mark register containing FLL gains as readable
The FLL gains are present on all devices and controlled from common code
shared between them. This patch adds these registers into defaults list
for wm5110 and marks them as readable.

Reported-by: D.J. Barrow <dbarrow@wolfsonmicro.com>
Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
2013-08-14 18:53:06 +01:00
Zubair Lutfullah 45491ada98 mfd: ti_am335x_tscadc: Fix spin lock and reg_cache
Reg_cache variable is used to lock step enable register
from being accessed and written by both TSC and ADC
at the same time.
However, it isn't updated anywhere in the code at all.

If both TSC and ADC are used, eventually 1FFFF is always
written enabling all 16 steps uselessly causing a mess.

Patch fixes it by correcting the locks and updates the
variable by reading the step enable register

Signed-off-by: Zubair Lutfullah <zubair.lutfullah@gmail.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
2013-08-14 18:53:03 +01:00
Charles Keepax e293e84727 mfd: arizona: Move regulator disable to after marking cache only
If we disable DCVDD before we mark the cache as cache only, we might
attempt to write to the chip whilst it is powered down and lose a write.

Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
2013-08-14 18:53:01 +01:00
Jingoo Han e0e2e6ec5d mfd: ab8500-gpadc: Add CONFIG_PM_SLEEP to suspend/resume
Add CONFIG_PM_SLEEP to suspend/resume functions to fix the build
warnings when CONFIG_PM_SLEEP is not selected. This is because
sleep PM callbacks defined by SET_SYSTEM_SLEEP_PM_OPS are only used
when the CONFIG_PM_SLEEP is enabled.

drivers/mfd/ab8500-gpadc.c:891:12: warning: 'ab8500_gpadc_suspend' defined but not used [-Wunused-function]
drivers/mfd/ab8500-gpadc.c:903:12: warning: 'ab8500_gpadc_resume' defined but not used [-Wunused-function]

Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
2013-08-14 18:52:51 +01:00
Jingoo Han f28d7ed0a5 mfd: ab8500-gpadc: Add CONFIG_PM_RUNTIME to runtime_suspend/runtime_resume
Add CONFIG_PM_RUNTIME to runtime_suspend/runtime_resume functions
to fix the build warnings when CONFIG_PM_RUNTIME is not selected.
This is because runtime PM callbacks defined by SET_RUNTIME_PM_OPS
are only used when the CONFIG_PM_RUNTIME is enabled.

drivers/mfd/ab8500-gpadc.c:870:12: warning: 'ab8500_gpadc_runtime_suspend' defined but not used [-Wunused-function]
drivers/mfd/ab8500-gpadc.c:878:12: warning: 'ab8500_gpadc_runtime_resume' defined but not used [-Wunused-function]

Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
2013-08-14 18:52:36 +01:00
Jingoo Han 9924713a77 MFD: ucb1x00-core: Add CONFIG_PM_SLEEP to suspend/resume
Add CONFIG_PM_SLEEP to suspend/resume functions to fix the build
warnings when CONFIG_PM_SLEEP is not selected. This is because
sleep PM callbacks defined by SET_SYSTEM_SLEEP_PM_OPS are only used
when the CONFIG_PM_SLEEP is enabled.

drivers/mfd/ucb1x00-core.c:672:12: warning: 'ucb1x00_suspend' defined but not used [-Wunused-function]
drivers/mfd/ucb1x00-core.c:704:12: warning: 'ucb1x00_resume' defined but not used [-Wunused-function]

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
2013-08-07 09:48:12 +01:00