- 16 10月, 2015 1 次提交
-
-
由 Sebastian Reichel 提交于
This driver fails to link without CONFIG_IIO, since there are no stubs for the iio_channels functions. Signed-off-by: NSebastian Reichel <sre@kernel.org> Acked-by: NMarek Belisko <marek@goldelico.com> Acked-by: NNikolaus Schaller <hns@goldelico.com>
-
- 15 10月, 2015 1 次提交
-
-
由 Julia Lawall 提交于
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: NJulia Lawall <Julia.Lawall@lip6.fr> Reviewed-by: NKrzysztof Kozlowski <k.kozlowski@samsung.com> Signed-off-by: NSebastian Reichel <sre@kernel.org>
-
- 01 10月, 2015 1 次提交
-
-
由 Andreas Dannenberg 提交于
Document the settings exported by bq24257 charger driver through sysfs entries: - ovp_voltage - in_dpm_voltage - high_impedance_enable - sysoff_enable Signed-off-by: NAndreas Dannenberg <dannenberg@ti.com> Reviewed-by: NKrzysztof Kozlowski <k.kozlowski@samsung.com> Signed-off-by: NSebastian Reichel <sre@kernel.org>
-
- 29 9月, 2015 14 次提交
-
-
由 Andreas 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/bq24257Signed-off-by: NAndreas Dannenberg <dannenberg@ti.com> Reviewed-by: NKrzysztof Kozlowski <k.kozlowski@samsung.com> Signed-off-by: NSebastian Reichel <sre@kernel.org>
-
由 Andreas 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: NAndreas Dannenberg <dannenberg@ti.com> Reviewed-by: NKrzysztof Kozlowski <k.kozlowski@samsung.com> Signed-off-by: NSebastian Reichel <sre@kernel.org>
-
由 Andreas 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: NAndreas Dannenberg <dannenberg@ti.com> Reviewed-by: NLaurentiu Palcu <laurentiu.palcu@intel.com> Reviewed-by: NKrzysztof Kozlowski <k.kozlowski@samsung.com> Signed-off-by: NSebastian Reichel <sre@kernel.org>
-
由 Andreas 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: NAndreas Dannenberg <dannenberg@ti.com> Reviewed-by: NLaurentiu Palcu <laurentiu.palcu@intel.com> Reviewed-by: NKrzysztof Kozlowski <k.kozlowski@samsung.com> Signed-off-by: NSebastian Reichel <sre@kernel.org>
-
由 Andreas 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: NAndreas Dannenberg <dannenberg@ti.com> Reviewed-by: NKrzysztof Kozlowski <k.kozlowski@samsung.com> Signed-off-by: NSebastian Reichel <sre@kernel.org>
-
由 Andreas 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: NAndreas Dannenberg <dannenberg@ti.com> Reviewed-by: NKrzysztof Kozlowski <k.kozlowski@samsung.com> Signed-off-by: NSebastian Reichel <sre@kernel.org>
-
由 Andreas Dannenberg 提交于
Adding a missing bit definition for the sake of consistency device model vs. bit field representation. No change in functionality. Signed-off-by: NAndreas Dannenberg <dannenberg@ti.com> Reviewed-by: NLaurentiu Palcu <laurentiu.palcu@intel.com> Signed-off-by: NSebastian Reichel <sre@kernel.org>
-
由 Andreas 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: NAndreas Dannenberg <dannenberg@ti.com> Reviewed-by: NKrzysztof Kozlowski <k.kozlowski@samsung.com> Signed-off-by: NSebastian Reichel <sre@kernel.org>
-
由 Andreas Dannenberg 提交于
Extend the bq24257 charger's device tree documentation to cover the bq24250 and bq24251 devices as well feature additions. Signed-off-by: NAndreas Dannenberg <dannenberg@ti.com> Reviewed-by: NKrzysztof Kozlowski <k.kozlowski@samsung.com> Signed-off-by: NSebastian Reichel <sre@kernel.org>
-
由 Andreas Dannenberg 提交于
Eliminate a few lines of code by using the PTR_ERR_OR_ZERO() macro. Signed-off-by: NAndreas Dannenberg <dannenberg@ti.com> Reviewed-by: NKrzysztof Kozlowski <k.kozlowski@samsung.com> Signed-off-by: NSebastian Reichel <sre@kernel.org>
-
由 Andreas 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: NAndreas Dannenberg <dannenberg@ti.com> Reviewed-by: NKrzysztof Kozlowski <k.kozlowski@samsung.com> Signed-off-by: NSebastian Reichel <sre@kernel.org>
-
由 Andreas 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: NAndreas Dannenberg <dannenberg@ti.com> Signed-off-by: NSebastian Reichel <sre@kernel.org>
-
由 Andreas 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 "845c8770 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: NAndreas Dannenberg <dannenberg@ti.com> Signed-off-by: NSebastian Reichel <sre@kernel.org>
-
由 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: 74aab849 ('power: bq27xxx_battery: Cleanup health checking') Signed-off-by: NAndrzej Hajda <a.hajda@samsung.com> Signed-off-by: NDan Carpenter <dan.carpenter@oracle.com> Acked-By: NPali Rohár <pali.rohar@gmail.com> Acked-by: NAndrew F. Davis <afd@ti.com> Signed-off-by: NSebastian Reichel <sre@kernel.org>
-
- 27 9月, 2015 3 次提交
-
-
由 Marek 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: NH. Nikolaus Schaller <hns@goldelico.com> Signed-off-by: NMarek Belisko <marek@goldelico.com> Signed-off-by: NSebastian Reichel <sre@kernel.org>
-
由 Marek Belisko 提交于
Added new iio properties which are required for twl4030-charger driver and allow to use twl4030-madc indirectly. Signed-off-by: NMarek Belisko <marek@goldelico.com> Signed-off-by: NSebastian Reichel <sre@kernel.org>
-
由 Valentin Rothberg 提交于
Since commit 1c6c6952 ("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: b5874f33 ("wm831x_power: Use genirq") Signed-off-by: NValentin Rothberg <valentinrothberg@gmail.com> Signed-off-by: NSebastian Reichel <sre@kernel.org>
-
- 25 9月, 2015 3 次提交
-
-
由 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: NEnric Balletbo i Serra <enric.balletbo@collabora.com> Signed-off-by: NSebastian Reichel <sre@kernel.org>
-
由 Enric Balletbo i Serra 提交于
The TPS65217 charger is a subnode of the TPS65217 MFD. Signed-off-by: NEnric Balletbo i Serra <enric.balletbo@collabora.com> Signed-off-by: NSebastian Reichel <sre@kernel.org>
-
由 Dan Carpenter 提交于
"state" is a bool so it's never less than zero. The intent was to test "ret" instead. Fixes: 56d7df87 ('power: Add Qualcomm SMBB driver') Signed-off-by: NDan Carpenter <dan.carpenter@oracle.com> Signed-off-by: NSebastian Reichel <sre@kernel.org>
-
- 24 9月, 2015 1 次提交
-
-
由 Pali Rohár 提交于
Commit b68c3161 (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: b68c3161 ("bq2415x_charger: Allow to load and use driver even if notify device is not registered yet") Reported-by: NDan Carpenter <dan.carpenter@oracle.com> Signed-off-by: NPali Rohár <pali.rohar@gmail.com> Signed-off-by: NSebastian Reichel <sre@kernel.org>
-
- 23 9月, 2015 6 次提交
-
-
由 Andrew 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: NAndrew F. Davis <afd@ti.com> Signed-off-by: NSebastian Reichel <sre@kernel.org>
-
由 Andrew F. Davis 提交于
Reorganize the logic checking battery health and add under temperature condition checking. Signed-off-by: NAndrew F. Davis <afd@ti.com> Acked-by: NPali Rohár <pali.rohar@gmail.com> Signed-off-by: NSebastian Reichel <sre@kernel.org>
-
由 Andrew 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: NAndrew F. Davis <afd@ti.com> Signed-off-by: NSebastian Reichel <sre@kernel.org>
-
由 Andrew F. Davis 提交于
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: NAndrew F. Davis <afd@ti.com> Acked-by: NPali Rohár <pali.rohar@gmail.com> Signed-off-by: NSebastian Reichel <sre@kernel.org>
-
由 Andrew 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: NAndrew F. Davis <afd@ti.com> Signed-off-by: NSebastian Reichel <sre@kernel.org>
-
由 Andrew 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: NAndrew F. Davis <afd@ti.com> Acked-by: NTony Lindgren <tony@atomide.com> Acked-by: NGUAN Xuetao <gxt@mprc.pku.edu.cn> Signed-off-by: NSebastian Reichel <sre@kernel.org>
-
- 22 9月, 2015 10 次提交
-
-
由 Andrew F. Davis 提交于
The MODULE_DEVICE_TABLE macro automatically adds all needed i2c MODULE_ALIASes so remove the extra MODULE_ALIAS. Signed-off-by: NAndrew F. Davis <afd@ti.com> Acked-by: NPali Rohár <pali.rohar@gmail.com> Signed-off-by: NSebastian Reichel <sre@kernel.org>
-
由 Vaishali 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: NVaishali Thakkar <vthakkar1994@gmail.com> Signed-off-by: NSebastian Reichel <sre@kernel.org>
-
由 Marcel Ziswiler 提交于
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: NMarcel Ziswiler <marcel@ziswiler.com> Signed-off-by: NSebastian Reichel <sre@kernel.org>
-
由 Luis 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: NLuis de Bethencourt <luisbg@osg.samsung.com> Signed-off-by: NSebastian Reichel <sre@kernel.org>
-
由 Vaishali 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: NVaishali Thakkar <vthakkar1994@gmail.com> Signed-off-by: NSebastian Reichel <sre@kernel.org>
-
由 Vaishali 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: NVaishali Thakkar <vthakkar1994@gmail.com> Signed-off-by: NSebastian Reichel <sre@kernel.org>
-
由 Nicolas Ferre 提交于
This diver doesn't applies only on SAM9 SoC families but on SAMA5 families as well. Signed-off-by: NNicolas Ferre <nicolas.ferre@atmel.com> Signed-off-by: NSebastian Reichel <sre@kernel.org>
-
由 Alexandre Belloni 提交于
Commit dca1a4b5 ("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: NAlexandre Belloni <alexandre.belloni@free-electrons.com> Signed-off-by: NSebastian Reichel <sre@kernel.org>
-
由 Alexandre 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: NAlexandre Belloni <alexandre.belloni@free-electrons.com> Signed-off-by: NSebastian Reichel <sre@kernel.org>
-
由 Alexandre Belloni 提交于
Commit dca1a4b5 ("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: NAlexandre Belloni <alexandre.belloni@free-electrons.com> Signed-off-by: NSebastian Reichel <sre@kernel.org>
-