linux-usb.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Guido Günther" <agx@sigxcpu.org>
To: Heikki Krogerus <heikki.krogerus@linux.intel.com>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org,
	Andy Shevchenko <andy.shevchenko@gmail.com>
Subject: [PATCH v5 0/2] usb: typec: tps6598x: Export some power supply properties
Date: Sat,  5 Dec 2020 12:13:24 +0100	[thread overview]
Message-ID: <cover.1607166657.git.agx@sigxcpu.org> (raw)

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 v4
  - As per review comments from Andy Shevchenko
    https://lore.kernel.org/linux-usb/CAHp75Vfws_WMDxxpCpB1zSgbWucYx7-qeev6=mKE+znXSSPWSA@mail.gmail.com/T/#mb90b0f7dc49c4929590fa7fa0df53631b47a9285
    - Use devm_kasprintf()
  - Add reviewed by from Andy Shevchenko, thanks!
    https://lore.kernel.org/linux-usb/CAHp75Vfws_WMDxxpCpB1zSgbWucYx7-qeev6=mKE+znXSSPWSA@mail.gmail.com/

changes from v3
  - As per review comments from Andy Shevchenko
    https://lore.kernel.org/linux-usb/CAHp75VeLZtm85Y=3QMkPGb332wn05-zr-_mrrwXvnqLhazR1Gg@mail.gmail.com/
    - Use positive conditionals
  - Add reviewed by from Heikki Krogerus
    https://lore.kernel.org/linux-usb/20201130102720.GA2911464@kuha.fi.intel.com/T/#u
    https://lore.kernel.org/linux-usb/20201130102942.GB2911464@kuha.fi.intel.com/T/#u
  - Fix typc vs typec typo in commit message

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

Guido Günther (2):
  usb: typec: 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 | 103 +++++++++++++++++++++++++++++++++++
 2 files changed, 106 insertions(+), 2 deletions(-)

-- 
2.29.2


             reply	other threads:[~2020-12-05 15:03 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-05 11:13 Guido Günther [this message]
2020-12-05 11:13 ` [PATCH v5 1/2] usb: typec: tps6598x: Select USB_ROLE_SWITCH and REGMAP_I2C Guido Günther
2020-12-05 11:13 ` [PATCH v5 2/2] usb: typec: tps6598x: Export some power supply properties Guido Günther

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=cover.1607166657.git.agx@sigxcpu.org \
    --to=agx@sigxcpu.org \
    --cc=andy.shevchenko@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=heikki.krogerus@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).