summaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)Author
2013-06-19mfd: twl4030-power: Split from twl-core into a dedicated moduleFlorian Vaussard
For now, the call to twl4030-power is hard-wired inside twl-core. To ease the future transition to DT, make twl4030-power as a separate module, like what is already done for twl4030-audio and others. Signed-off-by: Florian Vaussard <florian.vaussard@epfl.ch> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2013-06-18mfd: ssbi: Use devm_* and simplify codeStephen Boyd
Use devm_ioremap_resource and devm_kzalloc to simplify error paths and reduce lines of code. Also use dev_err() to keep consistency and drop the .remove function because the devm functions take care of what it's doing besides the now obsolete platform_set_drvdata() which we can just drop. Finally, use module_platform_driver() to save some more lines. Cc: David Brown <davidb@codeaurora.org> Signed-off-by: Stephen Boyd <sboyd@codeaurora.org> Acked-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2013-06-18mfd: ssbi: Add MODULE_DEVICE_TABLEStephen Boyd
This allows the ssbi module to be autoloaded on boot. Cc: David Brown <davidb@codeaurora.org> Signed-off-by: Stephen Boyd <sboyd@codeaurora.org> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2013-06-18mfd: twl4030: Allow IRQ wake enable to succeed on subchip IRQsKevin Hilman
The genirq IRQ wake method will default to failure if the irq_chip does not provide a set_wake method. However, for TWL4030 sub-chip IRQs, we want the wake enable to succeed even though we don't provide a set_wake method. This allows sub-chip IRQs to still be flagged as wakeup capable, and allow them to wakeup from suspend (or abort suspend if they fire during suspend.) To fix, use the IRQCHIP_SKIP_SET_WAKE flag in the irq_chip. Signed-off-by: Kevin Hilman <khilman@linaro.org> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2013-06-18mfd: lpc_ich: Convert to module_pci_driverLibo Chen
use module_pci_driver instead of init/exit, make code cleaner. Signed-off-by: Libo Chen <libo.chen@huawei.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2013-06-18mfd: 88pm800: Add regulator sub deviceChao Xie
Signed-off-by: Chao Xie <chao.xie@marvell.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2013-06-18mfd: 88pm800: Enhance sub devices initializationChao Xie
Separate the devices initialization into different functions. It makes the probe function clearer. Signed-off-by: Chao Xie <chao.xie@marvell.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2013-06-18mfd: 88pm80x: Change chip id definition and detectionChao Xie
Change the chip id definition and detection and then: 1. We no longer need to add PM800_CHIP_XXX for the coming revision. 2. We no longer need to pass driver_data in i2c_device_id as we can distinguish the chips from the CHIP_ID register. Signed-off-by: Chao Xie <chao.xie@marvell.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2013-06-18mfd: 88pm800: Enhance error handling for sub pages probe/removeChao Xie
pm800_pages_init and pm800_pages_exit are called by pm800_probe. Change the code to enhance error handling and remove unused code at pm800_pages_init/exit and pm800_probe. Signed-off-by: Yi Zhang <yizhang@marvell.com> Signed-off-by: Chao Xie <chao.xie@marvell.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2013-06-18mfd: 88pm800: Remove the power and gpadc page addr from platform dataChao Xie
88pm800 has two addtional pages - power and gpadc. The address of the pages depends on the address of 88pm800. So do not need pass the address of the power and gpadc in platform data. Signed-off-by: Chao Xie <chao.xie@marvell.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2013-06-18mfd: 88pm800: 88pm805: Remove "IRQF_TRIGGER_FALLING" flagYi Zhang
88pm800/88pm805 interrupt is asserted low if the events happened. So remove IRQF_TRIGGER_FALLING for irq request. Also, the interrupt wiring is board dependent so do not set IRQF_TRIGGER by default. Signed-off-by: Yi Zhang <yizhang@marvell.com> Signed-off-by: Chao Xie <chao.xie@marvell.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2013-06-18mfd: 88pm800: Initialize mask_invertChao Xie
mask_invert must be set otherwise interrupts cannot be cleared. Signed-off-by: Chao Xie <chao.xie@marvell.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2013-06-18mfd: 88pm80x: Fix driver name for 88pm800 and 88pm805Chao Xie
88pm800 and 88pm805 shouldnot have the same driver name. Signed-off-by: Chao Xie <chao.xie@marvell.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2013-06-18mfd: 88pm800: Fix NULL pointer dereferenceYi Zhang
Move "device_800_init" to fix NULL pointer error when calling "device_gpadc_init" as it needs "subchip->regmap_gpadc" to set registers via regmap interface Signed-off-by: Yi Zhang <yizhang@marvell.com> Signed-off-by: Chao Xie <chao.xie@marvell.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2013-06-18mfd: arizona: Integrate wm8997 into Arizona mfdCharles Keepax
The wm8997 is a compact, high-performance audio hub CODEC with SLIMbus interfacing, for smartphones, tablets and other portable audio devices based on the Arizona platform. This patch integrates the wm8997 into the Arizona mfd. Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2013-06-18mfd: wm8994: Reset device during probeMark Brown
Ensure that the device is in a known good state. This should have little practical impact as the runtime PM will reset the device shortly after probe but it's neater. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2013-06-17mfd: palmas: Remove code which is not necessary for a device tree bootJ Keerthy
Remove code which is not necessary for a device tree boot. Boot tested on OMAP5-UEVM board. Signed-off-by: J Keerthy <j-keerthy@ti.com> Acked-by: Laxman Dewangan <ldewangan@nvidia.com> Acked-by: Graeme Gregory <gg@slimlogic.co.uk> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2013-06-13Merge tag 'am335x_tsc-adc' of git://breakpoint.cc/bigeasy/linuxSamuel Ortiz
A complete refurbished series inclunding: - DT support for the MFD, TSC and ADC driver & platform device support, which has no users, has been killed. - iio_map from last series is gone and replaced by proper nodes in the device tree. - suspend fixes which means correct data structs are taken and no interrupt storm - fifo split which should problem with TSC & ADC beeing used at the same time - The ADC channels are now checked before blindly applied. That means the touch part reads X, Y and Z coordinates and does not mix them up. Same goes for the IIO ADC driver. - The IIO ADC driver now creates files named in_voltageX_raw where X represents the ADC line instead of a number starting at 0. A read from this file can return -EBUSY in case touch is busy and the ADC didn't collect a value.
2013-06-13mfd: 88pm860x: Convert to managed resources for allocating memoryLee Jones
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2013-06-13mfd: max8925: Convert to managed resources for allocating memoryLee Jones
Signed-off-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2013-06-13mfd: max77686: Convert to managed resources for allocating memoryLee Jones
Signed-off-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2013-06-13mfd: janz-cmodio: Convert to managed resources for allocating memoryLee Jones
Signed-off-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2013-06-13mfd: htc-pasic3: Convert to managed resources for allocating memoryLee Jones
Signed-off-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2013-06-13mfd: htc-i2cpld: Convert to managed resources for allocating memoryLee Jones
Signed-off-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2013-06-13mfd: htc-egpio: Convert to managed resources for allocating memoryLee Jones
Signed-off-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2013-06-13mfd: davinci_voicecodec: Convert to managed resources for allocating memoryLee Jones
Signed-off-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2013-06-13mfd: cros_ec: Convert to managed resources for allocating memoryLee Jones
Signed-off-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2013-06-13mfd: asic3: Convert to managed resources for allocating memoryLee Jones
Signed-off-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2013-06-13mfd: adp5520: Convert to managed resources for allocating memoryLee Jones
Signed-off-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2013-06-13mfd: abx500-core: Convert to managed resources for allocating memoryLee Jones
Signed-off-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2013-06-13mfd: ab8500-gpadc: Convert to managed resources for allocating memoryLee Jones
Signed-off-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2013-06-13mfd: ab8500-debug: Convert to managed resources for allocating memoryLee Jones
Signed-off-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2013-06-13mfd: ab3100-otp: Convert to managed resources for allocating memoryLee Jones
Signed-off-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2013-06-13mfd: tps65912: Convert to managed resources for allocating memoryLee Jones
Saves on code and simplifies the driver, as these resources are now tracked and freed automatically when the driver is realised. Signed-off-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2013-06-13Merge branch 'for-mfd-next' of ↵Samuel Ortiz
git://git.linaro.org/people/ljones/linux-3.0-ux500
2013-06-13mfd: 88pm860x: Use devm_regmap_init_i2c()Sachin Kamat
devm_regmap_init_i2c() is device managed and makes cleanup simpler. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Signed-off-by: Lee Jones <lee.jones@linaro.org>
2013-06-13mfd: ab8500-core: Add AB8500 external regulators as MFD devicesLee Jones
The AB8500 external regulator driver is now a device in its own right, so it requires registering and probing in the normal way. This patch will ensure the driver is probed once registered for all devices which support them. Acked-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Lee Jones <lee.jones@linaro.org>
2013-06-13mfd: dbx500-prcmu: Use correct names for clock management registersLee Jones
... as stipulated by the Hardware Specification document. Acked-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Lee Jones <lee.jones@linaro.org>
2013-06-13mfd: Replace strict_strtoul() with kstrtoul() in ab* and att*Jingoo Han
The usage of strict_strtoul() is not preferred, because strict_strtoul() is obsolete. Thus, kstrtoul() should be used. Signed-off-by: Jingoo Han <jg1.han@samsung.com> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
2013-06-13mfd: ab8500-core: Add of_compatible property for ab8500-codecFabio Baltieri
Add of_compatible string to the ab8500-codec cell to allow the driver to grab handlers such as regulators from device-tree when available. Signed-off-by: Fabio Baltieri <fabio.baltieri@linaro.org> Signed-off-by: Lee Jones <lee.jones@linaro.org>
2013-06-13mfd: ab8500-core: Add device for new RTC version for AB8540 cut2Alexandre Torgue
AB8540 RTC have changed between AB8540_cut1 and AB8540_cut2.Different ressources to define for those two version. Acked-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Julien Delacou <julien.delacou@stericsson.com> Signed-off-by: Alexandre Torgue <alexandre.torgue@st.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
2013-06-13mfd: ab8500-core: Drop references to ab8500-ledsLee Jones
The ab8500-leds driver has never been upstreamed and was replaced by a PWM framework based driver, so these references are not needed anymore. Acked-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Fabio Baltieri <fabio.baltieri@linaro.org> Signed-off-by: Lee Jones <lee.jones@linaro.org>
2013-06-13Merge tag 'mfd-arizona-v3.10-rc2' of ↵Samuel Ortiz
git://git.kernel.org/pub/scm/linux/kernel/git/broonie/misc mfd: arizona: Updates for v3.10 A bunch of enhancements and fixes for the arizona devices, adding a few new features (the main one being device tree) and improving robustness.
2013-06-12iio: ti_am335x_adc: check if we found the valueSebastian Andrzej Siewior
Usually we get all the values we wanted but it is possible, that te ADC unit is busy performing the conversation for the HW events. In that case -EBUSY is returned and the user may re-call the function. Acked-by: Jonathan Cameron <jic23@kernel.org> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
2013-06-12iio: ti_am335x_adc: Allow to specify input lineSebastian Andrzej Siewior
The TSC part allows to specify the input lines. The IIO part assumes that it usues always the last few, that means if IIO has adc-channels set to 2 it will use channel 6 and 7. However it might make sense to use only 6. This patch changes the device property (which was introduced recently and was never in an official release) in a way that the user can specify which of the AIN lines should be used. In Addition to this, the name is now AINx where x is the channel number i.e. for AIN6 we would have 6. Prior this, it always started counting at 0 which is confusing. In addition to this, it also checks for correct step number during reading and does not rely on proper FIFO depth. Acked-by: Jonathan Cameron <jic23@kernel.org> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
2013-06-12input: ti_am335x_tsc: return IRQ_NONE if there was no IRQ for usSebastian Andrzej Siewior
The previous patch ("input/ti_am335x_tsc: ACK the HW_PEN irq in ISR") acked the interrupt so we don't freeze if we don't handle an enabled interrupt source. The interrupt core has a mechanism for this and to get it work one should only say that it handled an interrupt if it is actually the case. Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
2013-06-12input: ti_am335x_tsc: ACK the HW_PEN irq in ISRSebastian Andrzej Siewior
The interrupt source IRQENB_HW_PEN is enabled in suspend and suposed to be used as a wake up source. Once this interrupt source is unmaksed, the devices ends up in ISR and never continues. This change ACKs the interrupt and disables it so the system does not freeze. Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
2013-06-12input: ti_am335x_adc: use only FIFO0 and clean up a littleSebastian Andrzej Siewior
The driver programs a threshold of "coordinate_readouts" say 5. The REG_FIFO0THR registers says it should it be programmed to "threshold minus one". The driver does not expect just 5 coordinates but 5 * 2 + 2. Multiplied by two because 5 for X and 5 for Y and plus 2 because we have two Z. The whole thing kind of works because It reads the 5 coordinates for X and Y from FIFO0 and FIFO1 and the last element in each FIFO is ignored within the loop and read later. Nothing guaranties that FIFO1 is ready by the time it is read. In fact I could see that that FIFO1 reaturns for Y channels 8,9, 10, 12, 6 and for Y channel 7 for Z. The problem is that channel 7 and channel 12 got somehow mixed up. The other Problem is that FIFO1 is also used by the IIO part leading to wrong results if both (tsc & adc) are used. The patch tries to clean up the whole thing a little: - Remove the +1 and -1 in REG_STEPCONFIG, REG_STEPDELAY and its counter part in the for loop. This is just confusing. - Use only FIFO0 in TSC. The fifo has space for 64 entries so should be fine. - Read the whole FIFO in one function and check the channel. - in case we dawdle around, make sure we only read a multiple of our coordinate set. On the second interrupt we will cleanup the remaining enties. Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
2013-06-12mfd: iio: ti_am335x_adc: rename device from tiadc to TI-am335x-adcSebastian Andrzej Siewior
TI-adc reads a little better compared to tiadc. And if we add am335x to it then we have the same naming scheme as the tsc side. Acked-by: Jonathan Cameron <jic23@kernel.org> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
2013-06-12mfd: input: ti_am335x_tsc: rename device from tsc to TI-am335x-tscSebastian Andrzej Siewior
tsc is a very generic name. This patch adds a TI and HW prefix to it less generic. Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>