Linux Input/HID development
 help / color / mirror / Atom feed
From: Sriman Achanta <srimanachanta@gmail.com>
To: Jiri Kosina <jikos@kernel.org>, Benjamin Tissoires <bentiss@kernel.org>
Cc: linux-input@vger.kernel.org, linux-kernel@vger.kernel.org,
	Bastien Nocera <hadess@hadess.net>,
	Simon Wood <simon@mungewell.org>,
	Christian Mayer <git@mayer-bgk.de>,
	Sriman Achanta <srimanachanta@gmail.com>
Subject: [PATCH v6 5/9] HID: steelseries: Report POWER_SUPPLY_STATUS_FULL when full
Date: Wed,  8 Jul 2026 23:23:12 -0400	[thread overview]
Message-ID: <20260709032316.1908460-6-68172138+srimanachanta@users.noreply.github.com> (raw)
In-Reply-To: <20260709032316.1908460-1-68172138+srimanachanta@users.noreply.github.com>

From: Sriman Achanta <srimanachanta@gmail.com>

Report POWER_SUPPLY_STATUS_FULL when the headset is connected, charging,
and at 100% capacity. It reported CHARGING in that case before.

The charging flag doubles as a power-present signal: the headset keeps
reporting charging while it sits docked at 100%, and clears the flag as
soon as it runs on battery. Gating FULL on the charging flag therefore
avoids reporting FULL for an unplugged headset that merely happens to be
at 100%, which would otherwise hide the discharge state from userspace.

Signed-off-by: Sriman Achanta <srimanachanta@gmail.com>
---
 drivers/hid/hid-steelseries-arctis.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/hid/hid-steelseries-arctis.c b/drivers/hid/hid-steelseries-arctis.c
index c54c56db9ddd..7b8f5f2623b0 100644
--- a/drivers/hid/hid-steelseries-arctis.c
+++ b/drivers/hid/hid-steelseries-arctis.c
@@ -214,7 +214,9 @@ static int steelseries_battery_get_property(struct power_supply *psy,
 		if (!sd->headset_connected)
 			val->intval = POWER_SUPPLY_STATUS_UNKNOWN;
 		else if (sd->battery_charging)
-			val->intval = POWER_SUPPLY_STATUS_CHARGING;
+			val->intval = sd->battery_capacity >= 100 ?
+				POWER_SUPPLY_STATUS_FULL :
+				POWER_SUPPLY_STATUS_CHARGING;
 		else
 			val->intval = POWER_SUPPLY_STATUS_DISCHARGING;
 		break;
-- 
2.55.0


  parent reply	other threads:[~2026-07-09  3:23 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-09  3:23 [PATCH v6 0/9] HID: steelseries: split out Arctis driver and add Nova 5X/Nova 7 support Sriman Achanta
2026-07-09  3:23 ` [PATCH v6 1/9] HID: steelseries: Fix ARCTIS_1_X device mislabeling Sriman Achanta
2026-07-09  3:36   ` sashiko-bot
2026-07-09  3:23 ` [PATCH v6 2/9] HID: steelseries: Split Arctis headset driver into separate module Sriman Achanta
2026-07-09  3:34   ` sashiko-bot
2026-07-09  3:23 ` [PATCH v6 3/9] HID: steelseries: Inline and simplify SRWS1 wheel driver Sriman Achanta
2026-07-09  3:23 ` [PATCH v6 4/9] HID: steelseries: Refactor Arctis driver to use device_info framework Sriman Achanta
2026-07-09  3:33   ` sashiko-bot
2026-07-09  3:23 ` Sriman Achanta [this message]
2026-07-09  3:23 ` [PATCH v6 6/9] HID: steelseries: Correct Arctis 9 battery calibration range Sriman Achanta
2026-07-09  3:23 ` [PATCH v6 7/9] HID: steelseries: Manage battery lifetime with refcounting Sriman Achanta
2026-07-09  3:38   ` sashiko-bot
2026-07-09  3:23 ` [PATCH v6 8/9] HID: steelseries: Add async status interface support Sriman Achanta
2026-07-09  3:37   ` sashiko-bot
2026-07-09  3:23 ` [PATCH v6 9/9] HID: steelseries: Add support for Arctis Nova 5X and Nova 7 families Sriman Achanta
2026-07-10 12:02 ` [PATCH v6 0/9] HID: steelseries: split out Arctis driver and add Nova 5X/Nova 7 support Bastien Nocera

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=20260709032316.1908460-6-68172138+srimanachanta@users.noreply.github.com \
    --to=srimanachanta@gmail.com \
    --cc=bentiss@kernel.org \
    --cc=git@mayer-bgk.de \
    --cc=hadess@hadess.net \
    --cc=jikos@kernel.org \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=simon@mungewell.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