summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Merge tag 'for-v4.4' of ↵Linus Torvalds2015-11-0539-1474/+3818
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-power-supply Pull power supply and reset updates from Sebastian Reichel: - new AXP20X USB Power driver - new Qualcomm SMBB driver - new TPS65217 Charger driver - BQ24257: add BQ24250/BQ24251 support - overhaul bq27x00 battery driver, rename to bq27xxx - misc fixes and cleanups * tag 'for-v4.4' of git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-power-supply: (54 commits) power: bq27xxx_battery: Remove unneeded dependency in Kconfig power: bq27xxx_battery: move irq handler to i2c section power: bq27xxx_battery: fix platform probe twl4030_charger: add missing iio dependency power_supply: charger-manager: add missing of_node_put Documentation: power: bq24257: Document exported sysfs entries power: bq24257: Add various device-specific sysfs properties power: bq24257: Allow input current limit sysfs access power: bq24257: Add input DPM voltage threshold setting support power: bq24257: Add over voltage protection setting support power: bq24257: Add SW-based approach for Power Good determination power: bq24257: Allow manual setting of input current limit power: bq24257: Add bit definition for temp sense enable power: bq24257: Add basic support for bq24250/bq24251 dt: power: bq24257-charger: Cover additional devices power: bq24257: Simplify bq24257_power_supply_init() power: bq24257: Use managed power supply register power: bq24257: Streamline input current limit setup power: bq24257: Remove IRQ config through stat-gpios power: bq27xxx_battery: fix signedness bug in bq27xxx_battery_read_health() ...
| * power: bq27xxx_battery: Remove unneeded dependency in KconfigAndrew F. Davis2015-10-191-1/+0
| | | | | | | | | | | | | | | | | | | | I2C is only required when using the config item BATTERY_BQ27XXX_I2C which already depends on the I2C subsystem, remove the unneeded dependency from BATTERY_BQ27XXX. 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>
| * power: bq27xxx_battery: move irq handler to i2c sectionSebastian Reichel2015-10-191-9/+9
| | | | | | | | | | | | | | | | | | | | The IRQ handler is not used by the platform based code resulting in a 'defined but not used' warning, if CONFIG_BQ27XXX_I2C is not enabled. Signed-off-by: Sebastian Reichel <sre@kernel.org> Acked-by: Pali Rohár <pali.rohar@gmail.com> Acked-by: Andrew F. Davis <afd@ti.com>
| * power: bq27xxx_battery: fix platform probeSebastian Reichel2015-10-191-0/+1
| | | | | | | | | | | | | | | | | | Add missing initialization of register mapping table to platform probe function. Signed-off-by: Sebastian Reichel <sre@kernel.org> Acked-by: Pali Rohár <pali.rohar@gmail.com> Acked-by: Andrew F. Davis <afd@ti.com>
| * twl4030_charger: add missing iio dependencySebastian Reichel2015-10-161-1/+1
| | | | | | | | | | | | | | | | | | This driver fails to link without CONFIG_IIO, since there are no stubs for the iio_channels functions. Signed-off-by: Sebastian Reichel <sre@kernel.org> Acked-by: Marek Belisko <marek@goldelico.com> Acked-by: Nikolaus Schaller <hns@goldelico.com>
| * power_supply: charger-manager: add missing of_node_putJulia Lawall2015-10-151-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | for_each_child_of_node performs an of_node_get on each iteration, so a break out of the loop requires an of_node_put. The semantic patch that fixes this problem is as follows (http://coccinelle.lip6.fr): // <smpl> @@ expression root,e; local idexpression child; @@ for_each_child_of_node(root, child) { ... when != of_node_put(child) when != e = child ( return child; | + of_node_put(child); ? return ...; ) ... } // </smpl> Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr> Reviewed-by: Krzysztof Kozlowski <k.kozlowski@samsung.com> Signed-off-by: Sebastian Reichel <sre@kernel.org>
| * Documentation: power: bq24257: Document exported sysfs entriesAndreas Dannenberg2015-10-011-0/+58
| | | | | | | | | | | | | | | | | | | | | | | | | | Document the settings exported by bq24257 charger driver through sysfs entries: - ovp_voltage - in_dpm_voltage - high_impedance_enable - sysoff_enable Signed-off-by: Andreas Dannenberg <dannenberg@ti.com> Reviewed-by: Krzysztof Kozlowski <k.kozlowski@samsung.com> Signed-off-by: Sebastian Reichel <sre@kernel.org>
| * power: bq24257: Add various device-specific sysfs propertiesAndreas Dannenberg2015-09-291-0/+53
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * power: bq24257: Allow input current limit sysfs accessAndreas Dannenberg2015-09-291-6/+79
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * power: bq24257: Add input DPM voltage threshold setting supportAndreas Dannenberg2015-09-291-0/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * power: bq24257: Add over voltage protection setting supportAndreas Dannenberg2015-09-291-3/+64
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * power: bq24257: Add SW-based approach for Power Good determinationAndreas Dannenberg2015-09-291-11/+45
| | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * power: bq24257: Allow manual setting of input current limitAndreas Dannenberg2015-09-291-18/+75
| | | | | | | | | | | | | | | | | | | | | | 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>
| * power: bq24257: Add bit definition for temp sense enableAndreas Dannenberg2015-09-291-1/+2
| | | | | | | | | | | | | | | | | | 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>
| * power: bq24257: Add basic support for bq24250/bq24251Andreas Dannenberg2015-09-292-5/+52
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * dt: power: bq24257-charger: Cover additional devicesAndreas Dannenberg2015-09-291-5/+48
| | | | | | | | | | | | | | | | | | Extend the bq24257 charger's device tree documentation to cover the bq24250 and bq24251 devices as well feature additions. Signed-off-by: Andreas Dannenberg <dannenberg@ti.com> Reviewed-by: Krzysztof Kozlowski <k.kozlowski@samsung.com> Signed-off-by: Sebastian Reichel <sre@kernel.org>
| * power: bq24257: Simplify bq24257_power_supply_init()Andreas Dannenberg2015-09-291-4/+1
| | | | | | | | | | | | | | | | 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>
| * power: bq24257: Use managed power supply registerAndreas Dannenberg2015-09-291-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * power: bq24257: Streamline input current limit setupAndreas Dannenberg2015-09-281-18/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * power: bq24257: Remove IRQ config through stat-gpiosAndreas Dannenberg2015-09-281-24/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * power: bq27xxx_battery: fix signedness bug in bq27xxx_battery_read_health()Andrzej Hajda2015-09-281-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * drivers: power: twl4030_charger: fix link problems when building as moduleMarek Belisko2015-09-261-12/+27
| | | | | | | | | | | | | | | | | | | | | | | | 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>
| * ARM: dts: twl4030: Add iio properties for bci subnodeMarek Belisko2015-09-261-0/+2
| | | | | | | | | | | | | | | | Added new iio properties which are required for twl4030-charger driver and allow to use twl4030-madc indirectly. Signed-off-by: Marek Belisko <marek@goldelico.com> Signed-off-by: Sebastian Reichel <sre@kernel.org>
| * wm831x_power: Use IRQF_ONESHOT to request threaded IRQsValentin Rothberg2015-09-261-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | 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>
| * power_supply: Add support for tps65217-charger.Enric Balletbo i Serra2015-09-243-0/+272
| | | | | | | | | | | | | | | | | | | | 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>
| * devicetree: Add TPS65217 charger binding.Enric Balletbo i Serra2015-09-241-0/+12
| | | | | | | | | | | | | | The TPS65217 charger is a subnode of the TPS65217 MFD. Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com> Signed-off-by: Sebastian Reichel <sre@kernel.org>
| * power: qcom_smbb: test the correct variableDan Carpenter2015-09-241-1/+1
| | | | | | | | | | | | | | | | | | "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>
| * bq2415x_charger: Fix null pointer dereferencePali Rohár2015-09-231-1/+1
| | | | | | | | | | | | | | | | | | | | | | 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>
| * power: bq27xxx_battery: Add interrupt handling supportAndrew F. Davis2015-09-231-0/+23
| | | | | | | | | | | | | | | | | | 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>
| * power: bq27xxx_battery: Cleanup health checkingAndrew F. Davis2015-09-231-22/+42
| | | | | | | | | | | | | | | | | | 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>
| * power: bq27xxx_battery: Add support for additional bq27xxx family devicesAndrew F. Davis2015-09-232-211/+421
| | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * power: bq27xxx_battery: Fix typos and change naming for state of charge ↵Andrew F. Davis2015-09-231-14/+14
| | | | | | | | | | | | | | | | | | | | | | 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>
| * power: bq27xxx_battery: Platform initialization must declare a deviceAndrew F. Davis2015-09-233-4/+12
| | | | | | | | | | | | | | | | 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>
| * power: bq27x00_battery: Renaming for consistencyAndrew F. Davis2015-09-238-186/+187
| | | | | | | | | | | | | | | | | | | | | | 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>
| * power: bq27x00_battery: Remove unneeded i2c MODULE_ALIASAndrew F. Davis2015-09-221-4/+0
| | | | | | | | | | | | | | | | | | 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>
| * power_supply: max8998: Use devm_power_supply_registerVaishali Thakkar2015-09-221-22/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * power: charger-manager: comment spelling fixesMarcel Ziswiler2015-09-221-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | By accident I stumbled over a few misspelled words in the charger-manager header file which this patch fixes. Namely: - Extcon rather than Exton - constraint rather than constratint - existence rather than existance - difference rather than diffential While at it also add a missing space before a closing comment star forward-slash. Signed-off-by: Marcel Ziswiler <marcel@ziswiler.com> Signed-off-by: Sebastian Reichel <sre@kernel.org>
| * tps65090-charger: Fix module autoload for OF platform driverLuis de Bethencourt2015-09-221-0/+1
| | | | | | | | | | | | | | | | 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>
| * max8903_charger: Convert to using managed resourcesVaishali Thakkar2015-09-221-65/+28
| | | | | | | | | | | | | | | | | | | | | | | | 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>
| * power: max17042_battery: Convert to using managed resourcesVaishali Thakkar2015-09-221-17/+9
| | | | | | | | | | | | | | | | | | | | 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>
| * power: reset: at91-reset/trivial: driver applies to SAMA5 family as wellNicolas Ferre2015-09-221-1/+1
| | | | | | | | | | | | | | | | 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>
| * power/reset: at91-poweroff: get and use slow clockAlexandre Belloni2015-09-221-0/+15
| | | | | | | | | | | | | | | | | | | | | | | | 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>
| * power/reset: at91-poweroff: allow compiling as a moduleAlexandre Belloni2015-09-222-4/+16
| | | | | | | | | | | | | | | | | | 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>
| * power/reset: at91-reset: get and use slow clockAlexandre Belloni2015-09-221-1/+16
| | | | | | | | | | | | | | | | | | | | | | | | 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>
| * power/reset: at91-reset: allow compiling as a moduleAlexandre Belloni2015-09-222-4/+15
| | | | | | | | | | | | | | | | | | 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>
| * power/reset: at91-reset: remove useless at91_reset_platform_probe()Alexandre Belloni2015-09-221-44/+3
| | | | | | | | | | | | | | | | 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>
| * 88pm860x_battery: Convert to using managed resourcesVaishali Thakkar2015-09-221-26/+11
| | | | | | | | | | | | | | | | | | | | | | | | 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>
| * power: Add Qualcomm SMBB driverCourtney Cavin2015-09-223-0/+964
| | | | | | | | | | | | | | | | | | 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>
| * dt-binding: power: Add Qualcomm SMBB bindingCourtney Cavin2015-09-221-0/+131
| | | | | | | | | | | | | | | | | | Add the Qualcomm Switch-Mode Battery Charger and Boost device tree binding. 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>
| * power: Remove unnecessary MODULE_ALIAS() for I2C driversJavier Martinez Canillas2015-09-224-4/+0
| | | | | | | | | | | | | | | | | | 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>