summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* mfd: ezx-pcap: Consolidate chained IRQ handler install/removeThomas Gleixner2015-08-111-2/+1Star
| | | | | | | | | | | | Chained irq handlers usually set up handler data as well. We now have a function to set both under irq_desc->lock. Replace the two calls with one. Search and conversion was done with coccinelle. Reported-by: Russell King <rmk+kernel@arm.linux.org.uk> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Lee Jones <lee.jones@linaro.org>
* mfd: Kill off set_irq_flags usageRob Herring2015-08-1127-139/+17Star
| | | | | | | | | | | | | | | | | | | | | set_irq_flags is ARM specific with custom flags which have genirq equivalents. Convert drivers to use the genirq interfaces directly, so we can kill off set_irq_flags. The translation of flags is as follows: IRQF_VALID -> !IRQ_NOREQUEST IRQF_PROBE -> !IRQ_NOPROBE IRQF_NOAUTOEN -> IRQ_NOAUTOEN For IRQs managed by an irqdomain, the irqdomain core code handles clearing and setting IRQ_NOREQUEST already, so there is no need to do this in .map() functions and we can simply remove the set_irq_flags calls. Some users also modify IRQ_NOPROBE and this has been maintained although it is not clear that is really needed. There appears to be a great deal of blind copy and paste of this code. Signed-off-by: Rob Herring <robh@kernel.org> Acked-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Lee Jones <lee.jones@linaro.org>
* mfd: ipaq-micro: Convert to built-in platform driverLinus Walleij2015-08-111-23/+4Star
| | | | | | | | | | | Signal that this is a built-in driver and call its probe function immediately on init. Suppress binding attributes and delete the .remove() function since it is never unloaded. Tag probe() and functions only called from probe() with __init. Delete all module macros since this is a pure built-in. Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Lee Jones <lee.jones@linaro.org>
* mfd: ipaq-micro: Convert prints to debug printsLinus Walleij2015-08-111-4/+4
| | | | | | | | There is a special function for debug prints rather than the usual hexdump function, let's use it. Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Lee Jones <lee.jones@linaro.org>
* mfd: ipaq-micro: Clean up development cruftLinus Walleij2015-08-111-2/+1Star
| | | | | | | | Clean out a misspelled "HW" (MW) and remove commented-out codeline. Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Lee Jones <lee.jones@linaro.org>
* devicetree: da9062: Add device tree bindings for DA9062 RTCS Twiss2015-08-111-0/+9
| | | | | | | Add device tree bindings for the DA9062 RTC driver component Signed-off-by: Steve Twiss <stwiss.opensource@diasemi.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
* mfd: da9062: Support for the DA9063 RTC in the DA9062 coreS Twiss2015-08-111-0/+11
| | | | | | | | | | | | Add MFD core driver support for a RTC component - MFD core adds the RTC resources da9062_rtc_resources[] for the RTC alarm and tick timer IRQ - An appropriate mfd_cell has been added into da9062_devs[] to support a component .name = "da9062-rtc" and .of_compatible = "dlg,da9062-rtc" Signed-off-by: Steve Twiss <stwiss.opensource@diasemi.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
* mfd: arizona: Specify regmap endiannessRichard Fitzgerald2015-08-114-0/+12
| | | | | | | | Explicitly set the regmap endianness instead of relying on the default being correct. Signed-off-by: Richard Fitzgerald <rf@opensource.wolfsonmicro.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
* mfd: rk808: dt: Add the description about dvs gpio for rk808Chris Zhong2015-08-111-1/+7
| | | | | | | | add the description about dvs1, dvs2, and add the example. Signed-off-by: Chris Zhong <zyw@rock-chips.com> Reviewed-by: Doug Anderson <dianders@chromium.org> Signed-off-by: Lee Jones <lee.jones@linaro.org>
* mfd: pm8921: Implement irq_get_irqchip_stateBjorn Andersson2015-08-111-0/+38
| | | | | | | | | | Implement irq_chip->irq_get_irqchip_state to make it possible for PMIC block drivers to access the IRQ real time status bits. The status bits are used for various kinds of input signals, e.g. GPIO. Signed-off-by: Bjorn Andersson <bjorn.andersson@sonymobile.com> Acked-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Lee Jones <lee.jones@linaro.org>
* mfd: atmel-hlcdc: Implement config synchronizationBoris Brezillon2015-08-111-6/+45
| | | | | | | | | | | | | | Some HLCDC registers cannot be written until the hardware has finished applying the previous configuration request. If they are written while an action is still in progress, the new configuration might be silently ignored, resulting in unpredictable behavior. Hide the config synchronization stuff in a regmap implementation and use this implementation instead of the generic mmio one. 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>
* MAINTAINERS: Add an entry for the Maxim MAX77802 PMIC driversJavier Martinez Canillas2015-08-111-0/+8
| | | | | | | | | | I added support for the max77802 drivers and have been maintaining them. So add an entry for these drivers to make tools like get_maintainer.pl to work and make people submitting patches add me to the CC list. Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com> Acked-by: Krzysztof Kozlowski <k.kozlowski@samsung.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
* MAINTAINERS: Add Device Tree binding doc for max77686 regulatorJavier Martinez Canillas2015-08-111-1/+1
| | | | | | | | | | | | The Device Tree binding documentation for the Maxim max77686 regulators has been moved from the Multi-Function Device DT binding section to its own Documentation/devicetree/bindings/regulator/max77686.txt file. Use a wilcard so both the mfd and regulator DT bindings are resolved. Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com> Reviewed-by: Krzysztof Kozlowski <k.kozlowski@samsung.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
* mfd: da9063: Fix missing DA9063_M_DVC_RDY mask bitSteve Twiss2015-08-112-0/+5
| | | | | | | | | | | | | | | | Fix a missing DVC_RDY interrupt mask in struct regmap_irq definition. The original submission of this driver did not contain all interrupt masking definitions in the struct regmap_irq contained in the file da9063-irq.c The solution is to add a DA9063_IRQ_DVC_RDY entry to enum da9063_irqs list and to add the corresponding values to compensate for the missing mask bit in the static const struct regmap_irq da9063_irqs[] table. Signed-off-by: Steve Twiss <stwiss.opensource@diasemi.com> Signed-off-by: Adam Ward <adam.ward.opensource@diasemi.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
* mfd: axp20x: Add axp152 supportMichal Suchanek2015-08-112-1/+143
| | | | | | | | | The axp152 is a stripped down version of the axp202 pmic with the battery charging function removed as it is intended for top-set boxes. Signed-off-by: Michal Suchanek <hramrach@gmail.com> Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
* mfd: kempld-core: Add support for COMe-bBL6 and COMe-cBW6 to Kontron PLD driverMichael Brunner2015-08-112-0/+18
| | | | | | | | | | | This patch adds the DMI system ID of the Kontron COMe-bBL6 and COME-cBW6 boards to the Kontron PLD driver. The list of supported products in the module description is also updated. Signed-off-by: Michael Brunner <michael.brunner@kontron.com> Acked-by: Christian Rauch <christian.rauch@kontron.com> Reviewed-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Lee Jones <lee.jones@linaro.org>
* mfd: axp20x: Add binding documentation for AXP152 PMICHans de Goede2015-08-111-1/+3
| | | | | | | | | | Add devicetree binding documentation for the AXP152 PMIC, this is a stripped down version of the AXP202 PMIC with the battery charging function removed. Signed-off-by: Michal Suchanek <hramrach@gmail.com> Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
* mfd: qcom-rpm: Add apq8064 QDSS clock resourceIvan T. Ivanov2015-08-111-0/+1
| | | | | | | | | Qualcomm Debug Subsystem clock is used by CoreSight components. Add required definitions for it. qcom_rpm_resource::status_id is not used by driver, so just mark it as ~0. Signed-off-by: Ivan T. Ivanov <ivan.ivanov@linaro.org> Signed-off-by: Lee Jones <lee.jones@linaro.org>
* mfd: Drop owner assignment from i2c_driversKrzysztof Kozlowski2015-08-1149-49/+0Star
| | | | | | | | i2c_driver does not need to set an owner because i2c_register_driver() will set it. Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
* mfd: wm8994-regmap: Constify reg_default tablesAxel Lin2015-08-111-3/+3
| | | | | | | | | These reg_default tables are not modified after initialized, so make them const. Signed-off-by: Axel Lin <axel.lin@ingics.com> Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
* mfd: arizona: Fixup register table definitionsCharles Keepax2015-08-113-59/+4Star
| | | | | | | | | | | | | | | | | | | | | | | | | The regmap register definitions have been a source of many small fixes as issues are discovered. As such I made a small automated tool to check these definitions. This patch fixes the issues (mostly harmless) located by that tool, the issues fall into three catagories: 1) Volatile registers that have a default in the defaults table (default has been removed from the table since it is redundant) 2) Registers that are marked as volatile but unreadable (register has been removed from the volatile list since it is obviously not being used) 3) Registers that arn't readable but have an entry in the defaults table (again removed since it is redundant) 4) Readable non-volatile registers that are missing a default, these are dangerous as they won't get synced during a cache sync. Fortunately, most of them seem to be registers that shouldn't be there (for example wm5102 had readable registers for DRC2 and ISRC3 which is doesn't have) Hopefully another tool will be produced to check the actual default values themselves but that is outside the scope of this patch. Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
* mfd: da9062: dt: Add bindings for DA9062 driverS Twiss2015-08-111-0/+79
| | | | | | | Add device Tree Bindings for the DA9062 driver Signed-off-by: Steve Twiss <stwiss.opensource@diasemi.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
* mfd: da9062: Supply core driverS Twiss2015-08-115-1/+1684
| | | | | | | Add MFD core driver support for DA9062 Signed-off-by: Steve Twiss <stwiss.opensource@diasemi.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
* mfd: t7l66xb: Remove unnecessary pdata checkManinder Singh2015-08-111-2/+2
| | | | | | | | | | o Making pdata NULL check to (!pdata) as coding standard and all other checks in file. o Removing redundant check of pdata, because we already check for pdata, and also derefernced before this check. Signed-off-by: Maninder Singh <maninder1.s@samsung.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
* mfd: tps6586x: Fix up define for TPS6586X_MAX_REGISTERAxel Lin2015-08-111-2/+2
| | | | | | | The latest valid register is TPS6586X_VERSIONCRC. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
* mfd: arizona: Add support for WM8998 and WM1814Richard Fitzgerald2015-08-1110-8/+1945
| | | | | Signed-off-by: Richard Fitzgerald <rf@opensource.wolfsonmicro.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
* mfd: 880m80x: Make use of BIT() macroVaibhav Hiremath2015-08-111-81/+81
| | | | | | | | Instead of hard coding the shift for bit definition, use BIT() macro. Signed-off-by: Vaibhav Hiremath <vaibhav.hiremath@linaro.org> Signed-off-by: Lee Jones <lee.jones@linaro.org>
* mfd: Remove MFD_CROS_EC_SPI depends on OFJavier Martinez Canillas2015-08-111-1/+1
| | | | | | | | | | | | | The ChromeOS EC SPI transport driver has a dependency on OF because it uses some OF helpers from the <linux/of.h> header. But there isn't a need for an explicit dependency since the header has stub functions if CONFIG_OF is not defined. Also, MFD_CROS_EC_SPI already depends on MFD_CROS_EC which in turn has a dependency on OF so in practice can't be selected without CONFIG_OF. Signed-off-by: Javier Martinez Canillas <javier.martinez@collabora.co.uk> Signed-off-by: Lee Jones <lee.jones@linaro.org>
* mfd: arizona: Update several pdata members to unsignedCharles Keepax2015-08-111-6/+6
| | | | | | | | | | | Device tree and ACPI primarily deal with unsigned ints, many of the pdata members in the Arizona driver are signed ints but are only ever assigned positive values. Changing these pdata fields to unsigned ints avoids us having to choose between overly verbose code and Sparse warnings. Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
* mfd: arizona: Fix race between runtime suspend and IRQsCharles Keepax2015-08-111-1/+1
| | | | | | | | | | | | | | | | | | | | | | | The function arizona_irq_thread (the threaded handler for the arizona IRQs) calls pm_runtime_get_sync at the start to ensure that the chip is active as we handle the IRQ. If the chip is part way through a runtime suspend when an IRQ arrives the PM core will wait for the suspend to complete, before resuming. However, since commit 4f0216409f7c ("mfd: arizona: Add better support for system suspend") the runtime suspend function may call disable_irq, if the chip is going to fully power off, which will try to wait for any outstanding IRQs to complete. This results in deadlock as the IRQ thread is waiting for the PM operation to complete and the PM thread is waiting for the IRQ to complete. To avoid this situation we use disable_irq_nosync, which allows the suspending thread to finish the suspend without waiting for the IRQ to complete. This is safe because if an IRQ is being processed it can only be blocked at the pm_runtime_get_sync at the start of the handler otherwise it wouldn't be possible to suspend. Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
* mfd: intel_soc_pmic: Constify ACPI device idsMathias Krause2015-08-111-1/+1
| | | | | | | | Constify the ACPI device ID array, it doesn't need to be writable at runtime. Signed-off-by: Mathias Krause <minipli@googlemail.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
*-. Merge branches 'ib-mfd-base-acpi-dma-4.3', ↵Lee Jones2015-08-1116-60/+410
|\ \ | | | | | | | | | 'ib-mfd-clocksource-rtc-watchdog-4.3' and 'ib-mfd-i2c-x86-watchdog-4.3' into ibs-for-mfd-merged
| | * watchdog: iTCO_wdt: Add support for TCO on Intel SunrisepointMatt Fleming2015-08-112-28/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The revision of the watchdog hardware in Sunrisepoint necessitates a new "version" inside the TCO watchdog driver because some of the register layouts have changed. Also update the Kconfig entry to select both the LPC and SMBus drivers since the TCO device is on the SMBus in Sunrisepoint. Signed-off-by: Matt Fleming <matt.fleming@intel.com> Reviewed-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Lee Jones <lee.jones@linaro.org>
| | * i2c: i801: Create iTCO device on newer Intel PCHsMika Westerberg2015-08-111-1/+119
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Starting from Intel Sunrisepoint (Skylake PCH) the iTCO watchdog resources have been moved to reside under the i801 SMBus host controller whereas previously they were under the LPC device. In order to support the iTCO watchdog on newer PCHs we need to create the platform device here in the SMBus driver and pass all known resources using platform data. Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com> Signed-off-by: Matt Fleming <matt.fleming@intel.com> Reviewed-by: Guenter Roeck <linux@roeck-us.net> Acked-by: Wolfram Sang <wsa@the-dreams.de> Signed-off-by: Lee Jones <lee.jones@linaro.org>
| | * mfd: watchdog: iTCO_wdt: Expose watchdog properties using platform dataMatt Fleming2015-08-115-20/+57
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Intel Sunrisepoint (Skylake PCH) has the iTCO watchdog accessible across the SMBus, unlike previous generations of PCH/ICH where it was on the LPC bus. Because it's on the SMBus, it doesn't make sense to pass around a 'struct lpc_ich_info', and leaking the type of bus into the iTCO watchdog driver is kind of backwards anyway. This change introduces a new 'struct itco_wdt_platform_data' for use inside the iTCO watchdog driver and by the upcoming Intel Sunrisepoint code, which neatly avoids having to include lpc_ich headers in the i801 i2c driver. This change is overdue because lpc_ich_info has already found its way into other TCO watchdog users, notably the intel_pmc_ipc driver where the watchdog actually isn't on the LPC bus as far as I can see. A simple translation layer is provided for converting from the existing 'struct lpc_ich_info' inside the lpc_ich mfd driver. Signed-off-by: Matt Fleming <matt.fleming@intel.com> Acked-by: Darren Hart <dvhart@linux.intel.com> [drivers/x86 refactoring] Reviewed-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Lee Jones <lee.jones@linaro.org>
| * | MAINTAINERS: Add the LPC Clocksource to STi maintained driver listLee Jones2015-07-231-0/+1
| | | | | | | | | | | | Signed-off-by: Lee Jones <lee.jones@linaro.org>
| * | rtc: bindings: Supply knowledge of a third supported device - clocksourceLee Jones2015-07-231-6/+9
| | | | | | | | | | | | Signed-off-by: Lee Jones <lee.jones@linaro.org>
| * | rtc: st: Update IP layout information to include ClocksourceLee Jones2015-07-231-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Initial submission adding support for this IP only included Watchdog and the Real-Time Clock. Now the third (and final) device is enabled this trivial patch is required to update the comment in the RTC driver to encompass Clocksource. Acked-by: Alexandre Belloni <alexandre.belloni@free-electrons.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
| * | watchdog: bindings: Supply knowledge of a third supported device - clocksourceLee Jones2015-07-231-4/+8
| | | | | | | | | | | | Signed-off-by: Lee Jones <lee.jones@linaro.org>
| * | clocksource: bindings: Provide bindings for ST's LPC Clocksource deviceLee Jones2015-07-231-0/+28
| | | | | | | | | | | | | | | | | | | | | | | | On current ST platforms the LPC controls a number of functions including Watchdog and Real Time Clock. This patch provides the bindings used to configure LPC in Clocksource mode. Signed-off-by: Lee Jones <lee.jones@linaro.org>
| * | clocksource: sti: Provide 'use timer as sched clock' capabilityLee Jones2015-07-231-0/+8
| | | | | | | | | | | | | | | Acked-by: Daniel Lezcano <daniel.lezcano@linaro.org> Signed-off-by: Lee Jones <lee.jones@linaro.org>
| * | clocksource: sti: Provide support for the ST LPC Clocksource IPLee Jones2015-07-233-0/+132
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This IP is shared with Watchdog and RTC functionality. All 3 of these devices are mutually exclusive from one another i.e. Only 1 IP can be used at any given time. We use the device-driver model combined with a DT 'mode' property to enforce this. The ST LPC Clocksource IP can be used as the system (tick) timer. Acked-by: Daniel Lezcano <daniel.lezcano@linaro.org> Signed-off-by: Lee Jones <lee.jones@linaro.org>
| * | mfd: dt-bindings: Provide human readable define for Clocksource modeLee Jones2015-07-231-0/+1
| |/ | | | | | | | | | | | | | | ST's Low Power Controller can now operate in three supported modes; Watchdog, Real Time Clock and most recently as a Clocksource. This new define will allow the LPC IP to be configured for Clocksource from DT. Signed-off-by: Lee Jones <lee.jones@linaro.org>
* | mfd: Add support for Intel Sunrisepoint LPSS devicesAndy Shevchenko2015-07-286-0/+809
| | | | | | | | | | | | | | | | | | | | | | | | | | The new coming Intel platforms such as Skylake will contain Sunrisepoint PCH. The main difference to the previous platforms is that the LPSS devices are compound devices where usually main (SPI, HSUART, or I2C) and DMA IPs are present. This patch brings the driver for such devices found on Sunrisepoint PCH. Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
* | dmaengine: add a driver for Intel integrated DMA 64-bitAndy Shevchenko2015-07-284-0/+952
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Intel integrated DMA (iDMA) 64-bit is a specific IP that is used as a part of LPSS devices such as HSUART or SPI. The iDMA IP is attached for private usage on each host controller independently. While it has similarities with Synopsys DesignWare DMA, the following distinctions doesn't allow to use the existing driver: - 64-bit mode with corresponding changes in Hardware Linked List data structure - many slight differences in the channel registers Moreover this driver is based on the DMA virtual channels framework that helps to make the driver cleaner and easy to understand. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Acked-by: Vinod Koul <vinod.koul@intel.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
* | mfd: make mfd_remove_devices() iterate in reverse orderAndy Shevchenko2015-07-281-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The newly introduced device_for_each_child_reverse() would be used when MFD core removes the device. After this patch applied the devices will be removed in a reversed order. This behaviour is useful when devices have implicit dependency on order, i.e. consider MFD device with serial bus controller, such as SPI, and DMA IP that is attached to serial bus controller: before remove the DMA driver we have to be ensured that no DMA transfers is ongoing and the requested channel are unused. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
* | driver core: implement device_for_each_child_reverse()Andy Shevchenko2015-07-282-0/+45
| | | | | | | | | | | | | | | | | | | | | | The new function device_for_each_child_reverse() is helpful to traverse the registered devices in a reversed order, e.g. in the case when an operation on each device should be done first on the last added device, then on one before last and so on. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Lee Jones <lee.jones@linaro.org>
* | klist: implement klist_prev()Andy Shevchenko2015-07-282-0/+42
| | | | | | | | | | | | | | | | | | | | klist_prev() gets the previous element in the list. It is useful to traverse through the list in reverse order, for example, to provide LIFO (last in first out) variant of access. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Lee Jones <lee.jones@linaro.org>
* | Driver core: wakeup the parent device before trying probeRafael J. Wysocki2015-07-281-0/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If the parent is still suspended when driver probe is attempted, the result may be failure. For example, if the parent is a PCI MFD device that has been suspended when we try to probe our device, any register reads will return 0xffffffff. To fix the problem, making sure the parent is always awake before attempting driver probe. Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
* | ACPI / PM: Attach ACPI power domain only onceMika Westerberg2015-07-283-16/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some devices, like MFD subdevices, share a single ACPI companion device so that they are able to access their resources and children. However, currently all these subdevices are attached to the ACPI power domain and this might cause that the power methods for the companion device get called more than once. In order to solve this we attach the ACPI power domain only to the first physical device that is bound to the ACPI companion device. In case of MFD devices, this is the parent MFD device itself. Acked-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>