summaryrefslogtreecommitdiff
path: root/drivers
AgeCommit message (Collapse)Author
2012-05-20mfd: Register the twl6040 child for the ASoC codec unconditionallyPeter Ujfalusi
The main function of the twl6040 is to provide audio on OMAP4+ platforms. Since the ASoC codec driver can work without the pdata we can register the child to load the codec driver whenever the twl6040 MFD driver is loaded. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2012-05-20mfd: Allocate twl6040 IRQ numbers dynamicallyPeter Ujfalusi
Use irq_alloc_descs() to get the IRQ number range dynamically instead of the hardwired use if pdata->irq_base. The twl6040 only provides interrupts for it's internal components which means that it is not working as an IRQ expander type of device. The client drivers will receive their interrupt numbers as resource which is configured based on the received IRQ range we got from irq_alloc_descs() Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2012-05-20mfd: twl6040 code cleanup in interrupt initialization partPeter Ujfalusi
No functional change, just to make the code a bit more uniform and remove wrapped lines. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2012-05-20mfd: Enable ab8500-gpadc driver for Device TreeLee Jones
This patch will allow the ab8500-gpadc driver to be probed during Device Tree enabled boot. Signed-off-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2012-05-20mfd: Prevent unassigned pointer from being used in ab8500-gpadc driverLee Jones
Before this patch if probe failed to find the platform IRQ it would attempt to print a message out using dev_err, which in turn was being passed an unassigned pointer. This patch ensures the information passed to dev_err is correct. Signed-off-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2012-05-20mfd: Enable ab8500-debug when Device Tree is enabledLee Jones
Allow the ab8500-debugfs driver to be probed during DT start-up. Signed-off-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2012-05-20mfd: Enable Device Tree for ab8500-core driverLee Jones
This patch will allow the ab8500-core driver to be probed and set up when booting when Device Tree is enabled. This includes platform ID look-up which identifies the machine it is currently running on. If we are undergoing a DT enabled boot, we will refuse to setup each of the other ab8500-* devices, as they will be probed individually by DT. Signed-off-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2012-05-20mfd: Remove confusing ab8500-i2c file and merge into ab8500-coreLee Jones
ab8500-i2c is used as core code to register the ab8500 device. After allocating ab8500 memory, it immediately calls into ab8500-core where the real initialisation takes place. This patch moves all core registration and memory allocation into the true ab8500-core file and removes ab8500-i2c completely. Signed-off-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2012-05-20mfd: mc13xxx core should not be user visibleMark Brown
Since the core is not usable without one of the bus modules it should not be presented in the UI but should instead be selected by the bus modules. Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2012-05-20mfd: Fix double free in wm8350 error pathJohan Hovold
Fix double free in probe error path introduced by the recent conversion of wm8350 to use regmap. Signed-off-by: Johan Hovold <jhovold@gmail.com> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2012-05-20mfd: Convert lm3533 to use devresJohan Hovold
Use devres to manage core driver data and regmap. Signed-off-by: Johan Hovold <jhovold@gmail.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2012-05-20mfd: Add ADC support to the DA9052/53 coreAshish Jangam
This patch adds ADC support to the DA9052/53 core. Tested on smdkv6410 and i.mx53 QS boards. Signed-off-by: Ashish Jangam <ashish.jangam@kpitcummins.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2012-05-20mfd: Add tps65910-irq devicetree init and irqdomain supportRhyland Klein
This change changes the tps65910-irq code to use irqdomain, and support initialization from devicetree. This assumes that the irq_base in the platform data is -1 if devicetree is used. Signed-off-by: Rhyland Klein <rklein@nvidia.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2012-05-20mfd: Make anatop register accessor more flexible and rename meaningfullyRichard Zhao
- rename to anatop_read_reg and anatop_write_reg - anatop_read_reg directly return reg value - anatop_write_reg write reg with mask Signed-off-by: Richard Zhao <richard.zhao@freescale.com> Reviewed-by: Ying-Chun Liu (PaulLiu) <paul.liu@linaro.org> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2012-05-20mfd: wm8400 needs to depend on I2C=yMark Brown
Reported-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2012-05-20mfd: Convert wm831x to irq_domainMark Brown
The modern idiom is to use irq_domain to allocate interrupts. This is useful partly to allow further infrastructure to be based on the domains and partly because it makes it much easier to allocate virtual interrupts to devices as we don't need to allocate a contiguous range of interrupt numbers. Convert the wm831x driver over to this infrastructure, using a legacy IRQ mapping if an irq_base is specified in platform data and otherwise using a linear mapping, always registering the interrupts even if they won't ever be used. Only boards which need to use the GPIOs as interrupts should need to use an irq_base. This means that we can't use the MFD irq_base management since the unless we're using an explicit irq_base from platform data we can't rely on a linear mapping of interrupts. Instead we need to map things via the irq_domain - provide a conveniencem function wm831x_irq() to save a small amount of typing when doing so. Looking at this I couldn't clearly see anything the MFD core could do to make this nicer. Since we're not supporting device tree yet there's no meaningful advantage if we don't do this conversion in one, the fact that the interrupt resources are used for repeated IP blocks makes accessor functions for the irq_domain more trouble to do than they're worth. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2012-05-20mfd: Don't try to flag IRQ 0 as a wm831x wake sourceMark Brown
If we've not got a primary IRQ we shouldn't be trying to flag IRQ 0 as a wake source. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2012-05-20mfd: Add MAX77693 irq handlerChanwoo Choi
This patch supports IRQ handling for MAX77693. Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com> Signed-off-by: Myungjoo Ham <myungjoo.ham@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2012-05-20mfd: Add MAX77693 driverChanwoo Choi
This patch adds MFD driver for MAX77693 to enable its sub devices. The MAX77693 is a multi-function devices. It includes PMIC, MUIC(Micro USB Interface Controller), flash LED control and haptic motor control. Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com> Signed-off-by: Myungjoo Ham <myungjoo.ham@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Reviewed-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2012-05-20mfd: Export wm8400_block_read()Mark Brown
Used by the regulator driver. Reported-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2012-05-20mfd: Don't support non-modular wm8400 buildMark Brown
It's relying on non-exported symbols. Reported-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2012-05-20mfd: Silence an lm3533 gcc warningDan Carpenter
This is supposed to be umode_t. It causes a GCC warning: drivers/mfd/lm3533-core.c:440:2: warning: initialization from incompatible pointer type [enabled by default] drivers/mfd/lm3533-core.c:440:2: warning: (near initialization for ‘lm3533_attribute_group.is_visible’) [enabled by default] Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2012-05-20gpio: Convert tps65910 to a platform driverLaxman Dewangan
Make the gpio-tps65910 as platform driver and register this from tps65910 core driver as mfd sub device. Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Acked-by: Grant Likely <grant.likely@secretlab.ca> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2012-05-20mfd: Convert pcf50633-core to use devm_* APIsAxel Lin
Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2012-05-20mfd: Convert da9052 to use devm_* APIsAxel Lin
Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2012-05-20mfd: Change tunnelcreek watchdog name on the lpc_sch subdevices arrayWim Van Sebroeck
The name of the tunnelcreek watchdog device is not tunnelcreek_wdt but ie6xx_wdt. Signed-off-by: Wim Van Sebroeck <wim@iguana.be> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2012-05-20mfd: Fix lm3533 regmap_update_bits() callAxel Lin
Current code calls regmap_update_bits() with mask and val arguments swapped. Signed-off-by: Axel Lin <axel.lin@gmail.com> Acked-by: Johan Hovold <jhovold@gmail.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2012-05-20mfd: Use SI-units for the lm3533 max-current interfaceJohan Hovold
Use SI-units (uA) for max-current interface (5000 - 29800 uA). Signed-off-by: Johan Hovold <jhovold@gmail.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2012-05-20mfd: Remove unused max-current lm3533 functionJohan Hovold
The max-current attributes of the subdrivers have been dropped so remove the no longer used lm3533_ctrlbank_get_max_current function. Signed-off-by: Johan Hovold <jhovold@gmail.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2012-05-20mfd: Remove lm3533 boost attributesJohan Hovold
Remove boost-frequency and ovp attributes, which can be set through platform data, from sysfs. Signed-off-by: Johan Hovold <jhovold@gmail.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2012-05-20mfd: Add boost frequency and ovp to lm3533 platform dataJohan Hovold
Add boost-frequency and over-voltage-protection settings to platform data. Signed-off-by: Johan Hovold <jhovold@gmail.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2012-05-20mfd: Remove wm8400 custom cache implementationMark Brown
Save a useful amount of code by removing the custom cache implementation for wm8400 and using the regmap cache. Also simplify things by not separately reseting the CODEC registers, this is a sufficiently infrequent operation that we can simply invalidate the entire cache when this happens. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
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-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>