aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mfd (follow)
AgeCommit message (Collapse)AuthorFilesLines
2014-12-30Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/inputLinus Torvalds2-0/+7
Pull input layer fixes from Dmitry Torokhov: "Fixes for v7 protocol for ALPS devices and few other driver fixes. Also users can request input events to be stamped with boot time timestamps, in addition to real and monotonic timestamps" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: Input: hil_kbd - fix incorrect use of init_completion Input: alps - v7: document the v7 touchpad packet protocol Input: alps - v7: fix finger counting for > 2 fingers on clickpads Input: alps - v7: sometimes a single touch is reported in mt[1] Input: alps - v7: ignore new packets Input: evdev - add CLOCK_BOOTTIME support Input: psmouse - expose drift duration for IBM trackpoints Input: stmpe - bias keypad columns properly Input: stmpe - enforce device tree only mode mfd: stmpe: add pull up/down register offsets for STMPE Input: optimize events_per_packet count calculation Input: edt-ft5x06 - fixed a macro coding style issue Input: gpio_keys - replace timer and workqueue with delayed workqueue Input: gpio_keys - allow separating gpio and irq in device tree
2014-12-15mfd: stmpe: add pull up/down register offsets for STMPELinus Walleij2-0/+7
This adds the register offsets for pull up/down for the STMPE 1601, 1801 and 24xx expanders. This is used to bias GPIO lines and keypad lines. Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Acked-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2014-12-14Merge tag 'driver-core-3.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-coreLinus Torvalds25-28/+0
Pull driver core update from Greg KH: "Here's the set of driver core patches for 3.19-rc1. They are dominated by the removal of the .owner field in platform drivers. They touch a lot of files, but they are "simple" changes, just removing a line in a structure. Other than that, a few minor driver core and debugfs changes. There are some ath9k patches coming in through this tree that have been acked by the wireless maintainers as they relied on the debugfs changes. Everything has been in linux-next for a while" * tag 'driver-core-3.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core: (324 commits) Revert "ath: ath9k: use debugfs_create_devm_seqfile() helper for seq_file entries" fs: debugfs: add forward declaration for struct device type firmware class: Deletion of an unnecessary check before the function call "vunmap" firmware loader: fix hung task warning dump devcoredump: provide a one-way disable function device: Add dev_<level>_once variants ath: ath9k: use debugfs_create_devm_seqfile() helper for seq_file entries ath: use seq_file api for ath9k debugfs files debugfs: add helper function to create device related seq_file drivers/base: cacheinfo: remove noisy error boot message Revert "core: platform: add warning if driver has no owner" drivers: base: support cpu cache information interface to userspace via sysfs drivers: base: add cpu_device_create to support per-cpu devices topology: replace custom attribute macros with standard DEVICE_ATTR* cpumask: factor out show_cpumap into separate helper function driver core: Fix unbalanced device reference in drivers_probe driver core: fix race with userland in device_add() sysfs/kernfs: make read requests on pre-alloc files use the buffer. sysfs/kernfs: allow attributes to request write buffer be pre-allocated. fs: sysfs: return EGBIG on write if offset is larger than file size ...
2014-12-11Merge tag 'devicetree-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/glikely/linuxLinus Torvalds1-1/+1
Pull devicetree changes from Grant Likely: "Lots of activity in the devicetree code for v3.18. Most of it is related to getting all of the overlay support code in place, but there are other important things in there. Highlights: - OF_RECONFIG notifiers for SPI, I2C and Platform devices. Those subsystems can now respond to live changes to the device tree. - CONFIG_OF_OVERLAY method for applying live changes to the device tree - Removal of the of_allnodes list. This used to be used to iterate over all the nodes in the device tree, but it is unnecessary because the same thing can be done by iterating over the list of child pointers. Getting rid of of_allnodes saves some memory and avoids the possibility of of_allnodes being sorted differently from the child lists. - Support for retrieving original DTB blob via sysfs. Needed by kexec. - More unittests - Documentation and minor bug fixes" * tag 'devicetree-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/glikely/linux: (42 commits) of: Delete unnecessary check before calling "of_node_put()" of: Drop ->next pointer from struct device_node spi: Check for spi_of_notifier when CONFIG_OF_DYNAMIC=y of: support passing console options with stdout-path of: add optional options parameter to of_find_node_by_path() of: Add bindings for chosen node, stdout-path of: Remove unneeded and incorrect MODULE_DEVICE_TABLE ARM: dt: fix up PL011 device tree bindings of: base, fix of_property_read_string_helper kernel-doc of: remove select of non-existant OF_DEVICE config symbol spi/of: Add OF notifier handler spi/of: Create new device registration method and accessors i2c/of: Add OF_RECONFIG notifier handler i2c/of: Factor out Devicetree registration code of/overlay: Add overlay unittests of/overlay: Introduce DT overlay support of/reconfig: Add OF_DYNAMIC notifier for platform_bus_type of/reconfig: Always use the same structure for notifiers of/reconfig: Add debug output for OF_RECONFIG notifiers of/reconfig: Add empty stubs for the of_reconfig methods ...
2014-12-10Merge tag 'pm+acpi-3.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pmLinus Torvalds5-4/+10
Pull ACPI and power management updates from Rafael Wysocki: "This time we have some more new material than we used to have during the last couple of development cycles. The most important part of it to me is the introduction of a unified interface for accessing device properties provided by platform firmware. It works with Device Trees and ACPI in a uniform way and drivers using it need not worry about where the properties come from as long as the platform firmware (either DT or ACPI) makes them available. It covers both devices and "bare" device node objects without struct device representation as that turns out to be necessary in some cases. This has been in the works for quite a few months (and development cycles) and has been approved by all of the relevant maintainers. On top of that, some drivers are switched over to the new interface (at25, leds-gpio, gpio_keys_polled) and some additional changes are made to the core GPIO subsystem to allow device drivers to manipulate GPIOs in the "canonical" way on platforms that provide GPIO information in their ACPI tables, but don't assign names to GPIO lines (in which case the driver needs to do that on the basis of what it knows about the device in question). That also has been approved by the GPIO core maintainers and the rfkill driver is now going to use it. Second is support for hardware P-states in the intel_pstate driver. It uses CPUID to detect whether or not the feature is supported by the processor in which case it will be enabled by default. However, it can be disabled entirely from the kernel command line if necessary. Next is support for a platform firmware interface based on ACPI operation regions used by the PMIC (Power Management Integrated Circuit) chips on the Intel Baytrail-T and Baytrail-T-CR platforms. That interface is used for manipulating power resources and for thermal management: sensor temperature reporting, trip point setting and so on. Also the ACPI core is now going to support the _DEP configuration information in a limited way. Basically, _DEP it supposed to reflect off-the-hierarchy dependencies between devices which may be very indirect, like when AML for one device accesses locations in an operation region handled by another device's driver (usually, the device depended on this way is a serial bus or GPIO controller). The support added this time is sufficient to make the ACPI battery driver work on Asus T100A, but it is general enough to be able to cover some other use cases in the future. Finally, we have a new cpufreq driver for the Loongson1B processor. In addition to the above, there are fixes and cleanups all over the place as usual and a traditional ACPICA update to a recent upstream release. As far as the fixes go, the ACPI LPSS (Low-power Subsystem) driver for Intel platforms should be able to handle power management of the DMA engine correctly, the cpufreq-dt driver should interact with the thermal subsystem in a better way and the ACPI backlight driver should handle some more corner cases, among other things. On top of the ACPICA update there are fixes for race conditions in the ACPICA's interrupt handling code which might lead to some random and strange looking failures on some systems. In the cleanups department the most visible part is the series of commits targeted at getting rid of the CONFIG_PM_RUNTIME configuration option. That was triggered by a discussion regarding the generic power domains code during which we realized that trying to support certain combinations of PM config options was painful and not really worth it, because nobody would use them in production anyway. For this reason, we decided to make CONFIG_PM_SLEEP select CONFIG_PM_RUNTIME and that lead to the conclusion that the latter became redundant and CONFIG_PM could be used instead of it. The material here makes that replacement in a major part of the tree, but there will be at least one more batch of that in the second part of the merge window. Specifics: - Support for retrieving device properties information from ACPI _DSD device configuration objects and a unified device properties interface for device drivers (and subsystems) on top of that. As stated above, this works with Device Trees and ACPI and allows device drivers to be written in a platform firmware (DT or ACPI) agnostic way. The at25, leds-gpio and gpio_keys_polled drivers are now going to use this new interface and the GPIO subsystem is additionally modified to allow device drivers to assign names to GPIO resources returned by ACPI _CRS objects (in case _DSD is not present or does not provide the expected data). The changes in this set are mostly from Mika Westerberg, Rafael J Wysocki, Aaron Lu, and Darren Hart with some fixes from others (Fabio Estevam, Geert Uytterhoeven). - Support for Hardware Managed Performance States (HWP) as described in Volume 3, section 14.4, of the Intel SDM in the intel_pstate driver. CPUID is used to detect whether or not the feature is supported by the processor. If supported, it will be enabled automatically unless the intel_pstate=no_hwp switch is present in the kernel command line. From Dirk Brandewie. - New Intel Broadwell-H ID for intel_pstate (Dirk Brandewie). - Support for firmware interface based on ACPI operation regions used by the PMIC chips on the Intel Baytrail-T and Baytrail-T-CR platforms for power resource control and thermal management (Aaron Lu). - Limited support for retrieving off-the-hierarchy dependencies between devices from ACPI _DEP device configuration objects and deferred probing support for the ACPI battery driver based on the _DEP information to make that driver work on Asus T100A (Lan Tianyu). - New cpufreq driver for the Loongson1B processor (Kelvin Cheung). - ACPICA update to upstream revision 20141107 which only affects tools (Bob Moore). - Fixes for race conditions in the ACPICA's interrupt handling code and in the ACPI code related to system suspend and resume (Lv Zheng and Rafael J Wysocki). - ACPI core fix for an RCU-related issue in the ioremap() regions management code that slowed down significantly after CPUs had been allowed to enter idle states even if they'd had RCU callbakcs queued and triggered some problems in certain proprietary graphics driver (and elsewhere). The fix replaces synchronize_rcu() in that code with synchronize_rcu_expedited() which makes the issue go away. From Konstantin Khlebnikov. - ACPI LPSS (Low-Power Subsystem) driver fix to handle power management of the DMA engine included into the LPSS correctly. The problem is that the DMA engine doesn't have ACPI PM support of its own and it simply is turned off when the last LPSS device having ACPI PM support goes into D3cold. To work around that, the PM domain used by the ACPI LPSS driver is redesigned so at least one device with ACPI PM support will be on as long as the DMA engine is in use. From Andy Shevchenko. - ACPI backlight driver fix to avoid using it on "Win8-compatible" systems where it doesn't work and where it was used by default by mistake (Aaron Lu). - Assorted minor ACPI core fixes and cleanups from Tomasz Nowicki, Sudeep Holla, Huang Rui, Hanjun Guo, Fabian Frederick, and Ashwin Chaugule (mostly related to the upcoming ARM64 support). - Intel RAPL (Running Average Power Limit) power capping driver fixes and improvements including new processor IDs (Jacob Pan). - Generic power domains modification to power up domains after attaching devices to them to meet the expectations of device drivers and bus types assuming devices to be accessible at probe time (Ulf Hansson). - Preliminary support for controlling device clocks from the generic power domains core code and modifications of the ARM/shmobile platform to use that feature (Ulf Hansson). - Assorted minor fixes and cleanups of the generic power domains core code (Ulf Hansson, Geert Uytterhoeven). - Assorted minor fixes and cleanups of the device clocks control code in the PM core (Geert Uytterhoeven, Grygorii Strashko). - Consolidation of device power management Kconfig options by making CONFIG_PM_SLEEP select CONFIG_PM_RUNTIME and removing the latter which is now redundant (Rafael J Wysocki and Kevin Hilman). That is the first batch of the changes needed for this purpose. - Core device runtime power management support code cleanup related to the execution of callbacks (Andrzej Hajda). - cpuidle ARM support improvements (Lorenzo Pieralisi). - cpuidle cleanup related to the CPUIDLE_FLAG_TIME_VALID flag and a new MAINTAINERS entry for ARM Exynos cpuidle (Daniel Lezcano and Bartlomiej Zolnierkiewicz). - New cpufreq driver callback (->ready) to be executed when the cpufreq core is ready to use a given policy object and cpufreq-dt driver modification to use that callback for cooling device registration (Viresh Kumar). - cpufreq core fixes and cleanups (Viresh Kumar, Vince Hsu, James Geboski, Tomeu Vizoso). - Assorted fixes and cleanups in the cpufreq-pcc, intel_pstate, cpufreq-dt, pxa2xx cpufreq drivers (Lenny Szubowicz, Ethan Zhao, Stefan Wahren, Petr Cvek). - OPP (Operating Performance Points) framework modification to allow OPPs to be removed too and update of a few cpufreq drivers (cpufreq-dt, exynos5440, imx6q, cpufreq) to remove OPPs (added during initialization) on driver removal (Viresh Kumar). - Hibernation core fixes and cleanups (Tina Ruchandani and Markus Elfring). - PM Kconfig fix related to CPU power management (Pankaj Dubey). - cpupower tool fix (Prarit Bhargava)" * tag 'pm+acpi-3.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: (120 commits) i2c-omap / PM: Drop CONFIG_PM_RUNTIME from i2c-omap.c dmaengine / PM: Replace CONFIG_PM_RUNTIME with CONFIG_PM tools: cpupower: fix return checks for sysfs_get_idlestate_count() drivers: sh / PM: Replace CONFIG_PM_RUNTIME with CONFIG_PM e1000e / igb / PM: Eliminate CONFIG_PM_RUNTIME MMC / PM: Replace CONFIG_PM_RUNTIME with CONFIG_PM MFD / PM: Replace CONFIG_PM_RUNTIME with CONFIG_PM misc / PM: Replace CONFIG_PM_RUNTIME with CONFIG_PM media / PM: Replace CONFIG_PM_RUNTIME with CONFIG_PM input / PM: Replace CONFIG_PM_RUNTIME with CONFIG_PM leds: leds-gpio: Fix multiple instances registration without 'label' property iio / PM: Replace CONFIG_PM_RUNTIME with CONFIG_PM hsi / OMAP / PM: Replace CONFIG_PM_RUNTIME with CONFIG_PM i2c-hid / PM: Replace CONFIG_PM_RUNTIME with CONFIG_PM drm / exynos / PM: Replace CONFIG_PM_RUNTIME with CONFIG_PM gpio / PM: Replace CONFIG_PM_RUNTIME with CONFIG_PM hwrandom / exynos / PM: Use CONFIG_PM in #ifdef block / PM: Replace CONFIG_PM_RUNTIME with CONFIG_PM USB / PM: Drop CONFIG_PM_RUNTIME from the USB core PM: Merge the SET*_RUNTIME_PM_OPS() macros ...
2014-12-08Merge tag 'mfd-for-linus-3.19' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfdLinus Torvalds33-239/+1560
Pull MFD updates from Lee Jones: "Changes to the core: - Honour PLATFORM_DEVID_NONE and PLATFORM_DEVID_AUTO dev IDs Changes to existing drivers: - IRQ additions/fixes; axp20x, da9063-core - Code simplification; i2c-dln2 - Regmap additions/fixes; max77693 - Error checking/handling improvements; dln2, db8500-prcmu - Bug fixes; dln2, wm8350-core - DT support/documentation; max77693, max77686, tps65217, twl4030-power, gpio-tc3589x - Decouple syscon interface from platform devices - Use MFD hotplug registration; rtsx_usb, viperboard, hid-sensor-hub - Regulator fixups; sec-core - Power Management additions/fixes; rts5227, tc6393xb - Remove relic/redundant code; ab8500-sysctrl, lpc_sch, max77693-private - Clean-up/coding style changes; tps65090 - Clk additions/fixes; tc6393xb, tc6387xb, t7l66xb - Add USB-SPI support; dln2 - Trivial changes; max14577, arizona-spi, lpc_sch, wm8997-tables, wm5102-tables wm5110-tables, axp20x, atmel-hlcdc, rtsx_pci New drivers/supported devices: - axp288 PMIC support added to axp20x - s2mps13 support added to sec-core - New support for Diolan DLN-2 - New support for atmel-hlcdc" * tag 'mfd-for-linus-3.19' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd: (55 commits) mfd: rtsx: Add func to split u32 into register mfd: atmel-hlcdc: Add Kconfig option description and name mfd: da9063: Get irq base dynamically before registering device mfd: max14577: Fix obvious typo in company name in copyright mfd: axp20x: Constify axp20x_acpi_match and rid unused warning mfd: t7l66xb: prepare/unprepare clocks mfd: tc6387xb: prepare/unprepare clocks mfd: dln2: add support for USB-SPI module mfd: wm5110: Add missing registers for AIF2 channels 3-6 mfd: tc3589x: get rid of static base mfd: arizona: Document HP_CTRL_1L and HP_CTRL_1R registers mfd: wm8997: Mark INTERRUPT_STATUS_2_MASK as readable mfd: tc6393xb: Prepare/unprepare clocks mfd: tps65090: Fix bonkers indenting strategy mfd: tc6393xb: Fail ohci suspend if full state restore is required mfd: lpc_sch: Don't call mfd_remove_devices() mfd: wm8350-core: Fix probable mask then right shift defect mfd: ab8500-sysctrl: Drop ab8500_restart mfd: db8500-prcmu: Provide sane error path values mfd: db8500-prcmu: Check return of devm_ioremap for error ...
2014-12-08Merge branch 'pm-runtime'Rafael J. Wysocki3-4/+4
* pm-runtime: (25 commits) i2c-omap / PM: Drop CONFIG_PM_RUNTIME from i2c-omap.c dmaengine / PM: Replace CONFIG_PM_RUNTIME with CONFIG_PM drivers: sh / PM: Replace CONFIG_PM_RUNTIME with CONFIG_PM e1000e / igb / PM: Eliminate CONFIG_PM_RUNTIME MMC / PM: Replace CONFIG_PM_RUNTIME with CONFIG_PM MFD / PM: Replace CONFIG_PM_RUNTIME with CONFIG_PM misc / PM: Replace CONFIG_PM_RUNTIME with CONFIG_PM media / PM: Replace CONFIG_PM_RUNTIME with CONFIG_PM input / PM: Replace CONFIG_PM_RUNTIME with CONFIG_PM iio / PM: Replace CONFIG_PM_RUNTIME with CONFIG_PM hsi / OMAP / PM: Replace CONFIG_PM_RUNTIME with CONFIG_PM i2c-hid / PM: Replace CONFIG_PM_RUNTIME with CONFIG_PM drm / exynos / PM: Replace CONFIG_PM_RUNTIME with CONFIG_PM gpio / PM: Replace CONFIG_PM_RUNTIME with CONFIG_PM hwrandom / exynos / PM: Use CONFIG_PM in #ifdef block / PM: Replace CONFIG_PM_RUNTIME with CONFIG_PM USB / PM: Drop CONFIG_PM_RUNTIME from the USB core PM: Merge the SET*_RUNTIME_PM_OPS() macros PM / Kconfig: Do not select PM directly from Kconfig files PCI / PM: Drop CONFIG_PM_RUNTIME from the PCI core ...
2014-12-05MFD / PM: Replace CONFIG_PM_RUNTIME with CONFIG_PMRafael J. Wysocki3-4/+4
After commit b2b49ccbdd54 (PM: Kconfig: Set PM_RUNTIME if PM_SLEEP is selected) PM_RUNTIME is always set if PM is set, so #ifdef blocks depending on CONFIG_PM_RUNTIME may now be changed to depend on CONFIG_PM. Replace CONFIG_PM_RUNTIME with CONFIG_PM everywhere under drivers/mfd/. Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Acked-by: Lee Jones <lee.jones@linaro.org>
2014-12-01mfd: atmel-hlcdc: Add Kconfig option description and nameBoris Brezillon1-1/+6
The MFD_ATMEL_HLCDC was first intended to be selected by its sub-devices but these sub-devices now depends on this option, we thus need to add a name and a description so that users can see it. Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com> Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
2014-11-26ACPI / PMIC: support PMIC operation region for XPower AXP288Aaron Lu1-0/+3
The Baytrail-T-CR platform firmware has defined two customized operation regions for PMIC chip Dollar Cove XPower - one is for power resource handling and one is for thermal just like the CrystalCove one. This patch adds support for them on top of the common PMIC opregion region code. Signed-off-by: Aaron Lu <aaron.lu@intel.com> Acked-by: Lee Jones <lee.jones@linaro.org> for the MFD part Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2014-11-26ACPI / PMIC: support PMIC operation region for CrystalCoveAaron Lu1-0/+3
The Baytrail-T platform firmware has defined two customized operation regions for PMIC chip Crystal Cove - one is for power resource handling and one is for thermal: sensor temperature reporting, trip point setting, etc. This patch adds support for them on top of the existing Crystal Cove PMIC driver. The reason to split code into a separate file intel_pmic.c is that there are more PMIC drivers with ACPI operation region support coming and we can re-use those code. The intel_pmic_opregion_data structure is created also for this purpose: when we need to support a new PMIC's operation region, we just need to fill those callbacks and the two register mapping tables. Signed-off-by: Aaron Lu <aaron.lu@intel.com> Acked-by: Lee Jones <lee.jones@linaro.org> for the MFD part Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2014-11-25mfd: da9063: Get irq base dynamically before registering deviceDmitry Lavnikevich1-1/+3
After registering mfd device with proper irq_base platform_get_irq_byname() calls will return VIRQ instead of local IRQ. This fixes da9063 rtc registration issue: da9063-rtc da9063-rtc: Failed to request ALARM IRQ 1: -22 Signed-off-by: Dmitry Lavnikevich <d.lavnikevich@sam-solutions.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
2014-11-25mfd: max14577: Fix obvious typo in company name in copyrightKrzysztof Kozlowski1-1/+1
Fix a typo in name of company in copyright comment. Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
2014-11-25mfd: axp20x: Constify axp20x_acpi_match and rid unused warningLee Jones1-1/+1
axp20x.c:239:30: warning: ‘axp20x_acpi_match’ defined but not used [-Wunused-variable] Signed-off-by: Lee Jones <lee.jones@linaro.org>
2014-11-25mfd: t7l66xb: prepare/unprepare clocksDmitry Eremin-Solenikov1-7/+7
Change clk_enable/disable() calls to clk_prepare_enable() and clk_disable_unprepare(). Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
2014-11-25mfd: tc6387xb: prepare/unprepare clocksDmitry Eremin-Solenikov1-5/+5
Change clk_enable/disable() calls to clk_prepare_enable() and clk_disable_unprepare(). Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
2014-11-25mfd: dln2: add support for USB-SPI moduleLaurentiu Palcu1-0/+12
Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
2014-11-25mfd: wm5110: Add missing registers for AIF2 channels 3-6Charles Keepax1-0/+16
When the extra 4 channels were added to AIF2 the necessary frame control registers were not given defaults and marked readable. This patch fixes this. Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
2014-11-25mfd: tc3589x: get rid of static baseLinus Walleij1-6/+3
The TC3589x driver is now a device tree-only driver, so we want only dynamic IRQs and GPIO numbers from the tc3589x, no static assignments. Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2014-11-25mfd: arizona: Document HP_CTRL_1L and HP_CTRL_1R registersCharles Keepax3-2/+12
These registers are documented in the datasheet and used as part of the extcon driver. Expose them properly through regmap as the datasheet notes they should be treated as volatile do so. Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
2014-11-25mfd: wm8997: Mark INTERRUPT_STATUS_2_MASK as readableCharles Keepax1-0/+2
Technically this register is not used on wm8997 however the regmap core requires a continuous block of IRQs. The simplest solution is just to add the register. Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
2014-11-25mfd: tc6393xb: Prepare/unprepare clocksDmitry Eremin-Solenikov1-5/+5
Change clk_enable/disable() calls to clk_prepare_enable() and clk_disable_unrepapre(). Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
2014-11-25mfd: tps65090: Fix bonkers indenting strategyLee Jones1-31/+31
First spotted pointless (incorrect) indent of 'if (ret)', then double indentations of a struct attribute 'mask'. Decided to go through the whole file and make amendments instead and this is the result. Signed-off-by: Lee Jones <lee.jones@linaro.org>
2014-11-25mfd: tc6393xb: Fail ohci suspend if full state restore is requiredDmitry Eremin-Solenikov1-1/+12
Some boards with TC6393XB chip require full state restore during system resume thanks to chip's VCC being cut off during suspend (Sharp SL-6000 tosa is one of them). Failing to do so would result in ohci Oops on resume due to internal memory contentes being changed. Fail ohci suspend on tc6393xb is full state restore is required. Recommended workaround is to unbind tmio-ohci driver before suspend and rebind it after resume. Cc: stable@vger.kernel.org Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
2014-11-25mfd: lpc_sch: Don't call mfd_remove_devices()Andy Shevchenko1-5/+1
MFD core already cares about failing registration. It will remove successfully registered devices in case of error. Thus, no need to repeatedly call mfd_remove_devices(). Fixes: 5829e9b64e65 (mfd: lpc_sch: Accomodate partial population of the MFD devices) Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
2014-11-25mfd: wm8350-core: Fix probable mask then right shift defectJoe Perches1-1/+1
Precedence of & and >> is not the same and is not left to right. shift has higher precedence and should be done after the mask. Add parentheses around the mask. Signed-off-by: Joe Perches <joe@perches.com> Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
2014-11-25mfd: ab8500-sysctrl: Drop ab8500_restartGuenter Roeck1-57/+0
ab8500_restart is not called from anywhere in the kernel, so drop it. Signed-off-by: Guenter Roeck <linux@roeck-us.net> Acked-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Lee Jones <lee.jones@linaro.org>
2014-11-25mfd: db8500-prcmu: Provide sane error path valuesLee Jones1-11/+8
Also rid superfluous gotos and label. Cc: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Lee Jones <lee.jones@linaro.org>
2014-11-25mfd: db8500-prcmu: Check return of devm_ioremap for errorPramod Gurav1-0/+5
Error check around return value of devm_ioremap is missing. Add the same to avoid NULL pointer dereference. Signed-off-by: Pramod Gurav <pramod.gurav@smartplayin.com> Acked-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Lee Jones <lee.jones@linaro.org>
2014-11-25mfd: twl4030-power: Fix regression with missing compatible flagTony Lindgren1-0/+3
Commit e7cd1d1eb16f ("mfd: twl4030-power: Add generic reset configuration") accidentally removed the compatible flag for "ti,twl4030-power" that should be there as documented in the binding. If "ti,twl4030-power" only the poweroff configuration is done by the driver. Fixes: e7cd1d1eb16f ("mfd: twl4030-power: Add generic reset configuration") Cc: stable@vger.kernel.org # v3.16+ Reported-by: "Dr. H. Nikolaus Schaller" <hns@goldelico.com> Signed-off-by: Tony Lindgren <tony@atomide.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
2014-11-25mfd: rtsx: Fix PM suspend for 5227 & 5249Micky Ching5-1/+51
Fix rts5227&5249 failed send buffer cmd after suspend, PM_CTRL3 should reset before send any buffer cmd after suspend. Otherwise, buffer cmd will failed, this will lead resume fail. Signed-off-by: Micky Ching <micky_ching@realsil.com.cn> Signed-off-by: Lee Jones <lee.jones@linaro.org>
2014-11-25Revert "mfd: sec-core: Prepare regulators for suspend state to reduce power-consumption"Javier Martinez Canillas2-11/+0
This reverts commit b7cde7078d2344073c310aa65fc2b0a845d2cb5b ("mfd: sec-core: Prepare regulators for suspend state to reduce power-consumption") Commit b7cde7078d23 called regulator_suspend_prepare() to prepare the regulators for a suspend state. But it did from the device pm suspend handler while the regulator suspend prepare function iterates over all regulators and not only the one managed by this device so it doesn't seems to be correct to call it from within a device driver. It is better to call the regulator suspend prepare/finish functions from platform code instead so this patch reverts the mentioned commit. Suggested-by: Doug Anderson <dianders@chromium.org> Signed-off-by: Javier Martinez Canillas <javier.martinez@collabora.co.uk> Reviewed-by: Chanwoo Choi <cw00.choi@samsung.com> Reviewed-by: Doug Anderson <dianders@chromium.org> Signed-off-by: Lee Jones <lee.jones@linaro.org>
2014-11-25mfd: max77693: Map charger device to its own of_nodeKrzysztof Kozlowski1-1/+4
Add a "maxim,max77693-charger" of_compatible to the mfd_cell so the MFD child device (the charger) will have its own of_node set. This will be used by the max77693 charger driver in next patches to obtain battery configuration from DTS. Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
2014-11-25mfd: arizona-spi: Add lines after declarations - checkpatch catchWill Sheppard1-0/+2
This was found whilst running checkpatch.pl on arizona-spi. WARNING: Missing a blank line after declarations + struct arizona *arizona = spi_get_drvdata(spi); + arizona_dev_exit(arizona); Signed-off-by: Will Sheppard <wsheppard@embedded-bits.co.uk> Signed-off-by: Lee Jones <lee.jones@linaro.org>
2014-11-25mfd: Add atmel-hlcdc driverBoris Brezillon3-0/+129
The HLCDC IP available on some Atmel SoCs (i.e. at91sam9n12, at91sam9x5 family or sama5d3 family) exposes 2 subdevices: - a display controller (controlled by a DRM driver) - a PWM chip The MFD device provides a regmap and several clocks (those connected to this hardware block) to its subdevices. This way concurrent accesses to the iomem range are handled by the regmap framework, and each subdevice can safely access HLCDC registers. Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com> Tested-by: Anthony Harivel <anthony.harivel@emtrion.de> Tested-by: Ludovic Desroches <ludovic.desroches@atmel.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
2014-11-25mfd: core: Fix platform-device id generationJohan Hovold1-1/+7
Make sure to always honour multi-function devices registered with PLATFORM_DEVID_NONE (-1) or PLATFORM_DEVID_AUTO (-2) as id base. In this case it does not make sense to append the cell id to the mfd-id base and potentially change the requested behaviour. Specifically this will allow multi-function devices to be registered with PLATFORM_DEVID_AUTO while still having non-zero cell ids. Signed-off-by: Johan Hovold <johan@kernel.org> Signed-off-by: Lee Jones <lee.jones@linaro.org>
2014-11-25mfd: Use mfd_add_hotplug_devices() helperJohan Hovold2-4/+4
Use mfd_add_hotplug_devices helper to register the subdevices. Signed-off-by: Johan Hovold <johan@kernel.org> Signed-off-by: Lee Jones <lee.jones@linaro.org>
2014-11-25mfd: syscon: Decouple syscon interface from platform devicesPankaj Dubey1-22/+74
Currently a syscon entity can be only registered directly through a platform device that binds to a dedicated syscon driver. However in certain use cases it is desirable to make a device used with another driver a syscon interface provider. For example, certain SoCs (e.g. Exynos) contain system controller blocks which perform various functions such as power domain control, CPU power management, low power mode control, but in addition contain certain IP integration glue, such as various signal masks, coprocessor power control, etc. In such case, there is a need to have a dedicated driver for such system controller but also share registers with other drivers. The latter is where the syscon interface is helpful. In case of DT based platforms, this patch decouples syscon object from syscon platform driver, and allows to create syscon objects first time when it is required by calling of syscon_regmap_lookup_by APIs and keep a list of such syscon objects along with syscon provider device_nodes and regmap handles. For non-DT based platforms, this patch keeps syscon platform driver structure so that syscon can be probed and such non-DT based drivers can use syscon_regmap_lookup_by_pdev API and access regmap handles. Once all users of "syscon_regmap_lookup_by_pdev" migrated to DT based, we can completely remove platform driver of syscon, and keep only helper functions to get regmap handles. Suggested-by: Arnd Bergmann <arnd@arndb.de> Suggested-by: Tomasz Figa <tomasz.figa@gmail.com> Tested-by: Vivek Gautam <gautam.vivek@samsung.com> Tested-by: Javier Martinez Canillas <javier.martinez@collabora.co.uk> Signed-off-by: Pankaj Dubey <pankaj.dubey@samsung.com> Reviewed-by: Arnd Bergmann <arnd@arndb.de> Tested-by: Heiko Stuebner <heiko@sntech.de> Reviewed-by: Heiko Stuebner <heiko@sntech.de> Signed-off-by: Lee Jones <lee.jones@linaro.org>
2014-11-25mfd: max77693: Add haptic of_compatible in mfd_cellJaewon Kim1-1/+4
This patch add haptic of_compatible in order to use the haptic device driver using Devicetree. Signed-off-by: Jaewon Kim <jaewon02.kim@samsung.com> Acked-by: Chanwoo Choi <cw00.choi@samsung.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
2014-11-25mfd: max77693: Initialize haptic register mapJaewon Kim1-3/+18
This patch add regmap_haptic initialization to use haptic register map in haptic device driver. Signed-off-by: Jaewon Kim <jaewon02.kim@samsung.com> Acked-by: Chanwoo Choi <cw00.choi@samsung.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
2014-11-25mfd: tps65217: Add compatible string for subdevicesJohannes Pointner1-0/+2
Adds of_compatible strings to mfd_cells for sub devices of the tps65217. Signed-off-by: Johannes Pointner <johannes.pointner@br-automation.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
2014-11-25Merge branches 'ib-mfd-gpio-i2c-3.19', 'ib-mfd-iio-3.19' and 'ib-mfd-regulator-v3.19', tag 'ib-mfd-regulator-clk-v3.19' into ibs-for-mfd-mergedLee Jones6-62/+1134
Immutable branch between MFD, Regulator and Clk, due for v3.19
2014-11-25regulator: s2mps11: Add support S2MPS13 regulator deviceChanwoo Choi1-0/+13
This patch adds S2MPS13 regulator device to existing S2MPS11 device driver. The S2MPS13 has just different number of regulators from S2MPS14. The S2MPS13 regulator device includes LDO[1-40] and BUCK[1-10]. Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com> Acked-by: Sangbeom Kim <sbkim73@samsung.com> Acked-by: Mark Brown <broonie@kernel.org> Reviewed-by: Krzysztof Kozlowski <k.kozlowski@samsung.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
2014-11-25mfd: sec-core: Add support for S2MPS13 deviceChanwoo Choi2-6/+33
This patch adds the support for Samsung S2MPS13 PMIC device to the sec-core MFD driver. The S2MPS13 is very similar with existing S2MPS14 and includes PMIC/ RTC/CLOCK devices. Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com> Acked-by: Sangbeom Kim <sbkim73@samsung.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
2014-11-25Merge branch 'ib-mfd-iio-3.19' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd into acpi-pmicRafael J. Wysocki2-56/+308
Pull MFD changes that the ACPI PMIC changes depend on from Lee Jones.
2014-11-24Merge tag 'v3.18-rc6' into devicetree/nextGrant Likely5-4/+71
v3.18-rc6 contains an important DT bug fix, c1a2086e2d, "of/selftest: Fix off-by-one error in removal path" which affects testing of the overlay patch series. Merge it into the devicetree/next staging branch so that the overlay patches are applied on top of a known working tree. Linux 3.18-rc6 Conflicts: drivers/of/address.c
2014-11-19mfd: dln2: A couple endian fixesDan Carpenter1-3/+5
Sparse catches a couple endian bugs. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Acked-by: Octavian Purdila <octavian.purdila@intel.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
2014-11-19mfd: dln2: Add a limit check for invalid echoOctavian Purdila1-0/+4
The echo field in dln2_transfer_complete comes directly from an USB transfer and we should not trust it is valid. Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Octavian Purdila <octavian.purdila@intel.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
2014-11-19mfd: dln2: Fix _dln2_transfer return codeOctavian Purdila1-3/+3
If wait_for_completion_interruptible_timeout returns a positive value it may be propagated as the return value of _dln2_transfer. This contradicts the documentation of the function and exposes unnecessary internals to the callers. This patch makes sure to set the return value to 0 in that case. Reported-by: Julia Lawall <julia.lawall@lip6.fr> Signed-off-by: Octavian Purdila <octavian.purdila@intel.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
2014-11-18mfd/axp20x: avoid irq numbering collisionJacob Pan1-9/+9
IRQ numbers in axp20x devices are defined with high-order bit first in each IRQ enable/status registers. On Intel platforms it is more common to number IRQs with least significant bit first. Therefore, sharing IRQ# between the two is very difficult. Since AXP288 is a customized PMIC for Intel platform and the amount of shared IRQs are very small, we use separate IRQ numbering. This also fixes collision and a duplicate in WBTO interrupt. e.g. For the 16 interrupts controlled in IRQ enabled registers 1 & 2, on axp20x for ARM, the PMIC local IRQ numbers and register bits are mapped as: IRQ#: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 --------------------------------------------------------- ARM: 7 6 5 4 3 2 1 0 7 6 5 4 3 2 1 0 Intel: 0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7 Signed-off-by: Todd Brandt <todd.e.brandt@linux.intel.com> Signed-off-by: Jacob Pan <jacob.jun.pan@linux.intel.com> Acked-by: Jonathan Cameron <jic23@kernel.org> Signed-off-by: Lee Jones <lee.jones@linaro.org>