summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2012-11-30mfd: wm8994: Make current device behaviour the defaultMark Brown
As the wm8994 series of devices are now very mature make the current behaviour of the devices the default behaviour, any future revisions are likely to have only minor updates. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2012-11-27mfd: tps65090: MFD_TPS65090 needs to select REGMAP_IRQAxel Lin
This fixes below build error: drivers/built-in.o: In function `tps65090_i2c_probe': drivers/mfd/tps65090.c:180: undefined reference to `regmap_add_irq_chip' drivers/mfd/tps65090.c:190: undefined reference to `regmap_irq_chip_get_base' drivers/mfd/tps65090.c:203: undefined reference to `regmap_del_irq_chip' drivers/built-in.o: In function `tps65090_i2c_remove': drivers/mfd/tps65090.c:213: undefined reference to `regmap_del_irq_chip' make: *** [vmlinux] Error 1 Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2012-11-26mfd: Fix stmpe.c build when OF is not enabledRandy Dunlap
Fix build errors when CONFIG_OF is not enabled by including <linux/of.h> (needs to be added in any case). An alternative fix could be to make the driver depend on OF. drivers/mfd/stmpe.c:1025:2: error: implicit declaration of function 'of_property_read_u32' drivers/mfd/stmpe.c:1030:2: error: implicit declaration of function 'for_each_child_of_node' drivers/mfd/stmpe.c:1030:36: error: expected ';' before '{' token Signed-off-by: Randy Dunlap <rdunlap@infradead.org> Acked-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2012-11-26mfd: jz4740-adc: Use devm_kzallocDevendra Naga
Use devm_kzalloc and remove the error path free'ing and unload free'ing as the devm resource functions free them. Signed-off-by: Devendra Naga <devendra.aaru@gmail.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2012-11-26mfd: stmpe-i2c: Move .driver structure fields inside {} in stmpe_i2c_driverViresh Kumar
Currently, few fields in stmpe_i2c_driver are initialized as: .driver.owner = THIS_MODULE, Group them under {}, like: .driver = { .owner = THIS_MODULE, ... }, Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2012-11-26mfd: Simplify IRQ domain registration code in STMPELee Jones
Historically, a driver would have to decide whether it required a Linear or Legacy IRQ domain when registering one. This can end up as quite a lot of code. A new Simple call now exists which simplifies this process. Let's make use of it here. Reviewed-by: Viresh Kumar <viresh.kumar@linaro.org> Signed-off-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2012-11-26mfd: rc5t583: Fix array subscript is above array boundsAxel Lin
I got below build warning while compiling this driver. It's obviously RC5T583_MAX_INTERRUPT_MASK_REGS is 9 but irq_en_add array only has 8 elements. CC drivers/mfd/rc5t583-irq.o drivers/mfd/rc5t583-irq.c: In function 'rc5t583_irq_sync_unlock': drivers/mfd/rc5t583-irq.c:227: warning: array subscript is above array bounds drivers/mfd/rc5t583-irq.c: In function 'rc5t583_irq_init': drivers/mfd/rc5t583-irq.c:349: warning: array subscript is above array bounds Since the number of interrupt enable registers is 8, this patch adds define for RC5T583_MAX_INTERRUPT_EN_REGS to fix this bug. Signed-off-by: Axel Lin <axel.lin@ingics.com> Acked-by: Laxman Dewangan <ldewangan@nvidia.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2012-11-26mfd: viperboard: Do version query in dma memoryLars Poeschel
The query for the viperboard version was done with memory buffer on the stack but usb transfers need dma capable memory buffer. This is fixed now. Signed-off-by: Lars Poeschel <poeschel@lemonage.de> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2012-11-26MFD: ti_am335x_tscadc: Pass correct error messagePatil, Rachna
Pass on the correct error message from platform_get_irq() instead of hard coding it to "EINVAL". Also change label from "err" to "ret" for better readability and update the same in error path. Signed-off-by: Patil, Rachna <rachna@ti.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2012-11-26mfd: sec: Fix reg_offset for interrupt registersInderpal Singh
reg_offset is offset of the status/mask registers. Now, since status_base and mask_base are pointing to corresponding first registers, reg_offset should start from 0 otheriwse regmap_add_irq_chip will fail during probe. Signed-off-by: Inderpal Singh <inderpal.singh@linaro.org> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2012-11-23mfd: wm8994: Add support for WM1811 rev EMark Brown
This is supported identically to the previous revisions. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Cc: stable@vger.kernel.org Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2012-11-23Documentation: Fix historical inconsistency in STMPE DT docLee Jones
Previously a generic binding 'i2c-client-wake' was created which enabled I2C devices to register themselves as wake-up devices. This binding was later over-thrown by 'wakeup-source'. The STMPE driver was fixed-up, but the document was neglected. This patch aims to rectify that. Cc: Samuel Ortiz <sameo@linux.intel.com> Cc: devicetree-discuss@lists.ozlabs.org Signed-off-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2012-11-23mfd: ab8500-core: Add abx500-clk as an mfd child deviceUlf Hansson
Hierarchically, the abx500-clk shall be considered as a child of the ab8500 core. The abx500-clk is intiated at arch init and thus the clks will be available when clients needs them. Cc: Samuel Ortiz <sameo@linux.intel.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2012-11-23mfd: Add an AS3711 PMIC MFD driverGuennadi Liakhovetski
AS3711 is a PMIC with multiple DCDC and LDO power supplies, GPIOs, an RTC, a battery charger and a general purpose ADC. This patch adds support for the MFD with support for a regulator driver and a backlight driver. Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2012-11-23mfd: stmpe: Use devm_*() routinesViresh Kumar
This patch frees stmpe driver from tension of freeing resources. devm_* derivatives of multiple routines are used while allocating resources, which would be freed automatically by kernel. Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org> Acked-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2012-11-21mfd: lpc_ich: One uninitialized cell is no errorPaul Bolle
At every boot of an (outdated) laptop lpc_ich prints an error: lpc_ich 0000:00:1f.0: I/O space for GPIO uninitialized But if one looks at lpc_ich's probe function one notices that the code only cares if both lpc_ich_init_wdt() and lpc_ich_init_gpio() fail to add any cells. So stop treating the failure to add a single cell as an error. Those messages can be printed at notice level. And then only warn if no cells were added. Signed-off-by: Paul Bolle <pebolle@tiscali.nl> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2012-11-21mfd: lpc_ich: Fix resource request for [mem 0x00000000]Peter Hurley
The older southbridges supported by the lpc_ich driver do not provide memory-mapped space of the root complex. The driver correctly avoids computing the iomem address in this case, yet submits a zeroed resource request anyway (via mfd_add_devices()). Remove the iomem resource from the resource array submitted to the mfd core for the older southbridges. Acked-by: Aaron Sierra <asierra@xes-inc.com> Cc: Peter Tyser <ptyser@xes-inc.com> Signed-off-by: Peter Hurley <peter@hurleysoftware.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2012-11-21mfd: twl-core: Change TWL4030_MODULE_* ids to TWL_MODULE_*Peter Ujfalusi
To facilitate upcoming cleanup in twl stack. No functional changes. Acked-by: Tero Kristo <t-kristo@ti.com> Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2012-11-21mfd: twl4030-irq: Change TWL4030_MODULE_* ids to TWL_MODULE_*Peter Ujfalusi
To facilitate upcoming cleanup in twl stack. No functional changes. Acked-by: Tero Kristo <t-kristo@ti.com> Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2012-11-21mfd: twl4030-power: Change TWL4030_MODULE_* ids to TWL_MODULE_*Peter Ujfalusi
To facilitate upcoming cleanup in twl stack. No functional changes. Acked-by: Tero Kristo <t-kristo@ti.com> Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2012-11-21mfd: twl4030-madc: Change TWL4030_MODULE_* ids to TWL_MODULE_*Peter Ujfalusi
To facilitate upcoming cleanup in twl stack. No functional changes. Acked-by: Tero Kristo <t-kristo@ti.com> Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2012-11-21mfd: twl-core: re-group the twl_mapping table for easier readingPeter Ujfalusi
Group the twl_mapping table in 5 lines chunks so it is more easier to find the row we are looking for (if we need to). Acked-by: Tero Kristo <t-kristo@ti.com> Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2012-11-21mfd: twl: Use decimal numbers for TWL6030_MODULE_IDsPeter Ujfalusi
It is easier fro humans to understand decimal numbers than hexadecimals when they are used as indexes. Acked-by: Tero Kristo <t-kristo@ti.com> Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2012-11-21mfd: twl: Convert module id definitions to enumsPeter Ujfalusi
Use enum list for the module definitions (TWL4030_MODULE_*) which will ease up future work with the IDs. At the same time group the IDs in block of five so it is easier to find the ID we are looking for (to count the number they stand for). At the same time define TWL_MODULE_LED so client drivers can switch to use it as soon as it is possible. Acked-by: Tero Kristo <t-kristo@ti.com> Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2012-11-21mfd: twl: Remove unused TWL_MODULE definitionsPeter Ujfalusi
AUDIO and MADC only available on twl4030 series and the TWL_MODULE_* mapping is not needed. Acked-by: Tero Kristo <t-kristo@ti.com> Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2012-11-21mfd: twl-core: Clean up and correct child registrationPeter Ujfalusi
Make the twl child registration calls a bit more uniform by always using the SUB_CHIP_ID* define instead of the mixed use of the define and magic number. At the same time correct the following devices so they are registered for the correct parent device (i2c slave): twl4030_wdt is accessible on 0x4b address and not 0x48 twl4030_pwrbutton is accessible on 0x4b address and not 0x49 twl4030-audio is on 0x49 all the time Acked-by: Tero Kristo <t-kristo@ti.com> Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2012-11-21mfd/rtc/gpio: twl: No need to allocate bigger buffer for writePeter Ujfalusi
Since the twl-core has been converted to use regmap it is no longer needed to allocate bigger buffer for data when writing to twl. CC: Grant Likely <grant.likely@secretlab.ca> CC: Alessandro Zummo <a.zummo@towertech.it> Acked-by: Linus Walleij <linus.walleij@linaro.org> Acked-by: Tero Kristo <t-kristo@ti.com> Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2012-11-21mfd: twl-core: Convert to use regmap for I/OPeter Ujfalusi
Remove the custom code to do I/O and replace it with standard regmap calls. Reviewed-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Tero Kristo <t-kristo@ti.com> Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2012-11-21mfd: twl-core: Support for proper PWM driversPeter Ujfalusi
The twl6030-pwm driver is going to be deleted since it was only able to control the Charging indicator LED on the twl6030 PMIC. The new set of drivers are going to provide support for both PWMs and PWM driven LED outputs on TWL4030 and TWL6030 PMICs. The twl-pwm driver will handle the PWMs (2 instance) while the twl-pwmled driver is to control the two LED instance on TWL4030 and to charging indicator LED (1 instance) on TWL6030. Acked-by: Tero Kristo <t-kristo@ti.com> Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2012-11-21mfd: twl-core: Register twl4030-madc child only for twl4030 classPeter Ujfalusi
twl4030-madc driver can only handle twl4030 class MADC. The newer revisions of twl does not have MADC, instead they have different IP called GPADC which is not backward compatible. Acked-by: Tero Kristo <t-kristo@ti.com> Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2012-11-21mfd: Introduce retu-mfd driverAaro Koskinen
Retu is a multi-function device found on Nokia Internet Tablets implementing at least watchdog, RTC, headset detection and power button functionality. This patch implements minimum functionality providing register access, IRQ handling and power off functions. Acked-by: Felipe Balbi <balbi@ti.com> Acked-by: Tony Lindgren <tony@atomide.com> Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2012-11-21mfd: twl6040: Remove duplicate inclusion of linux/err.hSachin Kamat
linux/err.h was included twice. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2012-11-21mfd: wm5102: Make FLL NCO test registers readableMark Brown
They contain documented status readback fields. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2012-11-21mfd: tps65217: Set PMIC to shutdown on PWR_EN toggleColin Foe-Parker
Set tps65217 PMIC status to OFF if power enable toggle is supported. By setting this bit to 1 to enter PMIC to OFF state when PWR_EN pin is pulled low. Also adds a DT flag to specify that device pmic supports shutdown control or not. Signed-off-by: Colin Foe-Parker <colin.foeparker@logicpd.com> [anilkumar@ti.com: move the additions to tps65217 MFD driver] Signed-off-by: AnilKumar Ch <anilkumar@ti.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2012-11-21mmc: rtsx: Explicitely include slab.h in rtsx_pci_sdmmc.cWei WANG
This fixes the following build error on some architectures (parisc at least): drivers/mmc/host/rtsx_pci_sdmmc.c: In function 'sd_normal_rw': drivers/mmc/host/rtsx_pci_sdmmc.c:448:2: error: implicit declaration of function 'kzalloc' [-Werror=implicit-function-declaration] drivers/mmc/host/rtsx_pci_sdmmc.c:448:6: warning: assignment makes pointer from integer without a cast [enabled by default] drivers/mmc/host/rtsx_pci_sdmmc.c:472:2: error: implicit declaration of function 'kfree' [-Werror=implicit-function-declaration] 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>
2012-11-21mmc: rtsx: Configure SD_CFG2 register in sd_rw_multiWei WANG
For Realtek card reader, internal regsiter SD_CFG2 should be configured before transferring data. The default value of SD_CFG2 is proper for writing data. But for reading sequence, the timing is not good enough. So in some extreme circumstance, card reader may sample the response data from the card as good even if the data is wrong. And this will cause the bad consequence. In the prior version, the value of this register has been calculated, but forgotten to write back to the internal register. 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>
2012-11-21mfd: tps65090: Use regmap irq framework for interrupt supportLaxman Dewangan
Use the regmap irq framework for implementing TPS65090 interrupt support in place of implementing it locally. Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2012-11-21mfd: tps65090: Move register access APIs to headerLaxman Dewangan
Since tps65090 register is accessed via regmap, moving the register access APIs to header and making it as inline. Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2012-11-21mfd: tps65090: Remove unused member of struct tps65090Laxman Dewangan
Remove unused member from tps65090 data structure as these are not used. Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2012-11-21mfd: tps65090: Add error prints when mem alloc failedLaxman Dewangan
Add error prints when memory allocation failed for tps65090 data. Also cleanups the melloc arguments. Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2012-11-21mfd: Add battery charger in tps65090 sub devsLaxman Dewangan
TPS65090 supports the battery charging and hence adding the device name in the list of TPS65090 children. Also remove the tps65090-regulator as it duplicates with tps65090-pmic for regulator driver. Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2012-11-21mfd: Add TI TPS80031 mfd core driverLaxman Dewangan
TPS80031/ TPS80032 Fully Integrated Power Management with Power Path and Battery Charger. The device provides five configurable step-down converters, 11 general purpose LDOs, USB OTG Module, ADC, RTC, 2 PWM, System Voltage Regulator/Battery Charger with Power Path from USB, 32K clock generator. Add the mfd core driver for TPS80031/TPS80032. Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Reviwed-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2012-11-20mfd: wm5102: Mark some more status registers as volatileMark Brown
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2012-11-20mfd: wm5102: Update maximum registerMark Brown
The DSP memories are mapped into the register map, make them readable and writable by updating max_register appropriately. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2012-11-20mfd: sta2x11-mfd: Add myself to copyrightDavide Ciminaghi
Signed-off-by: Davide Ciminaghi <ciminaghi@gnudd.com> Acked-by: Alessandro Rubini <rubini@gnudd.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2012-11-20mfd: sta2x11-mfd: Add defines for some sta2x11 sctl registersDavide Ciminaghi
These are required for the clock infrastructure code to properly configure and control the sta2x11 PLLs. Signed-off-by: Davide Ciminaghi <ciminaghi@gnudd.com> Acked-by: Alessandro Rubini <rubini@gnudd.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2012-11-20mfd: sta2x11-mfd: Add scr (otp registers) platform driverDavide Ciminaghi
Signed-off-by: Davide Ciminaghi <ciminaghi@gnudd.com> Acked-by: Alessandro Rubini <rubini@gnudd.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2012-11-20mfd: sta2x11-mfd: Use one lock per device instead of one lock per mfdDavide Ciminaghi
The lock is used to implement atomic operations on each platform device's registers, so it looks reasonable having one lock per device instead of one common lock for all the devices belonging to the same sta2x11 instance. Signed-off-by: Davide Ciminaghi <ciminaghi@gnudd.com> Acked-by: Alessandro Rubini <rubini@gnudd.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2012-11-20mfd: sta2x11-mfd: Do not mind about gpio platform dataDavide Ciminaghi
The gpio platform driver will take care of its platform data, let's not do any checks here. Signed-off-by: Davide Ciminaghi <ciminaghi@gnudd.com> Acked-by: Alessandro Rubini <rubini@gnudd.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2012-11-20mfd: sta2x11-mfd: Only add sta2x11_mfd if it hasn't already been addedDavide Ciminaghi
The pci probe method is called twice now, so we have to call sta2x11_mfd_add() only once to avoid a -EBUSY error. Signed-off-by: Davide Ciminaghi <ciminaghi@gnudd.com> Acked-by: Alessandro Rubini <rubini@gnudd.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>