From nobody Tue Apr 7 04:59:56 2026 Received: from mail-dl1-f74.google.com (mail-dl1-f74.google.com [74.125.82.74]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id EA710317701 for ; Mon, 16 Mar 2026 15:03:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=74.125.82.74 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773673391; cv=none; b=RCNbJN8jlu1K+jv7bgmiBUdcyhXPzAkd7kmgplaa57Z/Vxsk6S019e4VF1iH/QUhn3aChRpVTjmOwYplt90wSvMqlGPfmXj4QTPyAuXbzmXX52+SR4z/M8iTS+ocNs5if7CjgYe5G3/vpMtTa3DccKe7laTGJI9pFdN0W4g6h8g= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773673391; c=relaxed/simple; bh=FAgn8PATspMB+pVd+tPE4w1KID3ZX0qCAzJbN6EYHd8=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=pPeZkfvhfotkT2pf6XVscmbgcFDVmlnKRogynx34mTljhYc89fQEAxJPWD0siSI8o8buLO0+aMAIl3XIp//QHKjArCfxZSeZA2+ZIsC6ZiZBsk8rfVAfvrw4CneI1Zg+B1I4jzC42ddLyGUJtBcLWQcbDpuEexh+Z3yRg2074/k= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=flex--badhri.bounces.google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=DWIkJ5bd; arc=none smtp.client-ip=74.125.82.74 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--badhri.bounces.google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="DWIkJ5bd" Received: by mail-dl1-f74.google.com with SMTP id a92af1059eb24-128e8ac314eso1110165c88.1 for ; Mon, 16 Mar 2026 08:03:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20251104; t=1773673388; x=1774278188; darn=vger.kernel.org; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:from:to:cc:subject:date:message-id:reply-to; bh=dlmlDuwufDiMYRaMF84SHpudU9RqQKI1UxXXTehJXjg=; b=DWIkJ5bdRc5rhsla3JsCMOhHQUb7puHBUvoEjv0JaP6KvJavtyR0CVpRx5Lc0FMaj5 DZ/Qpxhekm470MJa7v1l00KrHEq+YjL5GE3gKfVfuXo9dXwpSlMEEc4NtpKuMC2ACnmW 222Mz8J8bbPwjxtzDYPjyQ+Ur4mDaP+Kq0FeRHVGhS2LOMhRjuwTnW55sR+cAuMR0Prs 6cEOlf2RLYicKjRtg9tAWep+JjF01Zsc5sxRr8ffFC4dHw9gaFxnI3cst6NtmKXML0sP cH6XR04CXH7owcdWLsyJcHGqz1rvQseA0vdq1wpXvyfUrFo4NAvD2aSB58IaM6FHdVSv rAaQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1773673388; x=1774278188; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=dlmlDuwufDiMYRaMF84SHpudU9RqQKI1UxXXTehJXjg=; b=P5WASA4fkQKyb8JN9/rtGHcND9XmvE3bTPx/uEXguwuMqFwZiGtUegxYczoX1m03Lm lJTSuFMVQcuIWfW+eXFQw5/bKg8Q0cO8yTh6+HvrbGOiOGwlf9o7TRTHblKdE712jrhQ AzVtZvD8URrN6MaJU2AVD6A7om1MNKlA2ByclBKSP5/6VjlMtJSrO3CHJEeNigiku6E6 9d9quVW9XXpyQLjiCuug4Z6+gznsZNE7QKMDQQ0pOshfRk8yyNz+Y/AAvo0kBwNcVrSj jAi83XVQXs1Ktjs0oXXE8AkMM1s0HjbOkxYZdzD1VcE4664EX3bO97DXM5e1HA2+LSDE WtgA== X-Forwarded-Encrypted: i=1; AJvYcCXEYkGSVa9ZViALmbk6o1KxVRLxwvXFZQ/WImWubyNn3OGWf4yAr2XoUZYLbubNaGzZu2Mgt1x3DSlUUgs=@vger.kernel.org X-Gm-Message-State: AOJu0YwuI+7qVl1uyMDzv6jc0VD1asiLEXD9Mu3T0otfSMblsI4MsXHi gLZNMR3XBm6ZwePdG07NP4fUPbEMYMsd3VNYrzsnIzl5AI72xy/3iTfZ/JFh0N5LMrdyjQWYY+2 FAgKW8A== X-Received: from dlae14.prod.google.com ([2002:a05:701b:230e:b0:128:d97e:9ee4]) (user=badhri job=prod-delivery.src-stubby-dispatcher) by 2002:a05:7022:1602:b0:123:2d38:928e with SMTP id a92af1059eb24-128f3df8ea9mr5063477c88.35.1773673387856; Mon, 16 Mar 2026 08:03:07 -0700 (PDT) Date: Mon, 16 Mar 2026 15:03:00 +0000 In-Reply-To: <20260316150301.3892223-1-badhri@google.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20260316150301.3892223-1-badhri@google.com> X-Mailer: git-send-email 2.53.0.851.ga537e3e6e9-goog Message-ID: <20260316150301.3892223-3-badhri@google.com> Subject: [PATCH v2 2/3] power: supply: Add PD SPR AVS support to USB type enum From: Badhri Jagan Sridharan To: Rob Herring , Krzysztof Kozlowski , Conor Dooley , Sebastian Reichel , Badhri Jagan Sridharan , Heikki Krogerus , Greg Kroah-Hartman , Amit Sunil Dhamne Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org, linux-usb@vger.kernel.org Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Add two new members to the power_supply_usb_type to represent the USB Power Delivery (PD) Standard Power Range (SPR) Adjustable Voltage Supply (AVS) charging types: POWER_SUPPLY_USB_TYPE_PD_SPR_AVS: For devices supporting only the PD SPR AVS type. POWER_SUPPLY_USB_TYPE_PD_PPS_SPR_AVS: For devices that support both PD Programmable Power Supply (PPS) and PD SPR AVS. Signed-off-by: Badhri Jagan Sridharan Acked-by: Sebastian Reichel --- Documentation/ABI/testing/sysfs-class-power | 3 ++- drivers/power/supply/power_supply_sysfs.c | 2 ++ include/linux/power_supply.h | 3 +++ 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/Documentation/ABI/testing/sysfs-class-power b/Documentation/AB= I/testing/sysfs-class-power index 4b21d5d23251..32697b926cc8 100644 --- a/Documentation/ABI/testing/sysfs-class-power +++ b/Documentation/ABI/testing/sysfs-class-power @@ -675,7 +675,8 @@ Description: =20 Valid values: "Unknown", "SDP", "DCP", "CDP", "ACA", "C", "PD", - "PD_DRP", "PD_PPS", "BrickID" + "PD_DRP", "PD_PPS", "BrickID", "PD_SPR_AVS", + "PD_PPS_SPR_AVS" =20 **Device Specific Properties** =20 diff --git a/drivers/power/supply/power_supply_sysfs.c b/drivers/power/supp= ly/power_supply_sysfs.c index dd3a48d72d2b..f30a7b9ccd5e 100644 --- a/drivers/power/supply/power_supply_sysfs.c +++ b/drivers/power/supply/power_supply_sysfs.c @@ -70,6 +70,8 @@ static const char * const POWER_SUPPLY_USB_TYPE_TEXT[] = =3D { [POWER_SUPPLY_USB_TYPE_PD] =3D "PD", [POWER_SUPPLY_USB_TYPE_PD_DRP] =3D "PD_DRP", [POWER_SUPPLY_USB_TYPE_PD_PPS] =3D "PD_PPS", + [POWER_SUPPLY_USB_TYPE_PD_SPR_AVS] =3D "PD_SPR_AVS", + [POWER_SUPPLY_USB_TYPE_PD_PPS_SPR_AVS] =3D "PD_PPS_SPR_AVS", [POWER_SUPPLY_USB_TYPE_APPLE_BRICK_ID] =3D "BrickID", }; =20 diff --git a/include/linux/power_supply.h b/include/linux/power_supply.h index 360ffdf272da..7a5e4c3242a0 100644 --- a/include/linux/power_supply.h +++ b/include/linux/power_supply.h @@ -210,6 +210,9 @@ enum power_supply_usb_type { POWER_SUPPLY_USB_TYPE_PD, /* Power Delivery Port */ POWER_SUPPLY_USB_TYPE_PD_DRP, /* PD Dual Role Port */ POWER_SUPPLY_USB_TYPE_PD_PPS, /* PD Programmable Power Supply */ + /* PD Standard Power Range Adjustable Voltage Supply */ + POWER_SUPPLY_USB_TYPE_PD_SPR_AVS, + POWER_SUPPLY_USB_TYPE_PD_PPS_SPR_AVS, /* Supports both PD PPS + SPR AVS */ POWER_SUPPLY_USB_TYPE_APPLE_BRICK_ID, /* Apple Charging Method */ }; =20 --=20 2.53.0.851.ga537e3e6e9-goog