summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2012-09-28mfd: wm5110: Disable control interface error report for WM5110 rev BMark Brown1-0/+1
It can misreport. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2012-09-25mfd: max8907: Remove regulator-compatible from DT docsStephen Warren1-16/+8
Commit "regulator: deprecate regulator-compatible DT property" deprecated the use of the regulator-compatible DT property. Update the DT example in the MAX8907 binding documentation to reflect this. Signed-off-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2012-09-25backlight: Add TPS65217 WLED driverMatthias Kaehlcke4-0/+378
The TPS65217 chip contains a boost converter and current sinks which can be used to drive LEDs for use as backlights. Expose this functionality via the backlight API. Tested on an AM335x based custom board with a single WLED string, using different values for ISEL and FDIM (though it would be hard to tell the difference except for the value in WLEDCTRL1). Both instantiation through the device tree and by passing platform data have been tested. Testing has been done with an Androidized 3.2 kernel from the rowboat project. Koen Kooi reported the driver to be working on a Beaglebone board with LCD3 cape Signed-off-by: Matthias Kaehlcke <matthias@kaehlcke.net> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2012-09-24mfd: Add backlight as subdevice to the tps65217Matthias Kaehlcke1-0/+3
mfd: Add backlight as subdevice to the tps65217 Signed-off-by: Matthias Kaehlcke <matthias@kaehlcke.net> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2012-09-24mfd: Provide the PRCMU with its own IRQ domainLee Jones1-12/+35
The PRCMU has its own USB, Thermal, GPIO, Modem, HSI and RTC drivers, amongst other things. This patch allows those subordinate devices to use it as an interrupt controller as and when they are DT enabled. 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-09-23mfd: Fix max8907 sparse warningFengguang Wu1-1/+1
This fixes: drivers/mfd/max8907.c:179:16: sparse: symbol 'max8907_pm_off' was not declared. Should it be static? Signed-off-by: Fengguang Wu <fengguang.wu@intel.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2012-09-23mfd: Add lp8788 mfd driverMilo Kim6-0/+871
TI LP8788 PMU provides regulators, battery charger, ADC, RTC, backlight driver and current sinks. This MFD patch supports the I2C communication using the regmap, the interrupt handling using the linear IRQ domain and configurable platform data structures for each driver module. (Driver Architecture) < mfd devices > LP8788 HW .......... mfd .......... regulator drivers I2C power supply driver IRQs iio adc driver rtc driver backlight driver current sink drivers o regulators : LDOs and BUCKs o power supply : Battery charger o iio adc : Battery voltage/temperature o rtc : RTC and alarm o backlight o current sink : LED and vibrator All MFD device modules are registered by LP8788 MFD core driver. For sharing information such like the virtual IRQ number, MFD core driver uses the resource structure. Then each module can retrieve the specific IRQ number and detect it in the IRQ thread. Configurable platform data is handled in each driver module. Signed-off-by: Milo(Woogyom) Kim <milo.kim@ti.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2012-09-23mfd: dbx500: Provide a more accurate smp_twd clockMichel Jaouen3-1/+45
The local timer clock is based on ARM subsystem clock. This patch obtains a more exact value of that clock by reading PRCMU registers. Using this increases the accuracy of the local timer events. Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org> Signed-off-by: Rickard Andersson <rickard.andersson@stericsson.com> Signed-off-by: Michel Jaouen <michel.jaouen@stericsson.com> Acked-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2012-09-23mfd: rc5t583: Fix warning messagesVenu Byravarasu2-2/+2
Two variables named master_int and sleepseq_val, were just declared without initialization. Pointers to these variables were passed to mfd read function. After that these variables were used for some of the logical operations. Though logically there is nothing wrong, compiler is complaining that the variables may be used uninitialized. Hence fixing these warning messages by initializing them. Signed-off-by: Venu Byravarasu <vbyravarasu@nvidia.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2012-09-23regulator: palmas: Add DT supportGraeme Gregory1-8/+119
Add DT support to palmas regulator. This involved a little change to the platform data structure. Regulator information can now come from platform data or DT. Signed-off-by: Graeme Gregory <gg@slimlogic.co.uk> Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2012-09-23mfd: palmas: Change regulator defns to better suite DTGraeme Gregory1-30/+30
In order to better fit DT parsing in of regulator definitions re-arrange the platform data struct slightly which requires the definitions of the regulator IDs earlier in the include file. Signed-off-by: Graeme Gregory <gg@slimlogic.co.uk> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2012-09-23mfd: palmas: Add device tree handling to mfdGraeme Gregory1-0/+52
Add device tree handling to the palmas MFD. This takes the values that can be set from platform data from the device tree nodes instead. Signed-off-by: Graeme Gregory <gg@slimlogic.co.uk> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2012-09-23mfd: palmas: Add pdata/data for rest of childrenGraeme Gregory2-0/+185
Add the platform data and data structures for children that shall be added by a future set of commits. Signed-off-by: Graeme Gregory <gg@slimlogic.co.uk> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2012-09-21mfd: palmas: Switch to linear domain in all casesGraeme Gregory1-63/+1
Swith the palmas to linear domain in all cases so in future DT and non DT cases will work the same. With this patch children no longer need IRQ resources as it's easier for them to use regmap_get_virq. So we can remove the resources definitions. Signed-off-by: Graeme Gregory <gg@slimlogic.co.uk> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2012-09-21mfd: palmas: Improve the error exit pathGraeme Gregory1-8/+11
Improve the error exit path so that we correctly de-allocate resources that have been allocated upto the point where error occurs. Signed-off-by: Graeme Gregory <gg@slimlogic.co.uk> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2012-09-21mfd: ab8500-core: Apply the AB8500 CODEC's compatible string to its MFD cellLee Jones1-0/+1
Provide a compatible string for the AB8500 CODEC to aid in configuration property look-up from its associated Device Tree node. Signed-off-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2012-09-21mfd: Use devm_* APIs for mc13xxx: remove leftover kfreeAndreas Pretzsch1-1/+0
commit e7c706b1e5ccf28eaaf76c7a4613e80b0ca52863 migrated the allocation of struct mc13xxx to devm_* functions, but left a kfree(mc13xxx) in the mc13xxx_common_init error path. Remove it to prevent memory corruption. Signed-off-by: Andreas Pretzsch <apr@cn-eng.de> Reviewed-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2012-09-21mfd: Convert struct i2c_msg initialization to C99 formatShubhrajyoti D1-2/+12
Convert the struct i2c_msg initialization to C99 format. This makes maintaining and editing the code simpler. Also helps once other fields like transferred are added in future. Thanks to Julia Lawall <julia.lawall@lip6.fr> for automating the conversion Signed-off-by: Shubhrajyoti D <shubhrajyoti@ti.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2012-09-21mfd: omap-usb-host: Remove TLL specific code from USB HS core driverKeshava Munegowda2-230/+32
The TLL specific code such as channels clocks enable/disable, initialization functions are removed from the USBHS core driver. The hwmod of the usb tll is retrieved and omap device build is performed to created the platform device for the usb tll component. Signed-off-by: Keshava Munegowda <keshava_mgowda@ti.com> Reviewed-by: Partha Basak <parthab@india.ti.com> Acked-by: Felipe Balbi <balbi@ti.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2012-09-21mfd: omap-usb-host: Invoke the TLL driver from USB HS core driverKeshava Munegowda2-2/+6
The usbhs driver invokes the enable/disable APIs of the usb tll driver in the runtime resume/suspend callbacks of the runtime get sync and put sync of the usbhs driver. Signed-off-by: Keshava Munegowda <keshava_mgowda@ti.com> Reviewed-by: Partha Basak <parthab@india.ti.com> Acked-by: Felipe Balbi <balbi@ti.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2012-09-21mfd: omap-usb-tll: HOST TLL platform driverKeshava Munegowda4-2/+479
The platform driver for the TLL component of the OMAP USB host controller is implemented. Depending on the TLL hardware revision , the TLL channels are configured. The USB HS core driver uses this driver through exported APIs from the TLL platform driver. usb_tll_enable and usb_tll_disble are the exported APIs of the USB TLL platform driver. Signed-off-by: Keshava Munegowda <keshava_mgowda@ti.com> Reviewed-by: Partha Basak <parthab@india.ti.com> Acked-by: Felipe Balbi <balbi@ti.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2012-09-19mfd: tps65090: Remove redundant checkVenu Byravarasu1-1/+1
Remove redundant check in is_volatile_reg(). Signed-off-by: Venu Byravarasu <vbyravarasu@nvidia.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2012-09-19mfd: 88pm860x: Move initilization codeHaojian Zhuang3-167/+159
Move probe() and other functions from 88pm860x-i2c.c to 88pm860x-core.c. Since it could benefit to handle DT information. Signed-off-by: Haojian Zhuang <haojian.zhuang@gmail.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2012-09-19mfd: 88pm860x: Avoid to check resource for preg regulatorHaojian Zhuang2-20/+20
Since PREG regulator is the only one regulator in 88PM8606, and other regulators are in 88PM8607. Checking resource as identifying regulator is not a good way. We can use NULL resource to indentify PREG regulator. Signed-off-by: Haojian Zhuang <haojian.zhuang@marvell.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2012-09-19regulator: 88pm860x: Add pre-regulator support for 88pm860x regulatorJett.Zhou1-0/+66
Pre-regulator of 88pm8606 is mainly for support charging based on vbus, it needs to be enabled for charging battery, and will be disabled in some exception condition like over-temp. Add the pre-regulator support for 88pm860x regulator driver. Signed-off-by: Jett.Zhou <jtzhou@marvell.com> Acked-by: Haojian Zhuang <haojian.zhuang@gmail.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2012-09-19mfd: max8925: Remove array in regulator platform dataHaojian Zhuang3-93/+356
Remove array in parent's platform data. Use struct regulator_init_data as regulator device's platform data directly. So a lot of pdata are added into parent's platform data. And voltage out register offset is used as IORESOURCE_REG to distinguish different regualtor devices. Signed-off-by: Haojian Zhuang <haojian.zhuang@gmail.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2012-09-19mfd: max8925: Use register offset as REG in backlightHaojian Zhuang2-55/+55
Remove the register offset definition. All these register offset are transfered as IORESOURCE_REG resources. Signed-off-by: Haojian Zhuang <haojian.zhuang@gmail.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2012-09-19gpio: Add basic support for TWL6040 GPOsPeter Ujfalusi3-0/+145
TWL6040 provides GPO lines to be used for controlling external devices.The number of lines different between versions: twl6040 have 3 GPO while TWL6041 have 1. Signed-off-by: Sergio Aguirre <saaguirre@ti.com> Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Acked-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2012-09-19mfd: twl6040: Add twl6040-gpio childPeter Ujfalusi3-4/+29
Add needed platform data structure and code to be able to load the GPO child of twl6040. Update the devicetree binding documentation at the same time. Signed-off-by: Sergio Aguirre <saaguirre@ti.com> Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2012-09-19mfd: twl6040: Fix GPO maskPeter Ujfalusi1-1/+1
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2012-09-19mfd: Use IRQF_ONESHOT for max8925Fengguang Wu1-2/+2
Generated by: scripts/coccinelle/misc/irqf_oneshot.cocci Make sure threaded IRQs without a primary handler are always request with IRQF_ONESHOT. Signed-off-by: Fengguang Wu <fengguang.wu@intel.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2012-09-19mfd: Use IRQF_ONESHOT for twl6040Fengguang Wu1-1/+1
Generated by: scripts/coccinelle/misc/irqf_oneshot.cocci Make sure threaded IRQs without a primary handler are always request with IRQF_ONESHOT. Signed-off-by: Fengguang Wu <fengguang.wu@intel.com> Acked-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2012-09-19mfd: Use IRQF_ONESHOT for 88pm860xFengguang Wu1-1/+1
Generated by: scripts/coccinelle/misc/irqf_oneshot.cocci Make sure threaded IRQs without a primary handler are always request with IRQF_ONESHOT. Signed-off-by: Fengguang Wu <fengguang.wu@intel.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2012-09-19mfd: max8907: Add power off controlStephen Warren3-0/+28
Add DT property "maxim,system-power-controller" to indicate whether the PMIC is in charge of controlling the system power. If this is set, the driver will provide the pm_power_off() function. Signed-off-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2012-09-19pwm: Move TWL6030 PWM driver to PWM frameworkThierry Reding6-61/+86
This commit moves the driver to drivers/pwm and converts it to the new PWM framework. In order for this to work properly, register the PWM as child of the multi-function TWL6030 device. Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de> Acked-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2012-09-19mfd: twl: Replace twl_has_*() macros by IS_ENABLED()Thierry Reding1-92/+25
Instead of reinventing macros for the same purpose, use the standard macros. Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de> Acked-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2012-09-18input: twl4030-vibra: Support for DT booted kernelPeter Ujfalusi1-2/+16
Add support when the kernel has been booted with DT blob. In this case the pdata is NULL, we need to reach up to the core node and check if the codec part has been enabled to determine if we need to coexist with the codec or not. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2012-09-18mfd: twl4030-audio: Add DT supportPeter Ujfalusi2-7/+93
Support for loading the twl4030 audio module via devicetree. Sub devices for codec and vibra will be created as mfd devices once the core MFD driver is loaded when the kernel is booted with a DT blob. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2012-09-18dt: Add empty of_find_node_by_name() functionPeter Ujfalusi1-0/+6
This commit adds an empty of_find_node_by_name() function for !CONFIG_OF builds. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2012-09-18mfd: twl4030-audio: Get audio MCLK via twl-core API instead of pdataPeter Ujfalusi1-1/+1
twl-core has API to get the boot time configured HFCLK rate which has the same rate as the audio MCLK. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2012-09-18mfd: twl-core: Add API to query the HFCLK ratePeter Ujfalusi2-0/+33
CFG_BOOT register's HFCLK_FREQ field hold information about the used HFCLK frequency. Add possibility for users to get the configured rate based on this register. This register was configured during boot, without it the chip would not operate correctly, so we can trust on this information. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2012-09-18mfd: twl4030-audio: Rearange and clean-up the probe functionPeter Ujfalusi1-18/+16
To facilitate the device tree support the probe function need to be rearanged. Small cleanup in the APLL frequency selection part as well. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2012-09-18mfd: twl4030-audio: Convert to use devm_kzallocPeter Ujfalusi1-9/+6
To clean up the module probe and remove functions. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2012-09-18mfd: twl4030-audio: Clean up MODULE_* and platform_driver partPeter Ujfalusi1-4/+4
Place the MODULE_* lines in the same block and add MODULE_DESCRIPTION. Rearange the platform_driver structure at the same time. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2012-09-18mfd: Use the AB8500's IRQ domain to convert hwirq to virqLee Jones1-1/+2
Before the AB8500 had its own IRQ domain, the IRQ handler would take the fired local IRQ (hwirq) and add it to the irq_base to convert it to an IRQ number which Linux would understand (virq). However, the IRQ base is not always used anymore since we can make use of Linear domains. It's better to use the AB8500 hwirq -> virq mapping helper function to convert them instead. That's what we do here. 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-09-17mfd: anatop-mfd: remove anatop driverDong Aisheng4-173/+0
The anatop registers are accessed via syscon now, no one will use mfd anatop driver anymore, remove it. Acked-by: Stephen Warren <swarren@wwwdotorg.org> Signed-off-by: Dong Aisheng <dong.aisheng@linaro.org> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2012-09-17regulator: anatop-regulator: Convert to use syscon to access anatop registerDong Aisheng5-43/+43
Using syscon to access anatop register. Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Stephen Warren <swarren@wwwdotorg.org> Signed-off-by: Dong Aisheng <dong.aisheng@linaro.org> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2012-09-17ARM: imx6q: Add iomuxc gpr support into sysconDong Aisheng2-0/+324
Include headfile for easy using. Acked-by: Stephen Warren <swarren@wwwdotorg.org> Signed-off-by: Dong Aisheng <dong.aisheng@linaro.org> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2012-09-17mfd: Add syscon driver based on regmapDong Aisheng5-0/+228
Add regmap based syscon driver. This is usually used for access misc bits in registers which does not belong to a specific module, for example, IMX IOMUXC GPR and ANATOP. With this driver, client can use generic regmap API to access registers which are registered into syscon. Reviewed-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Stephen Warren <swarren@wwwdotorg.org> Signed-off-by: Dong Aisheng <dong.aisheng@linaro.org> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2012-09-17mfd: Enable the tc3589x for Device TreeLee Jones1-3/+40
Here we provide a means to probe and extract vital information from Device Tree when booting with it enabled. Without this patch sub-devices wouldn't be able to reference the tc3589x from Device Tree. 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>