]> git.baikalelectronics.ru Git - kernel.git/commit
typec: tcpm: Represent source supply through power_supply
authorAdam Thomson <Adam.Thomson.Opensource@diasemi.com>
Mon, 23 Apr 2018 14:11:00 +0000 (15:11 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 25 Apr 2018 12:20:20 +0000 (14:20 +0200)
commit040a123714e96f050042ea756a1cfb3ad04c73b1
treefae6318a59c2cc64b73fc436a22c64f5b29bf6e2
parentba0f4d62d8abe3624f2b09c3bc28a2e6e9ed6f6d
typec: tcpm: Represent source supply through power_supply

This commit adds a power_supply class instance to represent a
PD source's voltage and current properties. This provides an
interface for reading these properties from user-space or other
drivers.

For PPS enabled Sources, this also provides write access to set
the current and voltage and allows for swapping between standard
PDO and PPS APDO.

As this represents a superset of the information provided in the
fusb302 driver, the power_supply instance in that code is removed
as part of this change, so reverting the commit titled
'typec: tcpm: Represent source supply through power_supply class'

Signed-off-by: Adam Thomson <Adam.Thomson.Opensource@diasemi.com>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/typec/Kconfig
drivers/usb/typec/fusb302/Kconfig
drivers/usb/typec/fusb302/fusb302.c
drivers/usb/typec/tcpm.c