linux-usb.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3 0/2] usb: typec: tps6598x: Export some power supply properties
@ 2020-11-27 12:53 Guido Günther
  2020-11-27 12:53 ` [PATCH v3 1/2] usb: typc: tps6598x: Select USB_ROLE_SWITCH and REGMAP_I2C Guido Günther
  2020-11-27 12:53 ` [PATCH v3 2/2] usb: typec: tps6598x: Export some power supply properties Guido Günther
  0 siblings, 2 replies; 7+ messages in thread
From: Guido Günther @ 2020-11-27 12:53 UTC (permalink / raw)
  To: Heikki Krogerus, Greg Kroah-Hartman, linux-usb, linux-kernel


This allows downstream supplies and userspace to detect whether external power
is supplied.

The Librem 5 has the tp65982 in front of bq25980 charge controller.  Since that
is capable of sinking and sourcing power the online property helps to decide
what to do. It also makes upower happy.

There will be follow up patches providing more properties but these need some
more time to cook and i wanted to check if this is the right way to go?

changes from v2
  - As per kernel test robot
    https://lore.kernel.org/linux-usb/202011271005.zJVawX74-lkp@intel.com/
    - Flip USB_ROLE_SWITCH and REGMAP_I2C from 'depends on' to 'select'
      This matches tcpm and avoids a config symbol recursion which went
      unnoticed on my arm64 build but trips up x86_64.

changes from v1
  - As per review comments from Heikki Krogerus
    https://lore.kernel.org/linux-usb/20201126123552.GP1008337@kuha.fi.intel.com/
    - select POWER_SUPPLY
    - use POWER_SUPPLY_USB_TYPE_PD when a PD contract got negotiated

To: Heikki Krogerus <heikki.krogerus@linux.intel.com>,Greg Kroah-Hartman <gregkh@linuxfoundation.org>,linux-usb@vger.kernel.org,linux-kernel@vger.kernel.org

Guido Günther (2):
  usb: typc: tps6598x: Select USB_ROLE_SWITCH and REGMAP_I2C
  usb: typec: tps6598x: Export some power supply properties

 drivers/usb/typec/Kconfig    |   5 +-
 drivers/usb/typec/tps6598x.c | 105 +++++++++++++++++++++++++++++++++++
 2 files changed, 108 insertions(+), 2 deletions(-)

-- 
2.29.2


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2020-12-01 13:01 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-27 12:53 [PATCH v3 0/2] usb: typec: tps6598x: Export some power supply properties Guido Günther
2020-11-27 12:53 ` [PATCH v3 1/2] usb: typc: tps6598x: Select USB_ROLE_SWITCH and REGMAP_I2C Guido Günther
2020-11-30 10:27   ` Heikki Krogerus
2020-11-27 12:53 ` [PATCH v3 2/2] usb: typec: tps6598x: Export some power supply properties Guido Günther
2020-11-30 10:29   ` Heikki Krogerus
2020-11-30 18:35   ` Andy Shevchenko
2020-12-01 13:00     ` Guido Günther

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).