]> git.dujemihanovic.xyz Git - linux.git/commit
power: supply: bq256xx: Support to disable charger
authorHermes Zhang <chenhuiz@axis.com>
Thu, 9 Mar 2023 06:41:03 +0000 (14:41 +0800)
committerSebastian Reichel <sebastian.reichel@collabora.com>
Sun, 12 Mar 2023 22:47:54 +0000 (23:47 +0100)
commit5161ec200f5a84416667da853ff822d72df507f2
tree8ac19ff1ea9f9c8af7310a627e3ba54550f8b41a
parent83425c835e7dea49576aaac5fd4bff9b38ee0c32
power: supply: bq256xx: Support to disable charger

To be able to control the charging process flexible, we need to able to
disable the charger. This commit will allow to disable the charger by
"echo 1 > /sys/class/power_supply/bq256xx-charger/charge_type"
(1 = POWER_SUPPLY_CHARGE_TYPE_NONE) and enable the charger by set it to
2/3 (POWER_SUPPLY_CHARGE_TYPE_TRICKLE/POWER_SUPPLY_CHARGE_TYPE_FAST)

Signed-off-by: Hermes Zhang <chenhuiz@axis.com>
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
drivers/power/supply/bq256xx_charger.c