aboutsummaryrefslogtreecommitdiff
path: root/drivers/power
AgeCommit message (Collapse)Author
2015-10-13power: Add support for DA9150 Fuel-GaugeAdam Thomson
This adds power supply driver support for the Fuel-Gauge part of the DA9150 combined Charger and Fuel-Gauge device. Signed-off-by: Adam Thomson <Adam.Thomson.Opensource@diasemi.com> Acked-by: Sebastian Reichel <sre@kernel.org> Signed-off-by: Lee Jones <lee.jones@linaro.org>
2015-09-29power: bq24257: Add various device-specific sysfs propertiesAndreas Dannenberg
This patch adds support for enabling/disabling optional device specific features through sysfs properties at runtime. * High-impedance mode enable/disable * Sysoff enable/disable Refer to the respective device datasheets for more information: http://www.ti.com/product/bq24250 http://www.ti.com/product/bq24251 http://www.ti.com/product/bq24257 Signed-off-by: Andreas Dannenberg <dannenberg@ti.com> Reviewed-by: Krzysztof Kozlowski <k.kozlowski@samsung.com> Signed-off-by: Sebastian Reichel <sre@kernel.org>
2015-09-29power: bq24257: Allow input current limit sysfs accessAndreas Dannenberg
This patch allows reading and writing of the input current limit through the power supply's input_current_limit sysfs property. This allows userspace to see what charger was detected (if the D+/D- USB signal- based charger type detection is enabled) and to re-configure the maximum current drawn from the external supply at runtime based on system-level knowledge or user input. Note that upon charger disconnection and re-connection the limit configured through firmware becomes active again (or the D+/D- USB signal-based charger detection will be run again). Signed-off-by: Andreas Dannenberg <dannenberg@ti.com> Reviewed-by: Krzysztof Kozlowski <k.kozlowski@samsung.com> Signed-off-by: Sebastian Reichel <sre@kernel.org>
2015-09-29power: bq24257: Add input DPM voltage threshold setting supportAndreas Dannenberg
A new optional device property called "ti,in-dpm-voltage" is introduced to allow configuring the input voltage threshold for the devices' dynamic power path management (DPM) feature. In short, it can be used to prevent the input voltage from dropping below a certain value as current is drawn to charge the battery or supply the system. Signed-off-by: Andreas Dannenberg <dannenberg@ti.com> Reviewed-by: Laurentiu Palcu <laurentiu.palcu@intel.com> Reviewed-by: Krzysztof Kozlowski <k.kozlowski@samsung.com> Signed-off-by: Sebastian Reichel <sre@kernel.org>
2015-09-29power: bq24257: Add over voltage protection setting supportAndreas Dannenberg
A new optional device property called "ti,ovp-voltage" is introduced to allow configuring the input over voltage protection setting. This commit also adds the basic sysfs support for custom properties which is being used to allow userspace to read the current ovp-voltage setting. Signed-off-by: Andreas Dannenberg <dannenberg@ti.com> Reviewed-by: Laurentiu Palcu <laurentiu.palcu@intel.com> Reviewed-by: Krzysztof Kozlowski <k.kozlowski@samsung.com> Signed-off-by: Sebastian Reichel <sre@kernel.org>
2015-09-29power: bq24257: Add SW-based approach for Power Good determinationAndreas Dannenberg
A software-based approach for determining the charger's input voltage "Power Good" state is introduced for devices like the bq24250 which don't have a dedicated hardware pin for that purpose. This SW-based approach is also used for other devices (with dedicated PG pin) as a fall back solution if that pin is not configured to be used through "pg-gpios". Signed-off-by: Andreas Dannenberg <dannenberg@ti.com> Reviewed-by: Krzysztof Kozlowski <k.kozlowski@samsung.com> Signed-off-by: Sebastian Reichel <sre@kernel.org>
2015-09-29power: bq24257: Allow manual setting of input current limitAndreas Dannenberg
A new optional device property called "ti,current-limit" is introduced to allow disabling the D+/D- USB signal-based charger type auto- detection algorithm used to set the input current limit and instead to use a fixed input current limit. Signed-off-by: Andreas Dannenberg <dannenberg@ti.com> Reviewed-by: Krzysztof Kozlowski <k.kozlowski@samsung.com> Signed-off-by: Sebastian Reichel <sre@kernel.org>
2015-09-29power: bq24257: Add bit definition for temp sense enableAndreas Dannenberg
Adding a missing bit definition for the sake of consistency device model vs. bit field representation. No change in functionality. Signed-off-by: Andreas Dannenberg <dannenberg@ti.com> Reviewed-by: Laurentiu Palcu <laurentiu.palcu@intel.com> Signed-off-by: Sebastian Reichel <sre@kernel.org>
2015-09-29power: bq24257: Add basic support for bq24250/bq24251Andreas Dannenberg
This patch adds basic support for bq24250 and bq24251 which are very similar to the bq24257 the driver was originally written for. Basic support means the ability to select a device through Kconfig, DT and ACPI, an instance variable allowing to check which chip is active, and the reporting back of the selected device through the model_name power supply sysfs property. This patch by itself is not sufficient to actually use those two added devices in a real-world setting due to some feature differences which are addressed by other patches in this series. Signed-off-by: Andreas Dannenberg <dannenberg@ti.com> Reviewed-by: Krzysztof Kozlowski <k.kozlowski@samsung.com> Signed-off-by: Sebastian Reichel <sre@kernel.org>
2015-09-29power: bq24257: Simplify bq24257_power_supply_init()Andreas Dannenberg
Eliminate a few lines of code by using the PTR_ERR_OR_ZERO() macro. Signed-off-by: Andreas Dannenberg <dannenberg@ti.com> Reviewed-by: Krzysztof Kozlowski <k.kozlowski@samsung.com> Signed-off-by: Sebastian Reichel <sre@kernel.org>
2015-09-29power: bq24257: Use managed power supply registerAndreas Dannenberg
Use the devm_* managed version of the function to register the power supply and remove the associated unregister function. This will simplify error handling moving forward as it allows the unregister to happen automatically. It also saves a few lines of code. As this changes the order of putting the bq24257 into reset vs. unregistering the power-supply during driver remove re-tested various driver unload scenario to make sure that this doesn't cause any unintended side effects such as erroneous interrupts. Signed-off-by: Andreas Dannenberg <dannenberg@ti.com> Reviewed-by: Krzysztof Kozlowski <k.kozlowski@samsung.com> Signed-off-by: Sebastian Reichel <sre@kernel.org>
2015-09-28power: bq24257: Streamline input current limit setupAndreas Dannenberg
The maximum amount of input current the charger should draw is dependent on the power supply and should only be (re-)configured when the power supply gets connected and disconnected. However the driver was also lowering the bq24257's input current limit setting to 500mA when the battery was removed and restored the previous setting according to the power supply capabilities when the battery was reconnected although these events are not impacting the amount of power that can be drawn from the supply. Furthermore, a re-configuration of the input current limit to 500mA when the battery gets disconnected is actually dangerous if the limit was set higher previously and the system draws more than 500mA in which case the system voltage would be reduced in order to maintain 500mA which could result in the system getting too low of a supply to maintain operation. Last but not least the mechanism itself used for battery re-connection detection did not work in corner cases such as when the device's input current loop becomes active and the bq24257 device clears its battery fault error resulting in incorrectly reporting that the battery got reconnected. This patches removes the impact the battery removal/insertion has on the input current limit configured for the bq24257 and simplifies the associated handler routine. Signed-off-by: Andreas Dannenberg <dannenberg@ti.com> Signed-off-by: Sebastian Reichel <sre@kernel.org>
2015-09-28power: bq24257: Remove IRQ config through stat-gpiosAndreas Dannenberg
At the time the driver was written GpioInt resources in ACPI were not passed to the driver in client->irq, as opposed to DT enumeration. To accommodate this use case, a "stat-gpios" property was introduced to allow configuring the IRQ. However this issue with ACPI was fixed in commit "845c877 i2c / ACPI: Assign IRQ for devices that have GpioInt automatically" and makes this workaround no longer necessary, hence we can remove the support for the "stat-gpios" property and the associated code from the bq24257 driver. Signed-off-by: Andreas Dannenberg <dannenberg@ti.com> Signed-off-by: Sebastian Reichel <sre@kernel.org>
2015-09-28power: bq27xxx_battery: fix signedness bug in bq27xxx_battery_read_health()Andrzej Hajda
We need flags to be signed for the error handling to work. The problem has been detected using proposed semantic patch scripts/coccinelle/tests/unsigned_lesser_than_zero.cocci [1]. [1]: http://permalink.gmane.org/gmane.linux.kernel/2038576 Fixes: 74aab849f342 ('power: bq27xxx_battery: Cleanup health checking') Signed-off-by: Andrzej Hajda <a.hajda@samsung.com> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Acked-By: Pali Rohár <pali.rohar@gmail.com> Acked-by: Andrew F. Davis <afd@ti.com> Signed-off-by: Sebastian Reichel <sre@kernel.org>
2015-09-26drivers: power: twl4030_charger: fix link problems when building as moduleMarek Belisko
If either twl4030_charger or twl4030_madc is configured as MODULE, we get build (link) errors. To solve, the direct call of twl4030_get_madc_conversion() is replaced by a call to iio_read_channel_processed(). Signed-off-by: H. Nikolaus Schaller <hns@goldelico.com> Signed-off-by: Marek Belisko <marek@goldelico.com> Signed-off-by: Sebastian Reichel <sre@kernel.org>
2015-09-26wm831x_power: Use IRQF_ONESHOT to request threaded IRQsValentin Rothberg
Since commit 1c6c69525b40 ("genirq: Reject bogus threaded irq requests") threaded IRQs without a primary handler need to be requested with IRQF_ONESHOT, otherwise the request will fail. scripts/coccinelle/misc/irqf_oneshot.cocci detected this issue. Fixes: b5874f33bbaf ("wm831x_power: Use genirq") Signed-off-by: Valentin Rothberg <valentinrothberg@gmail.com> Signed-off-by: Sebastian Reichel <sre@kernel.org>
2015-09-24power_supply: Add support for tps65217-charger.Enric Balletbo i Serra
This patch adds support for the tps65217 charger driver. This driver is responsible for controlling the charger aspect of the tps65217 mfd. Currently, this mainly consists of turning on and off the charger, but some other features of the charger can be supported through this driver. Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com> Signed-off-by: Sebastian Reichel <sre@kernel.org>
2015-09-24power: qcom_smbb: test the correct variableDan Carpenter
"state" is a bool so it's never less than zero. The intent was to test "ret" instead. Fixes: 56d7df8716b2 ('power: Add Qualcomm SMBB driver') Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Sebastian Reichel <sre@kernel.org>
2015-09-23bq2415x_charger: Fix null pointer dereferencePali Rohár
Commit b68c3161430a (bq2415x_charger: Allow to load and use driver even if notify device is not registered yet) introduced null pointer dereference in case bq is NULL. This patch fixes it. Fixes: b68c3161430a ("bq2415x_charger: Allow to load and use driver even if notify device is not registered yet") Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Pali Rohár <pali.rohar@gmail.com> Signed-off-by: Sebastian Reichel <sre@kernel.org>
2015-09-23power: bq27xxx_battery: Add interrupt handling supportAndrew F. Davis
Some devices have a pin that can generate an interrupt when the battery's status changes. Add an interrupt handler to read the new battery status. Signed-off-by: Andrew F. Davis <afd@ti.com> Signed-off-by: Sebastian Reichel <sre@kernel.org>
2015-09-23power: bq27xxx_battery: Cleanup health checkingAndrew F. Davis
Reorganize the logic checking battery health and add under temperature condition checking. Signed-off-by: Andrew F. Davis <afd@ti.com> Acked-by: Pali Rohár <pali.rohar@gmail.com> Signed-off-by: Sebastian Reichel <sre@kernel.org>
2015-09-23power: bq27xxx_battery: Add support for additional bq27xxx family devicesAndrew F. Davis
Add support for additional devices and register equivalent family devices including the bq27010, bq27210, bq27500, bq27510, bq27520, bq27530, bq27531, bq27541, bq27542, bq27546, bq27545, bq27441, bq27421, and the bq27641. To facilitate this process the register mapings have been moved to tables and other small cleanups have been made. Signed-off-by: Andrew F. Davis <afd@ti.com> Signed-off-by: Sebastian Reichel <sre@kernel.org>
2015-09-23power: bq27xxx_battery: Fix typos and change naming for state of charge ↵Andrew F. Davis
functions Fix typos and change "relative state of charge" to "state of charge" as not all supported devices use relative state of charge. Signed-off-by: Andrew F. Davis <afd@ti.com> Acked-by: Pali Rohár <pali.rohar@gmail.com> Signed-off-by: Sebastian Reichel <sre@kernel.org>
2015-09-23power: bq27xxx_battery: Platform initialization must declare a deviceAndrew F. Davis
When initialized as a platform device the initializer must now specify a device. An empty device name is no longer valid. Signed-off-by: Andrew F. Davis <afd@ti.com> Signed-off-by: Sebastian Reichel <sre@kernel.org>
2015-09-23power: bq27x00_battery: Renaming for consistencyAndrew F. Davis
Rename functions that are used by multiple devices. New devices have been added and the function names and driver name are no longer general enough for the functionality they provide. Signed-off-by: Andrew F. Davis <afd@ti.com> Acked-by: Tony Lindgren <tony@atomide.com> Acked-by: GUAN Xuetao <gxt@mprc.pku.edu.cn> Signed-off-by: Sebastian Reichel <sre@kernel.org>
2015-09-22power: bq27x00_battery: Remove unneeded i2c MODULE_ALIASAndrew F. Davis
The MODULE_DEVICE_TABLE macro automatically adds all needed i2c MODULE_ALIASes so remove the extra MODULE_ALIAS. Signed-off-by: Andrew F. Davis <afd@ti.com> Acked-by: Pali Rohár <pali.rohar@gmail.com> Signed-off-by: Sebastian Reichel <sre@kernel.org>
2015-09-22power_supply: max8998: Use devm_power_supply_registerVaishali Thakkar
Use managed resource function devm_power_supply_register instead of power_supply_register to simplify the error path by allowing unregister to happen automatically on error. To be compatible with the change, replace various gotos by direct returns and remove unneeded label err. Also, remove max8998_battery_remove as it is now redundant. Signed-off-by: Vaishali Thakkar <vthakkar1994@gmail.com> Signed-off-by: Sebastian Reichel <sre@kernel.org>
2015-09-22tps65090-charger: Fix module autoload for OF platform driverLuis de Bethencourt
This platform driver has a OF device ID table but the OF module alias information is not created so module autoloading won't work. Signed-off-by: Luis de Bethencourt <luisbg@osg.samsung.com> Signed-off-by: Sebastian Reichel <sre@kernel.org>
2015-09-22max8903_charger: Convert to using managed resourcesVaishali Thakkar
Use managed resource functions devm_request_threaded_irq and devm_power_supply_register to simplify error handling. To be compatible with the change, various gotos are replaced with direct returns and unneeded labels are dropped. Also, remove max8903_remove as it is now redundant. Signed-off-by: Vaishali Thakkar <vthakkar1994@gmail.com> Signed-off-by: Sebastian Reichel <sre@kernel.org>
2015-09-22power: max17042_battery: Convert to using managed resourcesVaishali Thakkar
Use managed resource functions devm_request_threaded_irq and devm_power_supply_register to simplify error handling. Also, remove max17042_remove as it is now redundant. Signed-off-by: Vaishali Thakkar <vthakkar1994@gmail.com> Signed-off-by: Sebastian Reichel <sre@kernel.org>
2015-09-22power: reset: at91-reset/trivial: driver applies to SAMA5 family as wellNicolas Ferre
This diver doesn't applies only on SAM9 SoC families but on SAMA5 families as well. Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com> Signed-off-by: Sebastian Reichel <sre@kernel.org>
2015-09-22power/reset: at91-poweroff: get and use slow clockAlexandre Belloni
Commit dca1a4b5ff6e ("clk: at91: keep slow clk enabled to prevent system hang") added a workaround for the slow clock as it is not properly handled by its users. Get and use the slow clock as it is necessary for the at91 shutdown controller. Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com> Signed-off-by: Sebastian Reichel <sre@kernel.org>
2015-09-22power/reset: at91-poweroff: allow compiling as a moduleAlexandre Belloni
It was not possible to compile at91-poweroff as a module. Implement .remove() to allow it. Also switch to module_platform_driver_probe() as it is not hotpluggable. Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com> Signed-off-by: Sebastian Reichel <sre@kernel.org>
2015-09-22power/reset: at91-reset: get and use slow clockAlexandre Belloni
Commit dca1a4b5ff6e ("clk: at91: keep slow clk enabled to prevent system hang") added a workaround for the slow clock as it is not properly handled by its users. Get and use the slow clock as it is necessary for the at91 reset controller. Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com> Signed-off-by: Sebastian Reichel <sre@kernel.org>
2015-09-22power/reset: at91-reset: allow compiling as a moduleAlexandre Belloni
It was not possible to compile at91-reset as a module. Implement .remove() to allow it. Also switch to module_platform_driver_probe() as it is not hotpluggable. Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com> Signed-off-by: Sebastian Reichel <sre@kernel.org>
2015-09-22power/reset: at91-reset: remove useless at91_reset_platform_probe()Alexandre Belloni
Since all the at91 platforms are now DT only, at91_reset_platform_probe() is now useless, remove it. Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com> Signed-off-by: Sebastian Reichel <sre@kernel.org>
2015-09-2288pm860x_battery: Convert to using managed resourcesVaishali Thakkar
Use managed resource functions devm_request_threaded_irq and devm_power_supply_register to simplify error handling. To be compatible with the change, various gotos are replaced with direct returns and unneeded labels are dropped. Also, remove pm860x_battery_remove as it is now redundant. Signed-off-by: Vaishali Thakkar <vthakkar1994@gmail.com> Signed-off-by: Sebastian Reichel <sre@kernel.org>
2015-09-22power: Add Qualcomm SMBB driverCourtney Cavin
Add the Qualcomm Switch-Mode Battery Charger and Boost driver, found in pm8941. Signed-off-by: Courtney Cavin <courtney.cavin@sonymobile.com> Signed-off-by: Bjorn Andersson <bjorn.andersson@sonymobile.com> Signed-off-by: Sebastian Reichel <sre@kernel.org>
2015-09-22power: Remove unnecessary MODULE_ALIAS() for I2C driversJavier Martinez Canillas
These drivers already have an I2C device id table that is used to create module aliases and the used MODULE_ALIAS() was either already in the I2C table so it was redundant or wasn't a valid I2C id so it was never used. Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com> Signed-off-by: Sebastian Reichel <sre@kernel.org>
2015-09-22power:lp8727_charger: parsing child node after getting debounce-msMilo Kim
According to lp8727 bindings[*], charging parameter is optional. So parsing can be skipped in case those properties are undefined. However, 'debounce-ms' should be read prior to checking the properties. Otherwise, 'debounce-ms' property will be ignored even it is configured inside the DT. So, counting child is processed after updating 'debounce-ms'. [*] Documentation/devicetree/bindings/power_supply/lp8727_charger.txt Cc: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com> Cc: linux-pm@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Milo Kim <milo.kim@ti.com> Signed-off-by: Sebastian Reichel <sre@kernel.org>
2015-09-22power:lp8727_charger: use the private data instead of updating I2C device ↵Milo Kim
platform data Currently, lp8727 charger driver parses the DT and copies values into the 'cl->dev.platform_data' if 'of_node' exists. This may have architectural issue. Platform data is configurable through the DT or I2C board info inside the platform area. However, lp8727 driver changes this configuration when it is loaded. The driver should get data from the platform side and use the private data, 'lp8727_chg->pdata' instead of changing the original platform data. _probe() procedure is changed as follows. 1. lp8727_parse_dt() returns the pointer of lp8727_platform_data. The driver uses this allocated platform data. So it should keep original platform data, 'dev->platform_data'. 2. In _probe(), check the return value of lp8727_parse_dt(). If an error is found, then exit as PTR_ERR(pdata). 3. If 'of_node' is not found, then the driver just gets the platform data from the I2C device structure. 4. Map the platform data to private data structure. Cc: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com> Cc: linux-pm@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Milo Kim <milo.kim@ti.com> Signed-off-by: Sebastian Reichel <sre@kernel.org>
2015-09-22power: wm831x_power: Convert to devm_kzalloc()Mark Brown
Signed-off-by: Mark Brown <broonie@kernel.org> Signed-off-by: Sebastian Reichel <sre@kernel.org>
2015-09-22power: Add an axp20x-usb-power driverHans de Goede
This adds a driver for the usb power_supply bits of the axp20x PMICs. I initially started writing my own driver, before coming aware of Bruno Prémont's excellent earlier RFC with a driver for this. My driver was lacking CURRENT_MAX and VOLTAGE_MIN support Bruno's drvier has, so I've copied the code for those from his driver. Note that the AC-power-supply and battery charger bits will need separate drivers. Each one needs its own devictree child-node so that other devicetree nodes can reference the right power-supply, and thus each one will get its own mfd-cell / platform_device and platform-driver. Cc: Bruno Prémont <bonbons@linux-vserver.org> Acked-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Bruno Prémont <bonbons@linux-vserver.org> Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Sebastian Reichel <sre@kernel.org>
2015-09-17Merge tag 'for-v4.3-rc' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-power-supply Pull power supply fixes from Sebastian Reichel: "twl4030-charger fixes" * tag 'for-v4.3-rc' of git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-power-supply: twl4030_charger: fix another compile error Revert "twl4030_charger: correctly handle -EPROBE_DEFER from devm_usb_get_phy_by_node"
2015-09-11Merge branch 'next' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/rzhang/linux Pull thermal updates from Zhang Rui: - use int instead of unsigned long to represent temperature to avoid bogus overheat detection when negative temperature reported. From Sascha Hauer. - export available thermal governors information to user space via sysfs. From Wei Ni. - introduce new thermal driver for Wildcat Point platform controller hub, which uses PCH thermal sensor and associated critical and hot trip points. From Tushar Dave. - add suuport for Intel Skylake and Denlow platforms in powerclamp driver. - some small cleanups in thermal core. * 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/rzhang/linux: thermal: Add Intel PCH thermal driver thermal: Add comment explaining test for critical temperature thermal: Use IS_ENABLED instead of #ifdef thermal: remove unnecessary call to thermal_zone_device_set_polling thermal: trivial: fix typo in comment thermal: consistently use int for temperatures thermal: add available policies sysfs attribute thermal/powerclamp: add cpu id for denlow platform thermal/powerclamp: add cpu id for Skylake u/y thermal/powerclamp: add cpu id for skylake h/s
2015-09-10twl4030_charger: fix another compile errorGrazvydas Ignotas
When CONFIG_CHARGER_TWL4030=y and CONFIG_TWL4030_MADC=m we get a compile error: drivers/built-in.o: In function `twl4030_charger_update_current': twl4030_charger.c:(.text+0x504681): undefined reference to `twl4030_get_madc_conversion' Use IS_REACHABLE to fix it. Cc: NeilBrown <neil@brown.name> Reported-by: Randy Dunlap <rdunlap@infradead.org> Signed-off-by: Grazvydas Ignotas <notasas@gmail.com> Acked-by: Tony Lindgren <tony@atomide.com> Signed-off-by: Sebastian Reichel <sre@kernel.org>
2015-09-10Revert "twl4030_charger: correctly handle -EPROBE_DEFER from ↵Sebastian Reichel
devm_usb_get_phy_by_node" Revert commit 3fc3895e4fe17ee92ae1d1bb9f04da6069e8c370, since it introduced a boot failure on some OMAP platforms. Reported-by: Kevin Hilman <khilman@kernel.org> Signed-off-by: Sebastian Reichel <sre@kernel.org>
2015-09-01Merge tag 'pm+acpi-4.3-rc1' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull power management and ACPI updates from Rafael Wysocki: "From the number of commits perspective, the biggest items are ACPICA and cpufreq changes with the latter taking the lead (over 50 commits). On the cpufreq front, there are many cleanups and minor fixes in the core and governors, driver updates etc. We also have a new cpufreq driver for Mediatek MT8173 chips. ACPICA mostly updates its debug infrastructure and adds a number of fixes and cleanups for a good measure. The Operating Performance Points (OPP) framework is updated with new DT bindings and support for them among other things. We have a few updates of the generic power domains framework and a reorganization of the ACPI device enumeration code and bus type operations. And a lot of fixes and cleanups all over. Included is one branch from the MFD tree as it contains some PM-related driver core and ACPI PM changes a few other commits are based on. Specifics: - ACPICA update to upstream revision 20150818 including method tracing extensions to allow more in-depth AML debugging in the kernel and a number of assorted fixes and cleanups (Bob Moore, Lv Zheng, Markus Elfring). - ACPI sysfs code updates and a documentation update related to AML method tracing (Lv Zheng). - ACPI EC driver fix related to serialized evaluations of _Qxx methods and ACPI tools updates allowing the EC userspace tool to be built from the kernel source (Lv Zheng). - ACPI processor driver updates preparing it for future introduction of CPPC support and ACPI PCC mailbox driver updates (Ashwin Chaugule). - ACPI interrupts enumeration fix for a regression related to the handling of IRQ attribute conflicts between MADT and the ACPI namespace (Jiang Liu). - Fixes related to ACPI device PM (Mika Westerberg, Srinidhi Kasagar). - ACPI device registration code reorganization to separate the sysfs-related code and bus type operations from the rest (Rafael J Wysocki). - Assorted cleanups in the ACPI core (Jarkko Nikula, Mathias Krause, Andy Shevchenko, Rafael J Wysocki, Nicolas Iooss). - ACPI cpufreq driver and ia64 cpufreq driver fixes and cleanups (Pan Xinhui, Rafael J Wysocki). - cpufreq core cleanups on top of the previous changes allowing it to preseve its sysfs directories over system suspend/resume (Viresh Kumar, Rafael J Wysocki, Sebastian Andrzej Siewior). - cpufreq fixes and cleanups related to governors (Viresh Kumar). - cpufreq updates (core and the cpufreq-dt driver) related to the turbo/boost mode support (Viresh Kumar, Bartlomiej Zolnierkiewicz). - New DT bindings for Operating Performance Points (OPP), support for them in the OPP framework and in the cpufreq-dt driver plus related OPP framework fixes and cleanups (Viresh Kumar). - cpufreq powernv driver updates (Shilpasri G Bhat). - New cpufreq driver for Mediatek MT8173 (Pi-Cheng Chen). - Assorted cpufreq driver (speedstep-lib, sfi, integrator) cleanups and fixes (Abhilash Jindal, Andrzej Hajda, Cristian Ardelean). - intel_pstate driver updates including Skylake-S support, support for enabling HW P-states per CPU and an additional vendor bypass list entry (Kristen Carlson Accardi, Chen Yu, Ethan Zhao). - cpuidle core fixes related to the handling of coupled idle states (Xunlei Pang). - intel_idle driver updates including Skylake Client support and support for freeze-mode-specific idle states (Len Brown). - Driver core updates related to power management (Andy Shevchenko, Rafael J Wysocki). - Generic power domains framework fixes and cleanups (Jon Hunter, Geert Uytterhoeven, Rajendra Nayak, Ulf Hansson). - Device PM QoS framework update to allow the latency tolerance setting to be exposed to user space via sysfs (Mika Westerberg). - devfreq support for PPMUv2 in Exynos5433 and a fix for an incorrect exynos-ppmu DT binding (Chanwoo Choi, Javier Martinez Canillas). - System sleep support updates (Alan Stern, Len Brown, SungEun Kim). - rockchip-io AVS support updates (Heiko Stuebner). - PM core clocks support fixup (Colin Ian King). - Power capping RAPL driver update including support for Skylake H/S and Broadwell-H (Radivoje Jovanovic, Seiichi Ikarashi). - Generic device properties framework fixes related to the handling of static (driver-provided) property sets (Andy Shevchenko). - turbostat and cpupower updates (Len Brown, Shilpasri G Bhat, Shreyas B Prabhu)" * tag 'pm+acpi-4.3-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: (180 commits) cpufreq: speedstep-lib: Use monotonic clock cpufreq: powernv: Increase the verbosity of OCC console messages cpufreq: sfi: use kmemdup rather than duplicating its implementation cpufreq: drop !cpufreq_driver check from cpufreq_parse_governor() cpufreq: rename cpufreq_real_policy as cpufreq_user_policy cpufreq: remove redundant 'policy' field from user_policy cpufreq: remove redundant 'governor' field from user_policy cpufreq: update user_policy.* on success cpufreq: use memcpy() to copy policy cpufreq: remove redundant CPUFREQ_INCOMPATIBLE notifier event cpufreq: mediatek: Add MT8173 cpufreq driver dt-bindings: mediatek: Add MT8173 CPU DVFS clock bindings PM / Domains: Fix typo in description of genpd_dev_pm_detach() PM / Domains: Remove unusable governor dummies PM / Domains: Make pm_genpd_init() available to modules PM / domains: Align column headers and data in pm_genpd_summary output powercap / RAPL: disable the 2nd power limit properly tools: cpupower: Fix error when running cpupower monitor PM / OPP: Drop unlikely before IS_ERR(_OR_NULL) PM / OPP: Fix static checker warning (broken 64bit big endian systems) ...
2015-08-31Merge tag 'regulator-v4.3' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator Pull regulator updates from Mark Brown: "The biggest changes in the core this time around have been some refactorings that move us towards being able to drop the list of regulators maintained by the core and instead just use the driver model list maintained for the class devices for regulators which will make the code smaller and avoid some potential bugs. Otherwise another fairly quiet release for the regulator API, highlights include: - a new API for setting voltages based on a minimum, target, maximum triplet - support for continuous voltage ranges rather than tables of explicit steps in the PWM regulator, requiring less explicit configuration - new driver support for Dialog DA9215, Maxim 77843, Mediatek MT6311 and Qualcomm RPM" * tag 'regulator-v4.3' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator: (70 commits) regulator: mt6311: fix platform_no_drv_owner.cocci warnings regulator: ltc3589: Remove unnecessary MODULE_ALIAS() regulator: ad5398: Remove unnecessary MODULE_ALIAS() regulator: pfuze100: Remove unnecessary MODULE_ALIAS() regulator: core: use debug level print in regulator_check_drms regulator: lp872x: handle error case regulator: lp872x: use the private data instead of updating I2C device platform data regulator: isl9305: Export OF module alias information regulators: max77693: register driver earlier to avoid deferred probe regulator: qcom_smd: Set n_voltages for pm8941_lnldo regulator: core: Use IS_ERR_OR_NULL() regulator: core: Define regulator_set_voltage_triplet() regulator: Regulator driver for the Qualcomm RPM regulator: pbias: Fix broken pbias disable functionality regulator: core: Spelling fix regulator: core: Use class device list for regulator_list in late init regulator: core: Move more deallocation into class unregister regulator: core: Reduce rdev locking region when releasing regulator Input: Remove the max77843 haptic driver Input: max77693: Add support for Maxim 77843 ...
2015-08-21bq2415x_charger: Allow to load and use driver even if notify device is not ↵Pali Rohár
registered yet Driver bq2415x_charger works also without notify power supply device for charger detection. But when charger detection is specified in DT, then bq2415x_charger refused to loaded with -EPROBE_DEFER. This patch rewrites code so that notify device for charger detection is checked when power supply event is received and not when registering power supply device. So this patch allows to use bq2415x_charger driver also when kernel is compiled without driver for notify power supply device. Now after this patch scheduled workqueue is called after INIT_DELAYED_WORK, so it also fix problem when scheduled workqueue was called before init. Signed-off-by: Pali Rohár <pali.rohar@gmail.com> Signed-off-by: Sebastian Reichel <sre@kernel.org>