mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Guoyi Zhang <kuoi@bioarchlinux.org>
To: sre@kernel.org, wens@csie.org, hdegoede@redhat.com
Cc: Guoyi Zhang <kuoi@bioarchlinux.org>,
	linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH] power: supply: axp288_fuel_gauge: Deny ROCK Pi X
Date: Wed, 21 Feb 2024 16:34:25 +0800	[thread overview]
Message-ID: <20240221083425.440108-1-kuoi@bioarchlinux.org> (raw)

The ROCK Pi X is a single board computer without batteries using the
AXP288 PMIC where the EFI code does not disable the charger part of 
the PMIC causing us to report a discharging battery with a continuously
consumed battery charge to userspace.

Add it to the deny-list to avoid the bogus battery status reporting.

Signed-off-by: Guoyi Zhang <kuoi@bioarchlinux.org>
---
 drivers/power/supply/axp288_fuel_gauge.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/drivers/power/supply/axp288_fuel_gauge.c b/drivers/power/supply/axp288_fuel_gauge.c
index 3be6f3b10..8f67f5d0d 100644
--- a/drivers/power/supply/axp288_fuel_gauge.c
+++ b/drivers/power/supply/axp288_fuel_gauge.c
@@ -599,6 +599,14 @@ static const struct dmi_system_id axp288_quirks[] = {
 		},
 		.driver_data = NULL,
 	},
+	{
+		/* Radxa ROCK Pi X Single Board Computer */
+		.matches = {
+			DMI_MATCH(DMI_BOARD_NAME, "ROCK Pi X"),
+			DMI_MATCH(DMI_BOARD_VENDOR, "Radxa"),
+		},
+		.driver_data = (void *)AXP288_QUIRK_NO_BATTERY,
+	},
 	{
 		/*
 		 * Various Ace PC/Meegopad/MinisForum/Wintel Mini-PCs/HDMI-sticks
-- 
2.43.2


             reply	other threads:[~2024-02-21  8:50 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-21  8:34 Guoyi Zhang [this message]
2024-02-21 10:58 ` Hans de Goede
2024-02-21 23:05 ` Sebastian Reichel

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=20240221083425.440108-1-kuoi@bioarchlinux.org \
    --to=kuoi@bioarchlinux.org \
    --cc=hdegoede@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=sre@kernel.org \
    --cc=wens@csie.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

all inboxes | Powered by JetHome®