- 24 3月, 2016 1 次提交
-
-
由 David Wu 提交于
This adds the necessary data for handling io voltage domains on the rk3399. As interesting tidbit, the rk3399 contains two separate iodomain areas. One in the regular General Register Files (GRF) and one in PMUGRF in the pmu power domain. Signed-off-by: NDavid Wu <david.wu@rock-chips.com> Reviewed-by: NHeiko Stuebner <heiko@sntech.de> Acked-by: NKevin Hilman <khilman@baylibre.com> Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
-
- 22 2月, 2016 1 次提交
-
-
由 Ivaylo Dimitrov 提交于
Patch <703df6c0> ("power: bq27xxx_battery: Reorganize I2C into a module") has removed the device name numbering from bq27xxx_battery_i2c_probe. Fix that by restoring the code. Fixes: 703df6c0Signed-off-by: NIvaylo Dimitrov <ivo.g.dimitrov.75@gmail.com> Reviewed-by: NPali Rohár <pali.rohar@gmail.com> Tested-by: NPali Rohár <pali.rohar@gmail.com> Signed-off-by: NSebastian Reichel <sre@kernel.org>
-
- 14 1月, 2016 1 次提交
-
-
由 Liu Xiang 提交于
Currently in bq27541 driver, the average power register address is incorrectly set to 0x76, which would result in an error: bq27xxx-battery 2-0055: error reading average power register 10: -11 According to the bq27541 datasheet, fix this problem by setting the average power register address to 0x24. Fixes: d74534c2 ("power: bq27xxx_battery: Add support for additional bq27xxx family devices") Signed-off-by: NLiu Xiang <liu.xiang6@zte.com.cn> Acked-by: NAndrew F. Davis <afd@ti.com> Signed-off-by: NSebastian Reichel <sre@kernel.org>
-
- 08 1月, 2016 1 次提交
-
-
由 Sasha Levin 提交于
Writing 0 length data into test_power makes it access an invalid array location and kill the system. Fixes: f17ef9b2 ("power: Make test_power driver more dynamic.") Signed-off-by: NSasha Levin <sasha.levin@oracle.com> Signed-off-by: NSebastian Reichel <sre@kernel.org>
-
- 07 1月, 2016 4 次提交
-
-
由 Geliang Tang 提交于
Use to_delayed_work() instead of open-coding it. Signed-off-by: NGeliang Tang <geliangtang@163.com> Signed-off-by: NSebastian Reichel <sre@kernel.org>
-
由 Ivaylo Dimitrov 提交于
All calls to isp1704_write() are using parameter sequence of isp1704_write(isp, reg, val) but the function is defined as isp1704_write(isp, val, reg). Fix isp1704_write function definition so that the driver to be functional. Signed-off-by: NIvaylo Dimitrov <ivo.g.dimitrov.75@gmail.com> Reviewed-by: NPali Rohár <pali.rohar@gmail.com> Signed-off-by: NSebastian Reichel <sre@kernel.org>
-
由 H. Nikolaus Schaller 提交于
bug: according to data sheet some register numbers are wrong. tested: no Fixes: d74534c2 ("power: bq27xxx_battery: Add support for additional bq27xxx family devices") Signed-off-by: NH. Nikolaus Schaller <hns@goldelico.com> Acked-by: NAndrew F. Davis <afd@ti.com> Signed-off-by: NSebastian Reichel <sre@kernel.org>
-
由 H. Nikolaus Schaller 提交于
bug: the driver reports funny capacity values: root@letux:/sys/class/power_supply/bq27000-battery# cat uevent POWER_SUPPLY_NAME=bq27000-battery POWER_SUPPLY_STATUS=Charging POWER_SUPPLY_PRESENT=1 POWER_SUPPLY_VOLTAGE_NOW=3702000 POWER_SUPPLY_CURRENT_NOW=-464635 POWER_SUPPLY_CAPACITY=1536 <- over 100% is magic POWER_SUPPLY_CAPACITY_LEVEL=Normal POWER_SUPPLY_TEMP=311 POWER_SUPPLY_TIME_TO_FULL_NOW=10440 POWER_SUPPLY_TECHNOLOGY=Li-ion POWER_SUPPLY_CHARGE_FULL=805450 POWER_SUPPLY_CHARGE_NOW=1068 POWER_SUPPLY_CHARGE_FULL_DESIGN=8844998 <- battery has just 1200 mAh POWER_SUPPLY_CYCLE_COUNT=21 POWER_SUPPLY_ENERGY_NOW=0 POWER_SUPPLY_POWER_AVG=0 POWER_SUPPLY_HEALTH=Good POWER_SUPPLY_MANUFACTURER=Texas Instruments reason: the state of charge and the design capacity register are single byte only. The design capacity returns the higer order byte. tested: GTA04 with Openmoko/FIC HF08x battery (using hdq) Fixes: d74534c2 ("power: bq27xxx_battery: Add support for additional bq27xxx family devices") Signed-off-by: NH. Nikolaus Schaller <hns@goldelico.com> Acked-by: NAndrew F. Davis <afd@ti.com> Reviewed-by: NPali Rohár <pali.rohar@gmail.com> Signed-off-by: NSebastian Reichel <sre@kernel.org>
-
- 08 12月, 2015 1 次提交
-
-
由 Krzysztof Kozlowski 提交于
Currently the reset/power off handlers (POWER_RESET) and Adaptive Voltage Scaling class (POWER_AVS) are not built when POWER_SUPPLY is disabled. The POWER_RESET is also not visible in drivers main section of config. However they do not really depend on power supply so they can be built always. The objects for power supply drivers already depend on particular Kconfig symbols so there is no need for any changes in drivers/power/Makefile. This allows selecting POWER_RESET from main drivers config section and fixes following build warning (encountered on ARM exynos defconfig when POWER_SUPPLY is disabled manually): warning: (ARCH_HISI && ARCH_INTEGRATOR && ARCH_EXYNOS && ARCH_VEXPRESS && REALVIEW_DT) selects POWER_RESET which has unmet direct dependencies (POWER_SUPPLY) warning: (ARCH_EXYNOS) selects POWER_RESET_SYSCON which has unmet direct dependencies (POWER_SUPPLY && POWER_RESET && OF) warning: (ARCH_EXYNOS) selects POWER_RESET_SYSCON_POWEROFF which has unmet direct dependencies (POWER_SUPPLY && POWER_RESET && OF) Reported-by: NPavel Fedin <p.fedin@samsung.com> Signed-off-by: NKrzysztof Kozlowski <k.kozlowski@samsung.com> Signed-off-by: NSebastian Reichel <sre@kernel.org>
-
- 05 12月, 2015 6 次提交
-
-
由 Andrew F. Davis 提交于
Separate out I2C functionality into a module. This fixes several small issues and simplifies the driver initialization. Signed-off-by: NAndrew F. Davis <afd@ti.com> Signed-off-by: NSebastian Reichel <sre@kernel.org>
-
由 NeilBrown 提交于
Print message that battery is not calibrated only once to avoid spamming the log. Suggested-By: NH. Nikolaus Schaller <hns@goldelico.com> Suggested-By: NPali Rohár <pali.rohar@gmail.com> Signed-off-by: NSebastian Reichel <sre@kernel.org>
-
由 Saurabh Sengar 提交于
If no primary handler is specified for threaded_irq then a default one is assigned which always returns IRQ_WAKE_THREAD. This handler requires the IRQF_ONESHOT, because the source of interrupt is not disabled. Signed-off-by: NSaurabh Sengar <saurabh.truth@gmail.com> Signed-off-by: NSebastian Reichel <sre@kernel.org>
-
由 Julia Lawall 提交于
for_each_matching_node performs an of_node_get on each iteration, so a break out of the loop requires an of_node_put. A simplified version of the semantic patch that fixes this problem is as follows (http://coccinelle.lip6.fr): // <smpl> @@ expression e,e1; local idexpression np; @@ for_each_matching_node(np, e1) { ... when != of_node_put(np) when != e = np ( return np; | + of_node_put(np); ? return ...; ) ... } // </smpl> Signed-off-by: NJulia Lawall <Julia.Lawall@lip6.fr> Signed-off-by: NSebastian Reichel <sre@kernel.org>
-
由 Julia Lawall 提交于
The ds278x_battery_ops structure is never modified, so declare it as const. Done with the help of Coccinelle. Signed-off-by: NJulia Lawall <Julia.Lawall@lip6.fr> Signed-off-by: NSebastian Reichel <sre@kernel.org>
-
由 Markus Elfring 提交于
The of_node_put() function tests whether its argument is NULL and then returns immediately. Thus the test around the calls is not needed. This issue was detected by using the Coccinelle software. Signed-off-by: NMarkus Elfring <elfring@users.sourceforge.net> Acked-by: NPali Rohár <pali.rohar@gmail.com> Signed-off-by: NSebastian Reichel <sre@kernel.org>
-
- 19 10月, 2015 3 次提交
-
-
由 Andrew F. Davis 提交于
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: NAndrew F. Davis <afd@ti.com> Acked-by: NPali Rohár <pali.rohar@gmail.com> Signed-off-by: NSebastian Reichel <sre@kernel.org>
-
由 Sebastian Reichel 提交于
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: NSebastian Reichel <sre@kernel.org> Acked-by: NPali Rohár <pali.rohar@gmail.com> Acked-by: NAndrew F. Davis <afd@ti.com>
-
由 Sebastian Reichel 提交于
Add missing initialization of register mapping table to platform probe function. Signed-off-by: NSebastian Reichel <sre@kernel.org> Acked-by: NPali Rohár <pali.rohar@gmail.com> Acked-by: NAndrew F. Davis <afd@ti.com>
-
- 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>
-
- 14 10月, 2015 1 次提交
-
-
由 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> Reviewed-by: NHeiko Stuebner <heiko@sntech.de> Acked-by: NKevin Hilman <khilman@linaro.org> Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
-
- 13 10月, 2015 1 次提交
-
-
由 Adam Thomson 提交于
This adds power supply driver support for the Fuel-Gauge part of the DA9150 combined Charger and Fuel-Gauge device. Signed-off-by: NAdam Thomson <Adam.Thomson.Opensource@diasemi.com> Acked-by: NSebastian Reichel <sre@kernel.org> Signed-off-by: NLee Jones <lee.jones@linaro.org>
-
- 29 9月, 2015 13 次提交
-
-
由 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 提交于
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 2 次提交
-
-
由 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>
-
由 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 2 次提交
-
-
由 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>
-
由 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>
-