summaryrefslogtreecommitdiffstats
path: root/drivers/mfd
Commit message (Collapse)AuthorAgeFilesLines
* mfd: max77620: Mask/unmask interrupt before/after servicing itLaxman Dewangan2016-06-291-9/+46
| | | | | | | | | | | | | | | | The programming guidelines of the MAX77620 for servicing interrupt is: 1. When interrupt occurs from PMIC, mask the PMIC interrupt by setting GLBLM. 2. Read IRQTOP and service the interrupt. 3. Once all interrupts has been checked and serviced, the interrupt service routine un-masks the hardware interrupt line by clearing GLBLM. Add the pre and post interrupt service handler for mask and unmask the global interrupt mask bit (for step 1 and 3) as callback from regmap-irq. Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
* mfd: axp20x: Add axp20x-usb-power-supply for axp22x pmicsHans de Goede2016-06-291-0/+10
| | | | | | | Add axp20x-usb-power-supply for axp22x pmics. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
* mfd: altr_a10sr: Add Altera Arria10 DevKit System Resource ChipThor Thayer2016-06-293-0/+182
| | | | | | | | | Add support for the Altera Arria10 Development Kit System Resource chip which is implemented using a MAX5 as a external gpio extender with the regmap framework over a SPI bus. Signed-off-by: Thor Thayer <tthayer@opensource.altera.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
* mfd: tps6507: Fix white space warnings reported by checkpatchBen Copeland2016-06-291-2/+2
| | | | | | | | | | | WARNING: please, no spaces at the start of a line + { "tps6507x", 0 },$ WARNING: please, no spaces at the start of a line + { }$ Signed-off-by: Ben Copeland <ben.copeland@linaro.org> Signed-off-by: Lee Jones <lee.jones@linaro.org>
* mfd: ti_am335x_tscadc: Use SIMPLE_DEV_PM_OPS helper macroAndrew F. Davis2016-06-291-12/+4Star
| | | | | | | Replace ifdefs with SIMPLE_DEV_PM_OPS helper macro. Signed-off-by: Andrew F. Davis <afd@ti.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
* mfd: ti_am335x_tscadc: Remove use of single line functionsAndrew F. Davis2016-06-291-29/+15Star
| | | | | | | | tscadc_readl and tscadc_writel are single line functions and do not save use anything, remove these. Signed-off-by: Andrew F. Davis <afd@ti.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
* mfd: ti_am335x_tscadc: Use variable name for sizeof() operatorAndrew F. Davis2016-06-291-2/+1Star
| | | | | | | | | Fix the code formatting to use the kernel preferred style of using the actual variables to determine the size using the sizeof() operator. Signed-off-by: Andrew F. Davis <afd@ti.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
* mfd: omap-usb-tll: Include omap-usb.hBen Dooks2016-06-291-0/+2
| | | | | | | | | | | | Fix the warnings about the following functions not being declared by including omap-usb.h which declares them: drivers/mfd/omap-usb-tll.c:333:5: warning: symbol 'omap_tll_init' was not declared. Should it be static? drivers/mfd/omap-usb-tll.c:408:5: warning: symbol 'omap_tll_enable' was not declared. Should it be static? drivers/mfd/omap-usb-tll.c:442:5: warning: symbol 'omap_tll_disable' was not declared. Should it be static? Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk> Signed-off-by: Lee Jones <lee.jones@linaro.org>
* mfd: axp20x: Add a 500ms delay at the end of axp20x_power_offHans de Goede2016-06-291-0/+4
| | | | | | | | | | | | | | | | | | The kernel expects the power_off function to not return, and if it does it panics. Add a slight delay after the i2c write which turns off power through the PMIC, to give capacitors etc. some time to drain. Without this the kernel lives on long enough after the poweroff to print the following on the serial console on my Mele A1000G quad: [ 248.583588] reboot: Power down [ 248.600490] Kernel pa With the delay the start of printing "Kernel panic" is gone. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Acked-by: Chen-Yu Tsai <wens@csie.org> Signed-off-by: Lee Jones <lee.jones@linaro.org>
* mfd: max77620: Constify resources tablesAxel Lin2016-06-291-4/+4
| | | | | | | These tables are never modified, so declare them as const. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
* mfd: si476x-i2c: Fix spelling mistake "comptible" -> "compatible"Colin Ian King2016-06-291-1/+1
| | | | | | | trivial fix to spelling mistake in dev_err message Signed-off-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
* mfd: max8925-i2c: Make it explicitly non-modularPaul Gortmaker2016-06-291-13/+1Star
| | | | | | | | | | | | | | | | | | | | | | | The Kconfig currently controlling compilation of this code is: drivers/mfd/Kconfig: config MFD_MAX8925 drivers/mfd/Kconfig: bool "Maxim Semiconductor MAX8925 PMIC Support" ...meaning that it currently is not being built as a module by anyone. Lets remove the modular code that is essentially orphaned, so that when reading the driver there is no doubt it is builtin-only. Since module_init was not in use by this code, the init ordering remains unchanged with this commit. Also note that MODULE_DEVICE_TABLE is a no-op for non-modular code. We also delete the MODULE_LICENSE tag etc. since all that information is already contained at the top of the file in the comments. Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
* mfd: max8997: Make it explicitly non-modularPaul Gortmaker2016-06-291-27/+3Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | The Kconfig currently controlling compilation of this code is: drivers/mfd/Kconfig:config MFD_MAX8997 drivers/mfd/Kconfig: bool "Maxim Semiconductor MAX8997/8966 PMIC Support" ...meaning that it currently is not being built as a module by anyone. Lets remove the modular code that is essentially orphaned, so that when reading the driver there is no doubt it is builtin-only. We explicitly disallow a driver unbind, since that doesn't have a sensible use case anyway, and it allows us to drop the ".remove" code for non-modular drivers. Since module_init was not in use by this code, the init ordering remains unchanged with this commit. Also note that MODULE_DEVICE_TABLE is a no-op for non-modular code. We also delete the MODULE_LICENSE tag etc. since all that information is already contained at the top of the file in the comments. Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
* mfd: max8998: Make it explicitly non-modularPaul Gortmaker2016-06-291-26/+1Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The Kconfig currently controlling compilation of this code is: mfd/Kconfig:config MFD_MAX8998 mfd/Kconfig: bool "Maxim Semiconductor MAX8998/National LP3974 PMIC Support" ...meaning that it currently is not being built as a module by anyone. Lets remove the modular code that is essentially orphaned, so that when reading the driver there is no doubt it is builtin-only. We explicitly disallow a driver unbind, since that doesn't have a sensible use case anyway, and it allows us to drop the ".remove" code for non-modular drivers. Since module_init was not in use by this code, the init ordering remains unchanged with this commit. We delete the include of module.h as well as an unused include of moduleparam.h too. Also note that MODULE_DEVICE_TABLE is a no-op for non-modular code. We also delete the MODULE_LICENSE tag etc. since all that information is already contained at the top of the file in the comments. Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
* mfd: max77620: Make it explicitly non-modularPaul Gortmaker2016-06-291-10/+2Star
| | | | | | | | | | | | | | | | | | | | | | | | The Kconfig currently controlling compilation of this code is: drivers/mfd/Kconfig:config MFD_MAX77620 drivers/mfd/Kconfig: bool "Maxim Semiconductor MAX77620 and MAX20024 PMIC Support" ...meaning that it currently is not being built as a module by anyone. Lets remove the modular code that is essentially orphaned, so that when reading the driver there is no doubt it is builtin-only. Since module_i2c_driver() uses the same init level priority as builtin_i2c_driver() the init ordering remains unchanged with this commit. Also note that MODULE_DEVICE_TABLE is a no-op for non-modular code. We also delete the MODULE_LICENSE tag etc. since all that information was (or is now) contained at the top of the file in the comments. Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
* mfd: max77843: Make it explicitly non-modularPaul Gortmaker2016-06-291-22/+2Star
| | | | | | | | | | | | | | | | | | | | | | | | | The Kconfig currently controlling compilation of this code is: drivers/mfd/Kconfig:config MFD_MAX77843 drivers/mfd/Kconfig: bool "Maxim Semiconductor MAX77843 PMIC Support" ...meaning that it currently is not being built as a module by anyone. Lets remove the modular code that is essentially orphaned, so that when reading the driver there is no doubt it is builtin-only. We explicitly disallow a driver unbind, since that doesn't have a sensible use case anyway, and it allows us to drop the ".remove" code for non-modular drivers. Since module_i2c_driver() uses the same init level priority as builtin_i2c_driver() the init ordering remains unchanged with this commit. Also note that MODULE_DEVICE_TABLE is a no-op for non-modular code. Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
* mfd: axp20x: Extend axp22x_volatile_rangesHans de Goede2016-06-291-0/+3
| | | | | | | | The axp22x pmic has a bunch of volatile registers besides the interrupt ones, extend axp22x_volatile_ranges with these. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
* mfd: rn5t618: Register restart handlerStefan Agner2016-06-291-6/+37
| | | | | | | | | | Use the PMIC's repower capability for reboots. Register a restart handler and use a slightly elevated priority of 192 since the PMIC has suprior reset capability (causing a system wide reset). Signed-off-by: Stefan Agner <stefan@agner.ch> Reviewed-by: Marcel Ziswiler <marcel.ziswiler@toradex.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
* mfd: rn5t618: Register power off callback optionallyStefan Agner2016-06-291-3/+7
| | | | | | | | | | Only register power off if the PMIC is defined as system power controller (see Documentation/devicetree/bindings/power/ power-controller.txt). Signed-off-by: Stefan Agner <stefan@agner.ch> Reviewed-by: Marcel Ziswiler <marcel.ziswiler@toradex.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
* mfd: rn5t618: Add Ricoh RN5T567 PMIC supportStefan Agner2016-06-292-10/+22
| | | | | | | | | | | | | | | The Ricoh RN5T567 is from the same family as the Ricoh RN5T618 is, the differences are: + DCDC4 + Slightly different output voltage/currents + 32kHz Output - ADC/Charger capabilities Signed-off-by: Stefan Agner <stefan@agner.ch> Reviewed-by: Marcel Ziswiler <marcel.ziswiler@toradex.com> Acked-by: Rob Herring <robh@kernel.org> Signed-off-by: Lee Jones <lee.jones@linaro.org>
* remove lots of IS_ERR_VALUE abusesArnd Bergmann2016-05-281-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Most users of IS_ERR_VALUE() in the kernel are wrong, as they pass an 'int' into a function that takes an 'unsigned long' argument. This happens to work because the type is sign-extended on 64-bit architectures before it gets converted into an unsigned type. However, anything that passes an 'unsigned short' or 'unsigned int' argument into IS_ERR_VALUE() is guaranteed to be broken, as are 8-bit integers and types that are wider than 'unsigned long'. Andrzej Hajda has already fixed a lot of the worst abusers that were causing actual bugs, but it would be nice to prevent any users that are not passing 'unsigned long' arguments. This patch changes all users of IS_ERR_VALUE() that I could find on 32-bit ARM randconfig builds and x86 allmodconfig. For the moment, this doesn't change the definition of IS_ERR_VALUE() because there are probably still architecture specific users elsewhere. Almost all the warnings I got are for files that are better off using 'if (err)' or 'if (err < 0)'. The only legitimate user I could find that we get a warning for is the (32-bit only) freescale fman driver, so I did not remove the IS_ERR_VALUE() there but changed the type to 'unsigned long'. For 9pfs, I just worked around one user whose calling conventions are so obscure that I did not dare change the behavior. I was using this definition for testing: #define IS_ERR_VALUE(x) ((unsigned long*)NULL == (typeof (x)*)NULL && \ unlikely((unsigned long long)(x) >= (unsigned long long)(typeof(x))-MAX_ERRNO)) which ends up making all 16-bit or wider types work correctly with the most plausible interpretation of what IS_ERR_VALUE() was supposed to return according to its users, but also causes a compile-time warning for any users that do not pass an 'unsigned long' argument. I suggested this approach earlier this year, but back then we ended up deciding to just fix the users that are obviously broken. After the initial warning that caused me to get involved in the discussion (fs/gfs2/dir.c) showed up again in the mainline kernel, Linus asked me to send the whole thing again. [ Updated the 9p parts as per Al Viro - Linus ] Signed-off-by: Arnd Bergmann <arnd@arndb.de> Cc: Andrzej Hajda <a.hajda@samsung.com> Cc: Andrew Morton <akpm@linux-foundation.org> Link: https://lkml.org/lkml/2016/1/7/363 Link: https://lkml.org/lkml/2016/5/27/486 Acked-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> # For nvmem part Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* Merge tag 'mfd-for-linus-4.7' of ↵Linus Torvalds2016-05-2055-482/+1139
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd Pull MFD updates from Lee Jones: "New Drivers: - Add new driver for MAXIM MAX77620/MAX20024 PMIC - Add new driver for Hisilicon HI665X PMIC New Device Support: - Add support for AXP809 in axp20x-rsb - Add support for Power Supply in axp20x New core features: - devm_mfd_* managed resources Fix-ups: - Remove unused code (da9063-irq, wm8400-core, tps6105x, smsc-ece1099, twl4030-power) - Improve clean-up in error path (intel_quark_i2c_gpio) - Explicitly include headers (syscon.h) - Allow building as modules (max77693) - Use IS_ENABLED() instead of rolling your own (dm355evm_msp, wm8400-core) - DT adaptions (axp20x, hi655x, arizona, max77620) - Remove CLK_IS_ROOT flag (intel-lpss, intel_quark) - Move to gpiochip API (asic3, dm355evm_msp, htc-egpio, htc-i2cpld, sm501, tc6393xb, tps65010, ucb1x00, vexpress) - Make use of devm_mfd_* calls (act8945a, as3711, atmel-hlcdc, bcm590xx, hi6421-pmic-core, lp3943, menf21bmc, mt6397, rdc321x, rk808, rn5t618, rt5033, sky81452, stw481x, tps6507x, tps65217, wm8400) Bug Fixes" - Fix ACPI child matching (mfd-core) - Fix start-up ordering issues (mt6397-core, arizona-core) - Fix forgotten register state on resume (intel-lpss) - Fix Clock related issues (twl6040) - Fix scheduling whilst atomic (omap-usb-tll) - Kconfig changes (vexpress)" * tag 'mfd-for-linus-4.7' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd: (73 commits) mfd: hi655x: Add MFD driver for hi655x mfd: ab8500-debugfs: Trivial fix of spelling mistake on "between" mfd: vexpress: Add !ARCH_USES_GETTIMEOFFSET dependency mfd: Add device-tree binding doc for PMIC MAX77620/MAX20024 mfd: max77620: Add core driver for MAX77620/MAX20024 mfd: arizona: Add defines for GPSW values that can be used from DT mfd: omap-usb-tll: Fix scheduling while atomic BUG mfd: wm5110: ARIZONA_CLOCK_CONTROL should be volatile mfd: axp20x: Add a cell for the ac power_supply part of the axp20x PMICs mfd: intel_soc_pmic_core: Terminate panel control GPIO lookup table correctly mfd: wl1273-core: Use devm_mfd_add_devices() for mfd_device registration mfd: tps65910: Use devm_mfd_add_devices and devm_regmap_add_irq_chip mfd: sec: Use devm_mfd_add_devices and devm_regmap_add_irq_chip mfd: rc5t583: Use devm_mfd_add_devices and devm_request_threaded_irq mfd: max77686: Use devm_mfd_add_devices and devm_regmap_add_irq_chip mfd: as3722: Use devm_mfd_add_devices and devm_regmap_add_irq_chip mfd: twl4030-power: Remove driver path in file comment MAINTAINERS: Add entry for X-Powers AXP family PMIC drivers mfd: smsc-ece1099: Remove unnecessarily remove callback mfd: Use IS_ENABLED(CONFIG_FOO) instead of checking FOO || FOO_MODULE ...
| * mfd: hi655x: Add MFD driver for hi655xChen Feng2016-05-183-0/+173
| | | | | | | | | | | | | | | | | | | | Add PMIC MFD driver to support hisilicon hi665x. Signed-off-by: Chen Feng <puck.chen@hisilicon.com> Signed-off-by: Fei Wang <w.f@huawei.com> Signed-off-by: Xinwei Kong <kong.kongxinwei@hisilicon.com> Reviewed-by: Haojian Zhuang <haojian.zhuang@linaro.org> Signed-off-by: Lee Jones <lee.jones@linaro.org>
| * mfd: ab8500-debugfs: Trivial fix of spelling mistake on "between"Colin Ian King2016-05-091-1/+1
| | | | | | | | | | | | | | | | fix spelling mistake, beetween -> between Signed-off-by: Colin Ian King <colin.king@canonical.com> Acked-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Lee Jones <lee.jones@linaro.org>
| * mfd: vexpress: Add !ARCH_USES_GETTIMEOFFSET dependencyArnd Bergmann2016-05-091-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The MFD_VEXPRESS_SYSREG driver selects CLKSRC_MMIO, which in turn conflicts with ARCH_USES_GETTIMEOFFSET, causing a harmless Kconfig warning when it is set: warning: (ARCH_MVEBU && ARCH_DIGICOLOR && ARCH_GEMINI && ARCH_KEYSTONE && ARCH_MOXART && ARCH_MXS && PLAT_SPEAR && ARCH_SUNXI && ARCH_TEGRA && ARCH_U300 && PLAT_ORION && ARCH_CLPS711X && ARCH_EP93XX && ARCH_NETX && ARCH_IXP4XX && ARCH_KS8695 && ARCH_W90X900 && ARCH_PXA && ARCH_SA1100 && ARCH_OMAP1 && ARCH_BCM_IPROC && ARCH_INTEGRATOR_AP && ARCH_OMAP2PLUS && MFD_VEXPRESS_SYSREG) selects CLKSRC_MMIO which has unmet direct dependencies (!ARCH_USES_GETTIMEOFFSET) This was apparently hidden by the fact that no ARM platform that still sets ARCH_USES_GETTIMEOFFSET has gpiolib support, and we already have a dependency on GPIOLIB that I added a while ago. However, after 296ad4acb8ef ("gpio: remove deps on ARCH_[WANT_OPTIONAL|REQUIRE]_GPIOLIB"), any platform can enable CONFIG_GPIOLIB, and that lets us enable MFD_VEXPRESS_SYSREG as well. This adds an explicit dependency on !ARCH_USES_GETTIMEOFFSET to guarantee that we can enable the CLKSRC_MMIO driver without getting warnings. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Acked-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Lee Jones <lee.jones@linaro.org>
| * mfd: max77620: Add core driver for MAX77620/MAX20024Laxman Dewangan2016-05-093-0/+606
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | MAX77620/MAX20024 are Power Management IC from the MAXIM. It supports RTC, multiple GPIOs, multiple DCDC and LDOs, watchdog, clock etc. Add MFD drier to provides common support for accessing the device; additional drivers is developed on respected subsystem in order to use the functionality of the device. Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Signed-off-by: Mallikarjun Kasoju <mkasoju@nvidia.com> Reviewed-by: Krzysztof Kozlowski <k.kozlowski@samsung.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
| * mfd: omap-usb-tll: Fix scheduling while atomic BUGRoger Quadros2016-05-091-4/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We shouldn't be calling clk_prepare_enable()/clk_prepare_disable() in an atomic context. Fixes the following issue: [ 5.830970] ehci-omap: OMAP-EHCI Host Controller driver [ 5.830974] driver_register 'ehci-omap' [ 5.895849] driver_register 'wl1271_sdio' [ 5.896870] BUG: scheduling while atomic: udevd/994/0x00000002 [ 5.896876] 4 locks held by udevd/994: [ 5.896904] #0: (&dev->mutex){......}, at: [<c049597c>] __driver_attach+0x60/0xac [ 5.896923] #1: (&dev->mutex){......}, at: [<c049598c>] __driver_attach+0x70/0xac [ 5.896946] #2: (tll_lock){+.+...}, at: [<c04c2630>] omap_tll_enable+0x2c/0xd0 [ 5.896966] #3: (prepare_lock){+.+...}, at: [<c05ce9c8>] clk_prepare_lock+0x48/0xe0 [ 5.897042] Modules linked in: wlcore_sdio(+) ehci_omap(+) dwc3_omap snd_soc_ts3a225e leds_is31fl319x bq27xxx_battery_i2c tsc2007 bq27xxx_battery bq2429x_charger ina2xx tca8418_keypad as5013 leds_tca6507 twl6040_vibra gpio_twl6040 bmp085_i2c(+) palmas_gpadc usb3503 palmas_pwrbutton bmg160_i2c(+) bmp085 bma150(+) bmg160_core bmp280 input_polldev snd_soc_omap_mcbsp snd_soc_omap_mcpdm snd_soc_omap snd_pcm_dmaengine [ 5.897048] Preemption disabled at:[< (null)>] (null) [ 5.897051] [ 5.897059] CPU: 0 PID: 994 Comm: udevd Not tainted 4.6.0-rc5-letux+ #233 [ 5.897062] Hardware name: Generic OMAP5 (Flattened Device Tree) [ 5.897076] [<c010e714>] (unwind_backtrace) from [<c010af34>] (show_stack+0x10/0x14) [ 5.897087] [<c010af34>] (show_stack) from [<c040aa7c>] (dump_stack+0x88/0xc0) [ 5.897099] [<c040aa7c>] (dump_stack) from [<c020c558>] (__schedule_bug+0xac/0xd0) [ 5.897111] [<c020c558>] (__schedule_bug) from [<c06f3d44>] (__schedule+0x88/0x7e4) [ 5.897120] [<c06f3d44>] (__schedule) from [<c06f46d8>] (schedule+0x9c/0xc0) [ 5.897129] [<c06f46d8>] (schedule) from [<c06f4904>] (schedule_preempt_disabled+0x14/0x20) [ 5.897140] [<c06f4904>] (schedule_preempt_disabled) from [<c06f64e4>] (mutex_lock_nested+0x258/0x43c) [ 5.897150] [<c06f64e4>] (mutex_lock_nested) from [<c05ce9c8>] (clk_prepare_lock+0x48/0xe0) [ 5.897160] [<c05ce9c8>] (clk_prepare_lock) from [<c05d0e7c>] (clk_prepare+0x10/0x28) [ 5.897169] [<c05d0e7c>] (clk_prepare) from [<c04c2668>] (omap_tll_enable+0x64/0xd0) [ 5.897180] [<c04c2668>] (omap_tll_enable) from [<c04c1728>] (usbhs_runtime_resume+0x18/0x17c) [ 5.897192] [<c04c1728>] (usbhs_runtime_resume) from [<c049d404>] (pm_generic_runtime_resume+0x2c/0x40) [ 5.897202] [<c049d404>] (pm_generic_runtime_resume) from [<c049f180>] (__rpm_callback+0x38/0x68) [ 5.897210] [<c049f180>] (__rpm_callback) from [<c049f220>] (rpm_callback+0x70/0x88) [ 5.897218] [<c049f220>] (rpm_callback) from [<c04a0a00>] (rpm_resume+0x4ec/0x7ec) [ 5.897227] [<c04a0a00>] (rpm_resume) from [<c04a0f48>] (__pm_runtime_resume+0x4c/0x64) [ 5.897236] [<c04a0f48>] (__pm_runtime_resume) from [<c04958dc>] (driver_probe_device+0x30/0x70) [ 5.897246] [<c04958dc>] (driver_probe_device) from [<c04959a4>] (__driver_attach+0x88/0xac) [ 5.897256] [<c04959a4>] (__driver_attach) from [<c04940f8>] (bus_for_each_dev+0x50/0x84) [ 5.897267] [<c04940f8>] (bus_for_each_dev) from [<c0494e40>] (bus_add_driver+0xcc/0x1e4) [ 5.897276] [<c0494e40>] (bus_add_driver) from [<c0496914>] (driver_register+0xac/0xf4) [ 5.897286] [<c0496914>] (driver_register) from [<c01018e0>] (do_one_initcall+0x100/0x1b8) [ 5.897296] [<c01018e0>] (do_one_initcall) from [<c01c7a54>] (do_init_module+0x58/0x1c0) [ 5.897304] [<c01c7a54>] (do_init_module) from [<c01c8a3c>] (SyS_finit_module+0x88/0x90) [ 5.897313] [<c01c8a3c>] (SyS_finit_module) from [<c0107120>] (ret_fast_syscall+0x0/0x1c) [ 5.912697] ------------[ cut here ]------------ [ 5.912711] WARNING: CPU: 0 PID: 994 at kernel/sched/core.c:2996 _raw_spin_unlock+0x28/0x58 [ 5.912717] DEBUG_LOCKS_WARN_ON(val > preempt_count()) Cc: <stable@vger.kernel.org> Reported-by: H. Nikolaus Schaller <hns@goldelico.com> Tested-by: H. Nikolaus Schaller <hns@goldelico.com> Signed-off-by: Roger Quadros <rogerq@ti.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
| * mfd: wm5110: ARIZONA_CLOCK_CONTROL should be volatileRichard Fitzgerald2016-05-091-0/+1
| | | | | | | | | | | | | | | | Some of the bits in this register can be changed by the codec so we must mark it volatile. Signed-off-by: Richard Fitzgerald <rf@opensource.wolfsonmicro.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
| * mfd: axp20x: Add a cell for the ac power_supply part of the axp20x PMICsMichael Haas2016-05-091-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | As a counterpart to the usb power_supply cell, this commit adds an AC power_supply cell to the axp20x driver. Still missing are the RTC backup battery and the main battery charger cells. Signed-off-by: Michael Haas <haas@computerlinguist.org> Acked-by: Chen-Yu Tsai <wens@csie.org> Signed-off-by: Lee Jones <lee.jones@linaro.org>
| * mfd: intel_soc_pmic_core: Terminate panel control GPIO lookup table correctlyVille Syrjälä2016-05-091-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | GPIO lookup tables are supposed to be zero terminated. Let's do that and avoid accidentally walking off the end. Cc: stable@vger.kernel.org Fixes: 61dd2ca2d44e ("mfd: intel_soc_pmic_core: Add lookup table for Panel Control as GPIO signal") Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Acked-by: Linus Walleij <linus.walleij@linaro.org> Acked-by: Daniel Vetter <daniel@ffwll.ch> Signed-off-by: Lee Jones <lee.jones@linaro.org>
| * mfd: wl1273-core: Use devm_mfd_add_devices() for mfd_device registrationLaxman Dewangan2016-05-091-12/+2Star
| | | | | | | | | | | | | | | | | | Use devm_mfd_add_devices() for MFD devices registration and get rid of .remove callback to remove MFD child-devices. This is done by managed device framework. Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
| * mfd: tps65910: Use devm_mfd_add_devices and devm_regmap_add_irq_chipLaxman Dewangan2016-05-091-21/+4Star
| | | | | | | | | | | | | | | | | | | | | | Use devm_mfd_add_devices() for adding MFD child devices and devm_regmap_add_irq_chip() for IRQ chip registration. This reduces the error code path and .remove callback for removing MFD child devices and deleting IRQ chip data. Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
| * mfd: sec: Use devm_mfd_add_devices and devm_regmap_add_irq_chipLaxman Dewangan2016-05-092-26/+8Star
| | | | | | | | | | | | | | | | | | | | | | | | | | Use devm_mfd_add_devices() for adding MFD child devices and devm_regmap_add_irq_chip() for IRQ chip registration. This reduces the error code path and .remove callback for removing MFD child devices and deleting IRQ chip data. Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Tested-by: Krzysztof Kozlowski <k.kozlowski@samsung.com> Reviewed-by: Krzysztof Kozlowski <k.kozlowski@samsung.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
| * mfd: rc5t583: Use devm_mfd_add_devices and devm_request_threaded_irqLaxman Dewangan2016-05-092-30/+5Star
| | | | | | | | | | | | | | | | | | | | | | Use devm_mfd_add_devices() for adding MFD child devices and devm_request_threaded_irq() for IRQ registration. This reduces the need of remove callback for removing MFD child devices and unregistering IRQ. Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
| * mfd: max77686: Use devm_mfd_add_devices and devm_regmap_add_irq_chipLaxman Dewangan2016-05-091-23/+8Star
| | | | | | | | | | | | | | | | | | | | | | | | | | Use devm_mfd_add_devices() for adding MFD child devices and devm_regmap_add_irq_chip() for IRQ chip registration. This reduces the error code path and .remove callback for removing MFD child devices and deleting IRQ chip data. Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Tested-by: Krzysztof Kozlowski <k.kozlowski@samsung.com> Reviewed-by: Krzysztof Kozlowski <k.kozlowski@samsung.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
| * mfd: as3722: Use devm_mfd_add_devices and devm_regmap_add_irq_chipLaxman Dewangan2016-05-091-22/+9Star
| | | | | | | | | | | | | | | | | | | | | | Use devm_mfd_add_devices() for adding MFD child devices and devm_regmap_add_irq_chip() for IRQ chip registration. This reduces the error code path and .remove callback for removing MFD child devices and deleting IRQ chip data. Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
| * mfd: twl4030-power: Remove driver path in file commentJavier Martinez Canillas2016-05-091-1/+0Star
| | | | | | | | | | | | | | | | | | The driver's file path in the comment is wrong, so just remove it since these tends to get out of date and they serve very little purpose. Suggested-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
| * mfd: smsc-ece1099: Remove unnecessarily remove callbackLaxman Dewangan2016-05-091-10/+0Star
| | | | | | | | | | | | | | | | | | | | | | | | | | SMSC MFD driver does not add any MFD child devices via mfd_add_devices() and hence it is not required to call mfd_remove_devices() to remove MFD child devices. Remove the call of the API mfd_remove_devices() which will result as remove of .remove callback for driver. Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Signed-off-by: Sourav Poddar <sourav.poddar@ti.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
| * mfd: Use IS_ENABLED(CONFIG_FOO) instead of checking FOO || FOO_MODULEJavier Martinez Canillas2016-05-092-7/+7
| | | | | | | | | | | | | | | | The IS_ENABLED() macro checks if a Kconfig symbol has been enabled either built-in or as a module, use that macro instead of open coding the same. Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
| * mfd: twl6040: Disable and unprepare clk32k in twl6040_power() error pathJavier Martinez Canillas2016-05-091-0/+2
| | | | | | | | | | | | | | | | The clk32k clock is prepared and enabled in twl6040_power() but the clock is left enabled in case of an error while it should be disable/unprepared. Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
| * mfd: twl6040: Check clk_prepare_enable() return value in twl6040_power()Javier Martinez Canillas2016-05-091-1/+5
| | | | | | | | | | | | | | | | The clk_prepare_enable() function can fail so check the return value and propagate the error in case of a failure. Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
| * mfd: tps6105x: Remove linux/regulator/driver.h includeMark Brown2016-05-091-1/+0Star
| | | | | | | | | | | | | | | | | | This driver makes no use of linux/regulator/driver.h which should only be used by drivers implementing a regulator. Since it's unlikely to ever need anything from there remove the include. Signed-off-by: Mark Brown <broonie@kernel.org> Signed-off-by: Lee Jones <lee.jones@linaro.org>
| * mfd: intel_quark_i2c_gpio: Remove CLK_IS_ROOTStephen Boyd2016-05-091-1/+1
| | | | | | | | | | | | | | | | | | This flag is a no-op now (see commit 47b0eeb3dc8a "clk: Deprecate CLK_IS_ROOT", 2016-02-02) so remove it. Acked-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Stephen Boyd <sboyd@codeaurora.org> Signed-off-by: Lee Jones <lee.jones@linaro.org>
| * mfd: intel-lpss: Remove CLK_IS_ROOTStephen Boyd2016-05-091-2/+2
| | | | | | | | | | | | | | | | | | This flag is a no-op now (see commit 47b0eeb3dc8a "clk: Deprecate CLK_IS_ROOT", 2016-02-02) so remove it. Acked-by: Mika Westerberg <mika.westerberg@linux.intel.com> Signed-off-by: Stephen Boyd <sboyd@codeaurora.org> Signed-off-by: Lee Jones <lee.jones@linaro.org>
| * mfd: intel-lpss: Save register context on suspendHeikki Krogerus2016-05-091-1/+18
| | | | | | | | | | | | | | | | | | | | | | | | All configurations are lost and the registers will have default values when the hardware is suspended and resumed, so saving the private register space context on suspend, and restoring it on resume. Fixes: 4b45efe85263 (mfd: Add support for Intel Sunrisepoint LPSS devices) Cc: stable@vger.kernel.org # v4.3+ Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
| * mfd: wm8400-core: Delete wm8400_reg_read()Dan Carpenter2016-05-091-21/+0Star
| | | | | | | | | | | | | | | | | | | | There was a static checker warning in wm8400_reg_read() because we were returning u16 and that can't hold the negative error codes. The function isn't used, so let's just delete it. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
| * mfd: arizona: Update device ordering to allow clean driver removalCharles Keepax2016-05-091-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Since this commit: commit b9a8a271c38f ("mfd: make mfd_remove_devices() iterate in reverse order") The order in which the MFD children remove has been reversed, as our driver contains some dependencies between the devices we need to make some changes to ensure the driver unloads cleanly. Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
| * mfd: mt6397: IRQ domain should initialize before mfd_add_devices()Henry Chen2016-05-091-9/+13
| | | | | | | | | | | | | | | | | | | | Some sub driver like RTC module need irq domain from parent to create irq mapping when driver initialize. so move mt6397_irq_init() before mfd_add_devices(). Acked-by: John Crispin <blogic@openwrt.org> Signed-off-by: Henry Chen <henryc.chen@mediatek.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
| * mfd: cros_ec: Allow building for ARM64Brian Norris2016-04-191-1/+1
| | | | | | | | | | | | | | | | | | There are platforms using the ChromeOS embeded controller on ARM64 now, so let's allow using this driver (without having to use COMPILE_TEST). Signed-off-by: Brian Norris <briannorris@chromium.org> Reviewed-by: Javier Martinez Canillas <javier@osg.samsung.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
| * mfd: max77686: Use module_i2c_driver() instead of subsys initcallJavier Martinez Canillas2016-04-191-12/+1Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The driver's init and exit function don't do anything besides adding and deleting the I2C driver so the module_i2c_driver() macro could be used. Currently is not being used because the driver is initialized at subsys initcall level, claiming that this is done to allow consumers devices to use the resources provided by this driver. But dependencies are in DT so manual ordering of init calls is not necessary any more. Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com> Reviewed-by: Krzysztof Kozlowski <k.kozlowski@samsung.com> Reviewed-by: Andi Shyti <andi.shyti@samsung.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>