]> git.baikalelectronics.ru Git - kernel.git/commit
power: suppy: ucs1002: disable power when max current is 0
authorLucas Stach <l.stach@pengutronix.de>
Tue, 19 Nov 2019 17:00:04 +0000 (18:00 +0100)
committerSebastian Reichel <sre@kernel.org>
Thu, 19 Dec 2019 00:07:53 +0000 (01:07 +0100)
commitf8a8579d73b618cd7da270e6f64330038c014307
treee0af520b3031f90e7189a5516caa17b6c9b4fee3
parent981dcd8e041c2c04313ac7a4ce971bca11121e62
power: suppy: ucs1002: disable power when max current is 0

For some devices userspace needs the ability to completely cut the power
to the USB devices connected to the charge controller. An easy way to
achieve this is by allowing 0 as a valid max current and forcibly disable
the output in that case, as well as enable it again if the regulator is
in use and a non-0 max current is set.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Tested-by: Chris Healy <cphealy@gmail.com>
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
drivers/power/supply/ucs1002_power.c