summaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)Author
2015-10-30mfd: arizona: Use correct type ID for device tree configRichard Fitzgerald
In the case of a device tree config the code uses the device ID from the DT entry to check which codec is required but when storing the ID into struct arizona it was always using the non-DT SPI device table to get an ID. This patch changes the code to store the correct ID into struct arizona. Signed-off-by: Richard Fitzgerald <rf@opensource.wolfsonmicro.com> Acked-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
2015-10-30mfd: arizona: Remove use of codec build config #ifdefsRichard Fitzgerald
Remove the use of #ifdefs around each case statement of the chip ID and type validation switches. We must ensure that the contained code still compiles to nothing if support for that codec was not built into the kernel, to prevent creation of link references to missing functions. So the ifdefs are replaced with a use of the IS_ENABLED() macro. Signed-off-by: Richard Fitzgerald <rf@opensource.wolfsonmicro.com> Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
2015-10-30mfd: arizona: Simplify adding subdevicesRichard Fitzgerald
The code was using a switch on the code type to execute one of several mfd_add_devices() calls. We're already switching on the code type earlier in the function to select the correct patch function so we can roll selection of the mfd device table into the same switch. Signed-off-by: Richard Fitzgerald <rf@opensource.wolfsonmicro.com> Acked-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
2015-10-30mfd: arizona: Downgrade type mismatch messages to dev_warnRichard Fitzgerald
If the declared codec type doesn't match the detected type we issue a log message but carry on registering the device, so a dev_warn() is appropriate rather than a dev_err() Signed-off-by: Richard Fitzgerald <rf@opensource.wolfsonmicro.com> Acked-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
2015-10-30mfd: arizona: Factor out checking of jack detection stateRichard Fitzgerald
Currently runtime_suspend will fully power off the codec if the jack detection is not enabled. Not all future codecs will have jack detection so to prepare for these codecs this patch factors out the check so that it be called as needed in the existing codec-specific switch cases. Signed-off-by: Richard Fitzgerald <rf@opensource.wolfsonmicro.com> Acked-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
2015-10-30mfd: arizona: Factor out DCVDD isolation controlRichard Fitzgerald
Currently DCVDD isolation is enabled and disabled for runtime_suspend and runtime_resume. Future codecs will not have the isolation control so to prepare for these codecs this patch factors out the isolation control allowing it to be called as needed in the existing codec-specific switch cases. Signed-off-by: Richard Fitzgerald <rf@opensource.wolfsonmicro.com> Acked-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
2015-10-30mfd: Make TPS6105X select REGMAP_I2CAxel Lin
This is required since commit 7e5071199355 ("mfd: tps6105x: Use i2c regmap to access registers"). Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
2015-10-30mfd: lm3533: Fix unused variable build warningSudip Mukherjee
We were getting build warning about unused variable 'ret'. The commit c749db571dcf has removed the use of ret but missed removing the variable which is unused now. Fixes: c749db571dcf ("mfd: lm3533: Simplify function return logic") Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org> Signed-off-by: Lee Jones <lee.jones@linaro.org>
2015-10-30mfd: rtsx: Add support for rts522AMicky Ching
rts522a(rts5227s) is derived from rts5227, and mainly same with rts5227. Add it to file mfd/rts5227.c to support this chip. Signed-off-by: Micky Ching <micky_ching@realsil.com.cn> Signed-off-by: Lee Jones <lee.jones@linaro.org>
2015-10-30mfd: da9062-core: Rename get_device_type to da9062_get_device_typeAxel Lin
Rename get_device_type() to da9062_get_device_type(). This function is only used in this file so make it static. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
2015-10-30mfd: Kconfig: Compile MFD_STW481X with COMPILE_TESTLuis de Bethencourt
The driver depends on ARCH_NOMADIK but there isn't a build dependency so it's a good idea to allow the driver to always be built when the COMPILE_TEST option is enabled. That way, the driver can be built with a config generated by make allyesconfig and check if a patch would break the build. Signed-off-by: Luis de Bethencourt <luisbg@osg.samsung.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
2015-10-30mfd: da9053: Addition of extra registers for GPIOs 8-13Steve Twiss
Definitions for GPIO registers 8, 9, 10, 11, 12 and 13 are added into the register header file. - DA9052_GPIO_8_9_REG 25 - DA9052_GPIO_10_11_REG 26 - DA9052_GPIO_12_13_REG 27 A modification is also made to the MFD core code to define these registers as readable and writable. The functions for da9052_reg_readable() and da9052_reg_writeable() have had their case statements altered to include these new registers. Signed-off-by: Steve Twiss <stwiss.opensource@diasemi.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
2015-10-30mfd: atmel-flexcom: Add a driver for Atmel Flexible Serial Communication UnitCyrille Pitchen
This driver supports the new Atmel Flexcom. The Flexcom is a wrapper which integrates one SPI controller, one I2C controller and one USART. Only one function can be enabled at a time. This driver selects the function once for all, when the Flexcom is probed, according to the value of the new "atmel,flexcom-mode" device tree property. This driver has chosen to present the Flexcom to the system as a MFD so the implementation is seamless for the existing Atmel SPI, I2C and USART drivers. Also the Flexcom embeds FIFOs: the latest patches of the SPI, I2C and USART drivers take advantage of this new feature. Signed-off-by: Cyrille Pitchen <cyrille.pitchen@atmel.com> Acked-by: Boris Brezillon <boris.brezillon@free-electrons.com> Acked-by: Alexandre Belloni <alexandre.belloni@free-electrons.com> Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
2015-10-30mfd: devicetree: Add bindings for Atmel FlexcomCyrille Pitchen
This patch documents the DT bindings for the Atmel Flexcom which will be introduced by sama5d2x SoCs. These bindings will be used by the actual Flexcom driver to be sent in another patch. Signed-off-by: Cyrille Pitchen <cyrille.pitchen@atmel.com> Acked-by: Boris Brezillon <boris.brezillon@free-electrons.com> Acked-by: Alexandre Belloni <alexandre.belloni@free-electrons.com> Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
2015-10-30mfd: atmel-flexcom: Create include file with macros used by DT bindingsCyrille Pitchen
This patch defines some macros to be used as value for the "atmel,flexcom-mode" DT property. This value is then written into the Operating Mode (OPMODE) bit field of the Flexcom Mode Register. Signed-off-by: Cyrille Pitchen <cyrille.pitchen@atmel.com> Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
2015-10-30mfd: intel_soc_pmic_bxtwc: 64 bit bug in bxtwc_val_store()Dan Carpenter
The call to kstrtoul() will corrupt memory on 64 bit systems because an int is 4 bytes and a long is 8. Also it's not a good idea to let users trigger a dev_err() because it just ends up flooding /var/log/messages so I removed the printk. Fixes: 2ddd2086ea9c ('mfd: add Intel Broxton Whiskey Cove PMIC driver') Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
2015-10-30mfd: da9052: Simplify function return logicJavier Martinez Canillas
The invoked functions already return zero on success or a negative errno code so there is no need to open code the logic in the caller. Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com> Acked-by: Adam Thomson <Adam.Thomson.Opensource@diasemi.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
2015-10-30mfd: lm3533: Simplify function return logicJavier Martinez Canillas
The invoked functions already return zero on success or a negative errno code so there is no need to open code the logic in the caller. Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
2015-10-30mfd: da903x: Simplify function return logicJavier Martinez Canillas
The invoked function already returns zero on success or a negative errno code so there is no need to open code the logic in the caller. Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com> Acked-by: Adam Thomson <Adam.Thomson.Opensource@diasemi.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
2015-10-30mfd: rtsx: Simplify function return logicJavier Martinez Canillas
The invoked functions already return zero on success or a negative errno code so there is no need to open code the logic in the caller. Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
2015-10-30mfd: kempld-core: Simplify function return logicJavier Martinez Canillas
The invoked functions already return zero on success or a negative errno code so there is no need to open code the logic in the caller. Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
2015-10-30mfd: pcf50633: Remove unneded ret variableJavier Martinez Canillas
The ret variable is not needed since is not used in the function. Remove the variable and just return 0 instead. Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
2015-10-30mfd: arizona: Remove unneded ret variableJavier Martinez Canillas
The ret variable is not needed since is not used in the function. Remove the variable and just return 0 instead. Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com> Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
2015-10-30mfd: htc-i2cpld: Remove unneded ret variableJavier Martinez Canillas
The ret variable is not needed since is not used in the function. Remove the variable and just return 0 instead. Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
2015-10-30mfd: tps6105x: Fix possible NULL pointer accessGrigoryev Denis
tps6105 driver provides two cells. One is for GPIO and another one is for selected mode depending on platform data. When tps6105x is used in GPIO-only mode, this driver calls mfd_add_devices() with mfd_cell .name == NULL. This value causes an oops in platform_device_register() later. The following patch adds a mfd_cell for each possible mode thereby excluding .name assignment in runtime. Signed-off-by: Denis Grigoryev <grigoryev@fastwel.ru> Signed-off-by: Lee Jones <lee.jones@linaro.org>
2015-10-30mfd: qcom_rpm: Drop use of IRQF_NO_SUSPEND flagSudeep Holla
The driver handles wakeup irq correctly using irq_set_irq_wake. There's no need to use IRQF_NO_SUSPEND while registering the interrupt. This patch removes the use of IRQF_NO_SUSPEND flag. Signed-off-by: Sudeep Holla <sudeep.holla@arm.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
2015-10-30MAINTAINERS: Remove Samuel Ortiz as MFD MaintainerLee Jones
Signed-off-by: Lee Jones <lee.jones@linaro.org>
2015-10-30platform: x86: PMC IPC depends on ACPILee Jones
This patch solves: on x86_64: when CONFIG_ACPI is not enabled: ../drivers/mfd/intel_soc_pmic_bxtwc.c: In function 'bxtwc_probe': ../drivers/mfd/intel_soc_pmic_bxtwc.c:342:2: error: implicit declaration of function 'acpi_evaluate_integer' [-Werror=implicit-function-declaration] status = acpi_evaluate_integer(handle, "_HRV", NULL, &hrv); ^ Reported-by: Randy Dunlap <rdunlap@infradead.org> Signed-off-by: Lee Jones <lee.jones@linaro.org>
2015-10-30bindings: mfd: cros ec: Document vbc EC propertyEmilio López
Some EC implementations include a small nvram space used to store verified boot context data. This boolean property lets us indicate whether this space is available or not on a specific EC implementation. Signed-off-by: Emilio López <emilio.lopez@collabora.co.uk> Reviewed-by: Javier Martinez Canillas <javier@osg.samsung.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
2015-10-30mfd: lpc_ich: Separate device cells for clarityAaron Sierra
The lpc_ich_cells array gives the wrong impression about the relationship between the watchdog and GPIO devices. They are completely distinct devices, so this patch separates the array into distinct mfd_cell structs per device. A side effect of removing the array, is that the lpc_cells enum is no longer needed. Signed-off-by: Aaron Sierra <asierra@xes-inc.com> Acked-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
2015-10-30mfd: add Intel Broxton Whiskey Cove PMIC driverQipeng Zha
Add MFD core driver for Intel Broxton Whiskey Cove PMIC, which is specially accessed by hardware IPC, not a generic I2C device Signed-off-by: Qipeng Zha <qipeng.zha@intel.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
2015-10-30mfd: intel_soc_pmic: Add support for Broxton WC PMICQipeng Zha
IRQ control registers of Intel Broxton Whisky Cove PMIC are separated in two parts, so add secondary IRQ chip. And the new member of device will be used in PMC IPC regmap APIs. Signed-off-by: Qipeng Zha <qipeng.zha@intel.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
2015-10-26mfd: rt5033: Remove unnecessary MODULE_ALIAS()Javier Martinez Canillas
The driver has a I2C device id table that is used to create the module aliases which already contains a "rt5033". So the alias is not needed. Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
2015-10-26mfd: bcm590xx: Remove unnecessary MODULE_ALIAS()Javier Martinez Canillas
The driver has a I2C device id table that is used to create the module aliases and also "bcm590xx" isn't a supported I2C id, so it's never used. Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
2015-10-26mfd: tps65217: Add battery charger as subdeviceEnric Balletbo i Serra
Add tps65217 battery charger subdevice. Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
2015-10-26mfd: wm8998: Fixup register defaults/readablesCharles Keepax
Remove defaults for a bunch of volatile registers and remove ARIZONA_CTRL_IF_SPI_CFG_1 from the readable list since it doesn't exist on wm8998 which is I2C only. Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
2015-10-26mfd: arizona: Add register bits to support the ANC blockCharles Keepax
Some Arizona devices have a hardware ANC block present. This patch adds the registers necessary to configure this hardware block. Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
2015-10-26mfd: arizona: Fix typo in arizona_irq_mapCharles Keepax
The type of the data for the main Arizona IRQ chip should be struct arizona not struct regmap_irq_chip_data. The bug is harmless but should probably be corrected anyway. Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
2015-10-26mfd: wm831x: Fix possible NULL pointer dereferenceJavier Martinez Canillas
The driver always checks for pdata being NULL except in one place. Add a check to prevent a possible NULL pointer deference error. Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com> Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
2015-10-26mfd: s2mps11: Add manual shutdown method for Odroid XU3Krzysztof Kozlowski
On Odroid XU3 board (with S2MPS11 PMIC) the PWRHOLD bit in CTRL1 register must be manually set to 0 before initiating power off sequence. One of usual power down methods for Exynos based devices looks like: 1. PWRHOLD pin of PMIC is connected to PSHOLD of Exynos SoC. 2. Exynos holds up this pin during system operation. 3. ACOKB pin of PMIC is pulled up to VBATT and optionally to pin in other device. 4. When PWRHOLD/PSHOLD goes low, the PMIC will turn off the power if ACOKB goes high. On Odroid XU3 family the difference is in (3) - the ACOKB is grounded. This means that PMIC must manually set PWRHOLD field to low and then wait for signal from Application Processor (the usual change in PWRHOLD/PSHOLD pin will actually cut off the power). The patch adds respective binding allowing Odroid XU3 device to be powered off. Signed-off-by: Krzysztof Kozlowski <k.kozlowski.k@gmail.com> Reported-by: Anand Moon <linux.amoon@gmail.com> Tested-by: Anand Moon <linux.amoon@gmail.com> Reviewed-by: Javier Martinez Canillas <javier@osg.samsung.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
2015-10-26mfd: intel-lpss: Use writeq() helperAndy Shevchenko
There are already helper functions to do 64-bit I/O on 32-bit machines, thus we don't need to reinvent the wheel. In our case we can't use readq() / writeq() even on 64-bit kernel since there is a hardware limitation (OCP bus is a 32-bit bus). Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
2015-10-26mfd: sm501: Fix module autoload for OF platform driverLuis de Bethencourt
This platform driver has a OF device ID table but the OF module alias information is not created so module autoloading won't work. Signed-off-by: Luis de Bethencourt <luisbg@osg.samsung.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
2015-10-26mfd: max8997: Fix module autoload for OF platform driverLuis de Bethencourt
This platform driver has a OF device ID table but the OF module alias information is not created so module autoloading won't work. Signed-off-by: Luis de Bethencourt <luisbg@osg.samsung.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
2015-10-26mfd: hi6421-pmic: Fix module autoload for OF platform driverLuis de Bethencourt
This platform driver has a OF device ID table but the OF module alias information is not created so module autoloading won't work. Signed-off-by: Luis de Bethencourt <luisbg@osg.samsung.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
2015-10-26mfd: atmel-hlcdc: Fix module autoload for OF platform driverLuis de Bethencourt
This platform driver has a OF device ID table but the OF module alias information is not created so module autoloading won't work. Signed-off-by: Luis de Bethencourt <luisbg@osg.samsung.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
2015-10-26mfd: Fixup clients of multi_reg_write/register_patchNariman Poushin
Introduced by: commit 8019ff6cfc04 ("regmap: Use reg_sequence for multi_reg_write / register_patch") Interacting with: commit 561629755a21 ("mfd: arizona: Add support for WM8998 and WM1814") commit 81207880cef2 ("mfd: wm5110: Add register patch for rev E and above") Signed-off-by: Nariman Poushin <nariman@opensource.wolfsonmicro.com> Acked-by: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
2015-10-26mfd: stmpe: PWM on 24xx has altfunc 1Linus Walleij
On the STMPE2401 and STMPE2401 altfunction 1 corresponds to the PWM channels. This oneliner was missing in the case-switch, making it impossible to enable the PWM channel output. Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Lee Jones <lee.jones@linaro.org>
2015-10-26mfd: twl6040: Fix deferred probe handling for clk32kTony Lindgren
Commit 68bab8662f49 ("mfd: twl6040: Optional clk32k clock handling") added clock handling for the 32k clock from palmas-clk. However, that patch did not consider a typical situation where twl6040 is built-in, and palmas-clk is a loadable module like we have in omap2plus_defconfig. If palmas-clk is not loaded before twl6040 probes, we will get a "clk32k is not handled" warning during booting. This means that any drivers relying on this clock will mysteriously fail, including omap5-uevm WLAN and audio. Note that for WLAN, we probably should also eventually get the clk32kgaudio for MMC3 directly as that's shared between audio and WLAN SDIO at least for omap5-uevm. It seems the WLAN chip cannot get it as otherwise MMC3 won't get properly probed. Fixes: 68bab8662f49 ("mfd: twl6040: Optional clk32k clock handling") Signed-off-by: Tony Lindgren <tony@atomide.com> Reviewed-by: Felipe Balbi <balbi@ti.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
2015-10-26mfd: 88pm80x: Add 88pm860 chip type supportVaibhav Hiremath
Add chip identification support for 88PM860 device to the pm80x_chip_mapping table. Signed-off-by: Vaibhav Hiremath <vaibhav.hiremath@linaro.org> Reviewed-by: Krzysztof Kozlowski <k.kozlowski@samsung.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
2015-10-26mfd: cros_ec_i2c: Add OF match tableJavier Martinez Canillas
The Documentation/devicetree/bindings/mfd/cros-ec.txt DT binding doc lists "google,cros-ec-i2c" as a compatible string but the corresponding driver does not have an OF match table. Add the table to the driver so the I2C core can do an OF style match. Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>