summaryrefslogtreecommitdiff
path: root/drivers/mfd
AgeCommit message (Collapse)Author
2012-05-20mfd: Staticise non-exported tps65217_update_bits()Mark Brown
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: AnilKumar Ch <anilkumar@ti.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2012-05-20mfd: Fix tps65910 build failureSamuel Ortiz
The tps65910_parse_dt() prototype for !CONFIG_OF was not correct, leading to: drivers/mfd/tps65910.c: In function ‘tps65910_i2c_probe’: drivers/mfd/tps65910.c:218:3: error: too many arguments to function ‘tps65910_parse_dt’ Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2012-05-20mfd: Register tps65910 gpios as an mfd deviceLaxman Dewangan
As gpio support for tps65910 is on gpio driver, registering gpio support as the mfd sub devices instead of calling gpio_init() from the core probe. Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2012-05-20mfd: Convert all tps65910 allocation to devm_*Laxman Dewangan
Convert memory allocation and regmap initialization to use devm_* functions. 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-05-20mfd: Cache tps65910 register when we need itLaxman Dewangan
During regmap initialization, we do not provide the default value and hence in place of caching register during regmap_init(), cache it when actually we need it i.e. after reading of that register. 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-05-20mfd: Define all twl-regulator feature flags in one placeNeilBrown
twl-regulator has a collection of feature flags, some defined in twl-core.c and one defined in i2c/twl.h. This is confusing for anyone adding a new feature flag. So collect them together and place them in twl.h immediately after the structure in which they are initially set. Signed-off-by: NeilBrown <neilb@suse.de> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2012-05-20mfd: Add tps65910 device-tree supportRhyland Klein
Add device tree based initialization support for TI's tps65910 pmic. Signed-off-by: Rhyland Klein <rklein@nvidia.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2012-05-20mfd: Commonize tps65910 regmap access through headerRhyland Klein
This change removes the read/write callback functions in favor of common regmap accessors inside the header file. This change also makes use of regmap_read/write for single register access which maps better onto what this driver actually needs. Signed-off-by: Rhyland Klein <rklein@nvidia.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2012-05-19mfd: tpx6586x: Depend on regulatorMark Brown
Some of the OF binding stuff is done in the MFD. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-05-18mfd: palmas PMIC device support KconfigGraeme Gregory
Add the new palmas MFD to Kconfig and Makefile Signed-off-by: Graeme Gregory <gg@slimlogic.co.uk> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-05-18mfd: palmas PMIC device supportGraeme Gregory
Palmas is a PMIC from Texas Instruments and this is the MFD part of the driver for this chip. The PMIC has SMPS and LDO regulators, a general purpose ADC, GPIO, USB OTG mode detection, watchdog and RTC features. Signed-off-by: Graeme Gregory <gg@slimlogic.co.uk> Acked-by: Samuel Ortiz <sameo@linux.intel.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-05-18mfd: mc13xxx: add codec platform dataPhilippe Rétornaz
Signed-off-by: Philippe Rétornaz <philippe.retornaz@epfl.ch> Acked-by: Samuel Ortiz <sameo@linux.intel.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-05-15mfd: wm8994: Update to fully use irq_domainMark Brown
Take advantage of the new regmap irq_domain support to dynamically allocate interrupts, using regmap_irq_get_virq() rather than irq_base to look up the interrupts. This means that most users should not need to specify an irq_base at all. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Samuel Ortiz <sameo@linux.intel.com>
2012-05-13regmap: Convert regmap_irq to use irq_domainMark Brown
This gets us up to date with the recommended current kernel infrastructure and should transparently give us device tree interrupt bindings for any devices using the framework. If an explicit IRQ mapping is passed in then a legacy interrupt range is created, otherwise a simple linear mapping is used. Previously a mapping was mandatory so existing drivers should not be affected. A function regmap_irq_get_virq() is provided to allow drivers to map individual IRQs which should be used in preference to the existing regmap_irq_chip_get_base() which is only valid if a legacy IRQ range is provided. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-05-13Merge branches 'regmap-core', 'regmap-stride', 'regmap-mmio' and ↵Mark Brown
'regmap-irq' into regmap-next
2012-05-13mfd: da9052: Fix genirq abuseMark Brown
Rather than using the pointer passed back by the regmap API (or complaining because that wasn't actually being set) the da9052 driver was having some fun and games peering through genirq and regmap internals. Fix the driver to use the API as expected. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-05-12Merge remote-tracking branch 'regulator/topic/drivers' into regulator-nextMark Brown
Conflicts: drivers/regulator/88pm8607.c (simple overlap with a bugfix in v3.4)
2012-05-12Merge remote-tracking branches 'regulator/topic/core', ↵Mark Brown
'regulator/topic/regmap' and 'regulator/topic/register' into regulator-next
2012-05-11mfd: Support of hierachical interrupt for ab8500Michel JAOUEN
Hierarchical interrupt is supported since ab8500 V2. However, it is not implemented in the ab8500-core driver. With the current implementation, when an ab9540 interrupt occurs, 17 Latch registers are read through i2c. With hierarchical interrupt implementation, there are only 4 i2c accesses. Signed-off-by: Maxime Coquelin <maxime.coquelin@stericsson.com> Reviewed-by: Michel Jaouen <michel.jaouen@stericsson.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2012-05-09mfd: Add regulator support for twl6040 VIO, V2V1 suppliesPeter Ujfalusi
twl6040 has three power supply source: VBAT needs to be connected to VBAT, VIO, and V2V1. Add regulator support for the VIO, V2V1 supplies. Initially handle the two supply together with bulk commands. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Reviewed-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Tero Kristo <t-kristo@ti.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2012-05-09mfd: enable wakeup on twl4030 IRQ.NeilBrown
Most of the interrupts that come through this line should trigger wakeups: power button RTC alarm power available usb plug/unplug so mark the interrupt as a wakeup interrupt. This is particularly important for when the interrupt arrives during the late suspend phase. Without this setting it will be ignored. Signed-off-by: NeilBrown <neilb@suse.de> Acked-by: Kevin Hilman <khilman@ti.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2012-05-09mfd: Convert twl6040-core to devm_regmap_init_i2c()Axel Lin
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-05-09mfd: Convert tps65217 to devm_regmap_init_i2c()Axel Lin
Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2012-05-09mfd: Convert tps65090 to devm_regmap_init_i2c()Axel Lin
Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2012-05-09mfd: Convert s5m-core to devm_regmap_init_i2c()Axel Lin
Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2012-05-09mfd: Convert rc5t583 to devm_regmap_init_i2c()Axel Lin
Signed-off-by: Axel Lin <axel.lin@gmail.com> Acked-by: Laxman Dewangan <ldewangan@nvidia.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2012-05-09mfd: Return proper error if tps65090 regmap_init_i2c failsAxel Lin
Return proper error instead of 0 if regmap_init_i2c fails. Signed-off-by: Axel Lin <axel.lin@gmail.com> Acked-by: Venu Byravarasu <vbyravarasu@nvidia.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2012-05-09watchdog: Convert iTCO_wdt driver to mfd modelAaron Sierra
This patch converts the iTCO_wdt driver to use the multi-function device driver model. It uses resources discovered by the lpc_ich driver, so that it no longer does its own PCI scanning. Signed-off-by: Aaron Sierra <asierra@xes-inc.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2012-05-09mfd: Add LM3533 lighting-power core driverJohan Hovold
Add support for National Semiconductor / TI LM3533 lighting power chips. This is the core driver which provides register access over I2C and registers the ambient-light-sensor, LED and backlight sub-drivers. Signed-off-by: Johan Hovold <jhovold@gmail.com> Reviewed-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2012-05-09mfd: Add support for db8500-prcmu regulator supply for nmk-i2c.4Lee Jones
This applies a supply alias for the db8500's fifth Nomadik i2c port. Signed-off-by: Lee Jones <lee.jones@linaro.org> Acked-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2012-05-09mfd: Enable Device Tree support for the db8500-prcmuLee Jones
This patch will enable probing to occur during a Device Tree enabled boot. The IRQ base is expected to be located in and will be fetched from the DT itself. We also prevent any of the db8500 regulators from being registered here, as they will be enabled via DT instead. Signed-off-by: Lee Jones <lee.jones@linaro.org> Acked-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2012-05-09mfd: Register db8500-prcmu as a platform driver instead of only probingLee Jones
Pass the probe function as part of the platform_driver struct and register using the more common platform_driver_register call. In subsequent patches we'll also add DT support into the struct. Signed-off-by: Lee Jones <lee.jones@linaro.org> Acked-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2012-05-09mfd: Fix of_match_node() da9052 argumentsOlof Johansson
The driver calls of_match_node() with the arguments swapped. Signed-off-by: Olof Johansson <olof@lixom.net> Tested-by: Ying-Chun Liu <paul.liu@linaro.org> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2012-05-09lpc_sch: Add Intel Centerton Multifunction Device supportSeth Heasley
This patch adds the Intel Centerton processor DeviceID for the Integrated Legacy Block (ILB). The ILB provides GPIO, SMBus, and Watchdog functionality. Signed-off-by: Seth Heasley <seth.heasley@intel.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2012-05-09mfd: Add driver for STA2X11 MFD blockAlessandro Rubini
This also introduces <asm/sta2x11.h> to export a function that is in the base sta2x11 support patches. The header will increase with other prototypes and constants over time. Signed-off-by: Alessandro Rubini <rubini@gnudd.com> Acked-by: Giancarlo Asnaghi <giancarlo.asnaghi@st.com> Cc: Alan Cox <alan@linux.intel.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2012-05-09Merge tag 'v3.4-rc6' into next/cleanupOlof Johansson
Linux 3.4-rc6 Resolve conflict where an u5500 file had a bugfix go in, but was deleted in the branch staged for next merge window. Signed-off-by: Olof Johansson <olof@lixom.net>
2012-05-09mfd: twl: define all feature flags in one place.NeilBrown
twl-regulator has a collection of feature flags, some defined in twl-core.c and one defined in i2c/twl.h. This is confusing for anyone adding a new feature flag. So collect them together and place them in twl.h immediately after the structure in which they are initially set. Signed-off-by: NeilBrown <neilb@suse.de> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-05-07mfd: Convert wm8994 to module_i2c_driver()Mark Brown
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2012-05-07mfd: Read CUST_ID from the wm8994 deviceMark Brown
Read CUST_ID from the device and log it for diagnostics. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2012-05-07mfd: Convert wm8350 physical I/O to regmap APIMark Brown
The driver still uses a custom cache implementation but the underlying physical I/O is now done using the regmap API, saving some code and avoiding allocating enormous scratch arrays on the stack. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2012-05-07mfd: Fix wm831x register range passing for recent ARM updatesMark Brown
The removal of mach/io.h from most ARM platforms also set the range of valid IO ports to be empty for most platforms when previously any 32 bit integer had been valid. This makes it impossible to add IO resources as the added range is smaller than that of the root resource for IO ports. Since we're not really using IO memory at all fix this by defining our own root resource outside the normal tree and make that the parent of all IO resources. This also ensures we won't conflict with read IO ports if we ever run on a platform which happens to use them. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2012-05-07mfd: Fix tps65910 section annotationsMark Brown
A warning was being generated by the reference from tps65910_i2c_probe() to tps65910_sleepinit() since the latter was annotated as __init but the former was unannotated. Since these functions can only be called during device init make them both __devinit, and while we're at it also annotate tps65910_i2c_remove() __devexit for symmetry. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2012-05-07mfd: Don't use I2C-specific suspend and resume operations for tps65090Mark Brown
The legacy suspend operations have been deprecated and printing warnings on boot for over a year now. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Venu Byravarasu <vbyravarasu@nvidia.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2012-05-07mfd: Fix tps65090 ifdefs for suspend modeMark Brown
CONFIG_PM also covers runtime only PM. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Venu Byravarasu <vbyravarasu@nvidia.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2012-05-04tps6586x: Add device tree supportThierry Reding
This commit adds device tree support for the TPS6586x regulator. Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-05-01mfd/ab5500: delete AB5500 supportLinus Walleij
This platform has been obsoleted and was only available inside of ST-Ericsson, no users of this code are left in the world. This deletes the core U5500 support entirely in the same manner as the obsoleted U8500 silicon was previously deleted. Cc: Srinidhi Kasagar <srinidhi.kasagar@stericsson.com> Cc: Rabin Vincent <rabin.vincent@stericsson.com> Cc: Jonas Aberg <jonas.aberg@stericsson.com> Cc: Per Forlin <per.forlin@stericsson.com> Cc: Ulf Hansson <ulf.hansson@stericsson.com> Acked-by: Samuel Ortiz <sameo@linux.intel.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2012-05-01mfd/db5500-prcmu: delete DB5500 PRCMU supportLinus Walleij
This platform has been obsoleted and was only available inside of ST-Ericsson, no users of this code are left in the world. This deletes the core U5500 support entirely in the same manner as the obsoleted U8500 silicon was previously deleted. Cc: Srinidhi Kasagar <srinidhi.kasagar@stericsson.com> Cc: Rabin Vincent <rabin.vincent@stericsson.com> Cc: Jonas Aberg <jonas.aberg@stericsson.com> Cc: Per Forlin <per.forlin@stericsson.com> Cc: Ulf Hansson <ulf.hansson@stericsson.com> Acked-by: Samuel Ortiz <sameo@linux.intel.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2012-05-01mfd: Add parameter to disable ab8500 battery managementRickard Andersson
This patch makes it possible to disable battery management via a module boot parameter. When 'ab8500-core.no_bm=1' then ab8500_btemp, ab8500_chargalg, ab8500_charger and ab8500_fg will not be probed. This boot parameter is used for scripted testing of the system. Signed-off-by: Rickard Andersson <rickard.andersson@stericsson.com> Reviewed-by: Jonas Aberg <jonas.aberg@stericsson.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2012-05-01mfd: Deny ab8500 suspend if i2c transfer is ongoingJonas Aaberg
If we are in the middle of an I2C transfer we need to deny suspend of the AB8500 core. Implement an atomic reference counter for the I2C operations to make sure we don't do this. Signed-off-by: Jonas Aaberg <jonas.aberg@stericsson.com> Reviewed-by: Mattias Wallin <mattias.wallin@stericsson.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2012-05-01mfd: Handle the ab8500 irq for suspend/resumeRabin Vincent
Ensure that the AB interrupt is only handled at a time when all core drivers are resumed. Ensure that the AB interrupt is marked as a wakeup interrupt. Signed-off-by: Rabin Vincent <rabin.vincent@stericsson.com> Reviewed-by: Jonas Aberg <jonas.aberg@stericsson.com> Reviewed-by: Mattias Wallin <mattias.wallin@stericsson.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>