- Jan 20, 2025
-
-
Jianhua Lu authored
Signed-off-by:
Teguh Sobirin <teguh@sobir.in>
-
Jianhua Lu authored
-
power: qcom_fg: Fix memif address for pm8150b power: qcom_fg: Fix wrong psy passed to power_supply_put_battery_info() power: qcom_fg: Add support for temperature data on gen4 fg
-
Ths driver supports the fuel gauge hardware available on PMICs such as PMI8994, as well as gen 3 fuel gauge hardware available on PMI8998. Co-developed-by:
Caleb Connolly <caleb@connolly.tech> Co-developed-by:
Yassine Oudjana <y.oudjana@protonmail.com> Signed-off-by:
Yassine Oudjana <y.oudjana@protonmail.com> qcom_fg: expose PROP_STATUS to fix upower not detecting charging status properly fg: adopt battery info API changes power: qcom_fg: silence -EPROBE_DEFER error Sometimes, the devm_power_supply_register function will return ERR_PTR(-EPROBE_DEFER) to make the driver subsystem probe the fuel guage later. This is not an error and do not report it as such. Signed-off-by:
Richard Acayan <mailingradian@gmail.com> power/supply: qcom_fg: add present sysfs property Present property is required for battery drivers from UPower>=1.90.0 onwards to work properly. Signed-off-by:
Alexander Martinz <amartinz@shiftphones.com> Signed-off-by:
map220v <map220v300@gmail.com>
-
Jianhua Lu authored
-
- Dec 18, 2024
-
-
Hans de Goede authored
There are 2 issues with bq24296_set_otg_vbus(): 1. When writing the OTG_CONFIG bit it uses POC_CHG_CONFIG_SHIFT which should be POC_OTG_CONFIG_SHIFT. 2. When turning the regulator off it never turns charging back on. Note this must be done through bq24190_charger_set_charge_type(), to ensure that the charge_type property value of none/trickle/fast is honored. Resolve both issues to fix BQ24296 Vbus regulator support not working. Fixes: b150a703 ("power: supply: bq24190_charger: Add support for BQ24296") Signed-off-by:
Hans de Goede <hdegoede@redhat.com> Link: https://lore.kernel.org/r/20241116203648.169100-2-hdegoede@redhat.com Signed-off-by:
Sebastian Reichel <sebastian.reichel@collabora.com>
-
- Dec 10, 2024
-
-
Thomas Weißschuh authored
ECs implementing the v2 command will not stop charging when the end threshold is reached. Instead they will begin discharging until the start threshold is reached, leading to permanent charge and discharge cycles. This defeats the point of the charge control mechanism. Avoid the issue by hiding the start threshold on v2 systems. Instead on those systems program the EC with start == end which forces the EC to reach and stay at that level. v1 does not support thresholds and v3 works correctly, at least judging from the code. Reported-by:
Thomas Koch <linrunner@gmx.net> Fixes: c6ed48ef ("power: supply: add ChromeOS EC based charge control driver") Cc: stable@vger.kernel.org Signed-off-by:
Thomas Weißschuh <linux@weissschuh.net> Link: https://lore.kernel.org/r/20241208-cros_charge-control-v2-v1-3-8d168d0f08a3@weissschuh.net Signed-off-by:
Sebastian Reichel <sebastian.reichel@collabora.com>
-
Thomas Weißschuh authored
Allow setting the start and stop thresholds to the same value. There is no reason to disallow it. Suggested-by:
Thomas Koch <linrunner@gmx.net> Fixes: c6ed48ef ("power: supply: add ChromeOS EC based charge control driver") Cc: stable@vger.kernel.org Signed-off-by:
Thomas Weißschuh <linux@weissschuh.net> Link: https://lore.kernel.org/r/20241208-cros_charge-control-v2-v1-2-8d168d0f08a3@weissschuh.net Signed-off-by:
Sebastian Reichel <sebastian.reichel@collabora.com>
-
Thomas Weißschuh authored
Concurrent accesses through sysfs may lead to inconsistent state in the priv data. Introduce a mutex to avoid this. Fixes: c6ed48ef ("power: supply: add ChromeOS EC based charge control driver") Cc: stable@vger.kernel.org Signed-off-by:
Thomas Weißschuh <linux@weissschuh.net> Link: https://lore.kernel.org/r/20241208-cros_charge-control-v2-v1-1-8d168d0f08a3@weissschuh.net Signed-off-by:
Sebastian Reichel <sebastian.reichel@collabora.com>
-
Dimitri Fedrau authored
Fix set charge current limits for devices which allow to set the lowest charge current limit to be greater zero. If requested charge current limit is below lowest limit, the index equals current_limit_map_size which leads to accessing memory beyond allocated memory. Fixes: be2919d8 ("power: supply: gpio-charger: add charge-current-limit feature") Cc: stable@vger.kernel.org Signed-off-by:
Dimitri Fedrau <dimitri.fedrau@liebherr.com> Link: https://lore.kernel.org/r/20241209-fix-charge-current-limit-v1-1-760d9b8f2af3@liebherr.com Signed-off-by:
Sebastian Reichel <sebastian.reichel@collabora.com>
-
- Nov 11, 2024
-
-
Arnd Bergmann authored
This fails to link when compile-testing and the auxiliary bus is not built-in: x86_64-linux-ld: drivers/power/reset/ep93xx-restart.o: in function `ep93xx_reboot_driver_init': ep93xx-restart.c:(.init.text+0x11): undefined reference to `__auxiliary_driver_register' x86_64-linux-ld: drivers/power/reset/ep93xx-restart.o: in function `ep93xx_reboot_driver_exit': ep93xx-restart.c:(.exit.text+0x8): undefined reference to `auxiliary_driver_unregister' Add the appropriate dependency. Fixes: 9fa7cdb4 ("power: reset: Add a driver for the ep93xx reset") Signed-off-by:
Arnd Bergmann <arnd@arndb.de> Link: https://lore.kernel.org/r/20241111104418.3891756-1-arnd@kernel.org Signed-off-by:
Sebastian Reichel <sebastian.reichel@collabora.com>
-
Stanislav Jakubek authored
The DT bindings specify the property as 'battery-detect-gpios', add handling for it. Keep fallback to the deprecated 'bat-detect-gpio' property to keep compatibility with older DTS. Signed-off-by:
Stanislav Jakubek <stano.jakubek@gmail.com> Link: https://lore.kernel.org/r/ca28b2f2037929c0011fc5c779c332c1d1ad5308.1730720720.git.stano.jakubek@gmail.com Signed-off-by:
Sebastian Reichel <sebastian.reichel@collabora.com>
-
Ba Jing authored
After reviewing the code, it was found that these macros are never referenced in the code. Just remove them. Signed-off-by:
Ba Jing <bajing@cmss.chinamobile.com> Link: https://lore.kernel.org/r/20241025090659.33458-1-bajing@cmss.chinamobile.com Signed-off-by:
Sebastian Reichel <sebastian.reichel@collabora.com>
-
Chris Morgan authored
Change iio_read_channel_processed to iio_read_channel_processed_scale where appropriate. Signed-off-by:
Chris Morgan <macromorgan@hotmail.com> Link: https://lore.kernel.org/r/20241023184800.109376-3-macroalpha82@gmail.com Signed-off-by:
Sebastian Reichel <sebastian.reichel@collabora.com>
-
Chris Morgan authored
Change iio_read_channel_processed to iio_read_channel_processed_scale where appropriate. Signed-off-by:
Chris Morgan <macromorgan@hotmail.com> Link: https://lore.kernel.org/r/20241023184800.109376-2-macroalpha82@gmail.com Signed-off-by:
Sebastian Reichel <sebastian.reichel@collabora.com>
-
anish kumar authored
change my contact in this driver. Signed-off-by:
anish kumar <yesanishhere@gmail.com> Link: https://lore.kernel.org/r/20241023061126.7896-1-yesanishhere@gmail.com Signed-off-by:
Sebastian Reichel <sebastian.reichel@collabora.com>
-
- Nov 10, 2024
-
-
Ed Robbins authored
If the power supply type is not set it defaults to "Unknown" and upower does not recognise it. In turn battery monitor applications do not see a battery. Setting to POWER_SUPPLY_TYPE_BATTERY fixes this. Signed-off-by:
Ed Robbins <edd.robbins@gmail.com> Link: https://lore.kernel.org/r/IOFJLS.120OJ5KJG9R72@googlemail.com Signed-off-by:
Sebastian Reichel <sebastian.reichel@collabora.com>
-
- Nov 07, 2024
-
-
Thomas Gleixner authored
Now that the SIG_IGN problem is solved in the core code, the alarmtimer callbacks do not require a return value anymore. Signed-off-by:
Thomas Gleixner <tglx@linutronix.de> Acked-by:
Peter Zijlstra (Intel) <peterz@infradead.org> Acked-by:
Frederic Weisbecker <frederic@kernel.org> Link: https://lore.kernel.org/all/20241105064214.318837272@linutronix.de
-
- Oct 25, 2024
-
-
Bartosz Golaszewski authored
WCN6855 (also known as QCA6490) is similar to the already supported QCA6390 but takes in two more supplies so add a new vregs list for it. On sm8450-hdk it also requires a short assert of the xo-clk pin so add handling for it in a dedicated unit. As we now have a separate set of targets for this variant, store the pointer to the targets struct associated with a model in the device match data. Reviewed-by:
Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Link: https://lore.kernel.org/r/20241018-sc8280xp-pwrseq-v6-2-8da8310d9564@linaro.org Signed-off-by:
Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
-
- Oct 23, 2024
-
-
Bartosz Golaszewski authored
This driver uses various OF-specific functions and depends on phandle parsing. There's no reason to make it available to non-OF systems so add a relevant dependency switch to its Kconfig entry. Fixes: 2f1630f4 ("power: pwrseq: add a driver for the PMU module on the QCom WCN chipsets") Link: https://lore.kernel.org/r/20241004130449.51725-1-brgl@bgdev.pl Signed-off-by:
Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
-
- Oct 21, 2024
-
-
Uwe Kleine-König authored
After commit 0edb555a ("platform: Make platform_driver::remove() return void") .remove() is (again) the right callback to implement for platform drivers. Convert all platform drivers below drivers/power/ to use .remove(), with the eventual goal to drop struct platform_driver::remove_new(). As .remove() and .remove_new() have the same prototypes, conversion is done by just changing the structure member name in the driver initializer. While touching these files, make indention of the struct initializer consistent in several files. Signed-off-by:
Uwe Kleine-König <u.kleine-koenig@baylibre.com> Link: https://lore.kernel.org/r/20241010203622.839625-6-u.kleine-koenig@baylibre.com Signed-off-by:
Sebastian Reichel <sebastian.reichel@collabora.com>
-
- Oct 17, 2024
-
-
Thomas Weißschuh authored
The interface of power_supply_hwmon.c is only meant to be used by the psy core. Remove it from the public header file and use the private one instead. Signed-off-by:
Thomas Weißschuh <linux@weissschuh.net> Link: https://lore.kernel.org/r/20241017-power-supply-cleanups-v2-1-cb0f5deab088@weissschuh.net Signed-off-by:
Sebastian Reichel <sebastian.reichel@collabora.com>
-
- Oct 16, 2024
-
-
Chris Morgan authored
The battery capacity calibration function continues to be a source of bugs for end users, especially when coming out of suspend. This occurs when the device has incorrect readings for voltage, and causes the current code to set fully charged capacity incorrectly. Add checks to ensure we don't attempt a capacity calibration when we have invalid voltage values or no battery present, and remove the code that attempts to automatically set the fully charged capacity in lieu of making the value writeable. This way userspace is able to adjust the fully charged capacity for a degraded battery. Signed-off-by:
Chris Morgan <macromorgan@hotmail.com> Link: https://lore.kernel.org/r/20240926144346.94630-3-macroalpha82@gmail.com Signed-off-by:
Sebastian Reichel <sebastian.reichel@collabora.com>
-
Chris Morgan authored
The driver has a thread that checks the battery every 8 seconds. Stop this thread during device suspend as while the device is suspended not all values seem to be read correctly (such as battery voltage). The resume function triggers the thread to start again. Signed-off-by:
Chris Morgan <macromorgan@hotmail.com> Link: https://lore.kernel.org/r/20240926144346.94630-2-macroalpha82@gmail.com Signed-off-by:
Sebastian Reichel <sebastian.reichel@collabora.com>
-
ChiYuan Huang authored
Use IC status regfield to rewrite the 'get_staus' function. The original one cannot cover some special scenario like as charger OTG or JEITA case. Fixes: 4a1a5f67 ("power: supply: rt9471: Add Richtek RT9471 charger driver") Reported-by:
Lucas Tsai <lucas_tsai@richtek.com> Signed-off-by:
ChiYuan Huang <cy_huang@richtek.com> Link: https://lore.kernel.org/r/67ba92bb4a9c51d9cafadab30b788a3a2c3048e1.1727252762.git.cy_huang@richtek.com Signed-off-by:
Sebastian Reichel <sebastian.reichel@collabora.com>
-
ChiYuan Huang authored
Fix F_WDT and F_WDT_RST wrong regfield declaration. Fixes: 4a1a5f67 ("power: supply: rt9471: Add Richtek RT9471 charger driver") Reported-by:
Lucas Tsai <lucas_tsai@richtek.com> Signed-off-by:
ChiYuan Huang <cy_huang@richtek.com> Link: https://lore.kernel.org/r/f862e23f220612f01fabb6d8e76cfaf63756c22b.1727252762.git.cy_huang@richtek.com Signed-off-by:
Sebastian Reichel <sebastian.reichel@collabora.com>
-
Thomas Weißschuh authored
The attribute arrays are only modified during the __init phase. To protect them against intentional or accidental modification, mark them as __ro_after_init. To make sure no modifications are introduced, also mark the return values of the accessors as const. Signed-off-by:
Thomas Weißschuh <linux@weissschuh.net> Link: https://lore.kernel.org/r/20241005-power-supply-cleanups-v1-3-45303b2d0a4d@weissschuh.net Signed-off-by:
Sebastian Reichel <sebastian.reichel@collabora.com>
-
Thomas Weißschuh authored
Since commit ("power: supply: Drop use_cnt check from power_supply_property_is_writeable()"), this function does not check use_cnt anymore, making it unsuitable for general usage. As it is only used by the psy core anyways, remove it from the public header and unexport it to avoid misusage. Signed-off-by:
Thomas Weißschuh <linux@weissschuh.net> Link: https://lore.kernel.org/r/20241005-power-supply-cleanups-v1-2-45303b2d0a4d@weissschuh.net Signed-off-by:
Sebastian Reichel <sebastian.reichel@collabora.com>
-
Thomas Weißschuh authored
The mutex is an implementation detail of struct device. Use the dedicated wrappers to access the field. Signed-off-by:
Thomas Weißschuh <linux@weissschuh.net> Link: https://lore.kernel.org/r/20241005-power-supply-cleanups-v1-1-45303b2d0a4d@weissschuh.net Signed-off-by:
Sebastian Reichel <sebastian.reichel@collabora.com>
-
Barnabás Czémán authored
Correct bq27426 registers, according to technical reference manual it does not have Design Capacity register so it is not register compatible with bq27421. Fixes: 5ef6a160 ("power: supply: bq27xxx: Add support for BQ27426") Signed-off-by:
Barnabás Czémán <barnabas.czeman@mainlining.org> Link: https://lore.kernel.org/r/20241016-fix_bq27426-v2-1-aa6c0f51a9f6@mainlining.org Signed-off-by:
Sebastian Reichel <sebastian.reichel@collabora.com>
-
Chris Packham authored
For historical reasons syscon-reboot has used an 'offset' property. As a child on a MMIO bus having a 'reg' property is more appropriate. Accept 'reg' as an alternative to 'offset'. Signed-off-by:
Chris Packham <chris.packham@alliedtelesis.co.nz> Reviewed-by:
Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://lore.kernel.org/r/20241015225948.3971924-3-chris.packham@alliedtelesis.co.nz Signed-off-by:
Sebastian Reichel <sebastian.reichel@collabora.com>
-
Andreas Kemnade authored
Add a driver for the charger in the TWL6030/32. For now it does not report much in sysfs but parameters are set up for USB, charging is enabled with the specified parameters. It stops charging when full and also restarts charging. This prevents ending up in a system setup where you run out of battery although a charger is plugged in after precharge completed. Battery voltage behavior was checked via the GPADC. Signed-off-by:
Andreas Kemnade <andreas@kemnade.info> Link: https://lore.kernel.org/r/20241016080314.222674-3-andreas@kemnade.info Signed-off-by:
Sebastian Reichel <sebastian.reichel@collabora.com>
-
- Oct 15, 2024
-
-
Andrew Kreimer authored
Fix a typo in comments. Reported-by:
Matthew Wilcox <willy@infradead.org> Signed-off-by:
Andrew Kreimer <algonell@gmail.com> Acked-by:
Michael Hennerich <michael.hennerich@analog.com> Link: https://lore.kernel.org/r/20240912125303.44118-1-algonell@gmail.com Signed-off-by:
Sebastian Reichel <sebastian.reichel@collabora.com>
-
Shen Lichuan authored
Fixed some spelling errors, the details are as follows: -in the code comments: dettached->detached meausered->measured meausurement->measurement sholuld->should Tempreture->Temperature measuremnts->measurements detecing->detecting persent->percent Parallell->Parallel Signed-off-by:
Shen Lichuan <shenlichuan@vivo.com> Link: https://lore.kernel.org/r/20240914085415.3886-1-shenlichuan@vivo.com Signed-off-by:
Sebastian Reichel <sebastian.reichel@collabora.com>
-
Bart Van Assche authored
The put_device() call in power_supply_put() may call power_supply_dev_release(). The latter function does not sleep so power_supply_put() doesn't sleep either. Hence, remove the might_sleep() call from power_supply_put(). This patch suppresses false positive complaints about calling a sleeping function from atomic context if power_supply_put() is called from atomic context. Cc: Kyle Tso <kyletso@google.com> Cc: Krzysztof Kozlowski <krzk@kernel.org> Fixes: 1a352462 ("power_supply: Add power_supply_put for decrementing device reference counter") Signed-off-by:
Bart Van Assche <bvanassche@acm.org> Reviewed-by:
Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://lore.kernel.org/r/20240917193914.47566-1-bvanassche@acm.org Signed-off-by:
Sebastian Reichel <sebastian.reichel@collabora.com>
-
Thomas Weißschuh authored
The same functionality is available through power_supply_config::no_wakeup_source, which is more idiomatic. All users of the old API have been converted. Also remove the argument "ws" from __power_supply_register(), as it is now always "true". Signed-off-by:
Thomas Weißschuh <linux@weissschuh.net> Reviewed-by:
Tzung-Bi Shih <tzungbi@kernel.org> Link: https://lore.kernel.org/r/20241005-power-supply-no-wakeup-source-v1-8-1d62bf9bcb1d@weissschuh.net Signed-off-by:
Sebastian Reichel <sebastian.reichel@collabora.com>
-
Thomas Weißschuh authored
devm_power_supply_register_no_ws() is going to be removed. Switch to the general registration API. Signed-off-by:
Thomas Weißschuh <linux@weissschuh.net> Reviewed-by:
Luca Ceresoli <luca.ceresoli@bootlin.com> Reviewed-by:
Tzung-Bi Shih <tzungbi@kernel.org> Link: https://lore.kernel.org/r/20241005-power-supply-no-wakeup-source-v1-7-1d62bf9bcb1d@weissschuh.net Signed-off-by:
Sebastian Reichel <sebastian.reichel@collabora.com>
-
Thomas Weißschuh authored
{,devm_}power_supply_register_no_ws() are going to be removed. Switch to the general registration API. Signed-off-by:
Thomas Weißschuh <linux@weissschuh.net> Reviewed-by:
Tzung-Bi Shih <tzungbi@kernel.org> Link: https://lore.kernel.org/r/20241005-power-supply-no-wakeup-source-v1-6-1d62bf9bcb1d@weissschuh.net Signed-off-by:
Sebastian Reichel <sebastian.reichel@collabora.com>
-
Thomas Weißschuh authored
devm_power_supply_register_no_ws() is going to be removed. Switch to the general registration API. Signed-off-by:
Thomas Weißschuh <linux@weissschuh.net> Acked-by:
Tzung-Bi Shih <tzungbi@kernel.org> Link: https://lore.kernel.org/r/20241005-power-supply-no-wakeup-source-v1-5-1d62bf9bcb1d@weissschuh.net Signed-off-by:
Sebastian Reichel <sebastian.reichel@collabora.com>
-
Thomas Weißschuh authored
devm_power_supply_register_no_ws() is going to be removed. Switch to the general registration API. Signed-off-by:
Thomas Weißschuh <linux@weissschuh.net> Reviewed-by:
Tzung-Bi Shih <tzungbi@kernel.org> Link: https://lore.kernel.org/r/20241005-power-supply-no-wakeup-source-v1-4-1d62bf9bcb1d@weissschuh.net Signed-off-by:
Sebastian Reichel <sebastian.reichel@collabora.com>
-