|
|
Log in / Subscribe / Register

Add support for Battery Status & Battery Caps AMS in TCPM

From:  Amit Sunil Dhamne via B4 Relay <devnull+amitsd.google.com-AT-kernel.org>
To:  Rob Herring <robh-AT-kernel.org>, Krzysztof Kozlowski <krzk+dt-AT-kernel.org>, Conor Dooley <conor+dt-AT-kernel.org>, Greg Kroah-Hartman <gregkh-AT-linuxfoundation.org>, Badhri Jagan Sridharan <badhri-AT-google.com>, Sebastian Reichel <sre-AT-kernel.org>, Heikki Krogerus <heikki.krogerus-AT-linux.intel.com>, "Rafael J. Wysocki" <rafael-AT-kernel.org>, Len Brown <len.brown-AT-intel.com>, Pavel Machek <pavel-AT-kernel.org>
Subject:  [PATCH 0/5] Add support for Battery Status & Battery Caps AMS in TCPM
Date:  Wed, 12 Mar 2025 16:42:00 -0700
Message-ID:  <20250312-batt_ops-v1-0-88e0bb3129fd@google.com>
Cc:  devicetree-AT-vger.kernel.org, linux-kernel-AT-vger.kernel.org, linux-usb-AT-vger.kernel.org, linux-pm-AT-vger.kernel.org, RD Babiera <rdbabiera-AT-google.com>, Kyle Tso <kyletso-AT-google.com>, Amit Sunil Dhamne <amitsd-AT-google.com>
Archive-link:  Article

Support for Battery Status & Battery Caps messages in response to
Get_Battery_Status & Get_Battery_Cap request is required by USB PD devices
powered by battery, as per "USB PD R3.1 V1.8 Spec", "6.13 Message
Applicability" section. This patchset adds support for these AMSes
to achieve greater compliance with the spec.

Signed-off-by: Amit Sunil Dhamne <amitsd@google.com>
---
Amit Sunil Dhamne (5):
      dt-bindings: connector: add fixed-batteries property
      power: supply: core: add function to get supplies from fwnode
      usb: typec: tcpm: Add support for Battery Status response message
      power: supply: core: add vendor and product id properties
      usb: typec: tcpm: Add support for Battery Cap response message

 Documentation/ABI/testing/sysfs-class-power        |  20 ++
 .../bindings/connector/usb-connector.yaml          |   8 +
 .../devicetree/bindings/usb/maxim,max33359.yaml    |   1 +
 Documentation/power/power_supply_class.rst         |  11 ++
 drivers/power/supply/power_supply_core.c           |  60 ++++++
 drivers/power/supply/power_supply_sysfs.c          |   2 +
 drivers/usb/typec/tcpm/tcpm.c                      | 217 ++++++++++++++++++++-
 include/linux/power_supply.h                       |   7 +
 include/linux/usb/pd.h                             |  65 ++++++
 9 files changed, 388 insertions(+), 3 deletions(-)
---
base-commit: 80e54e84911a923c40d7bee33a34c1b4be148d7a
change-id: 20250311-batt_ops-be1bd71ca254

Best regards,
-- 
Amit Sunil Dhamne <amitsd@google.com>





Copyright © 2025, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds