Linux Power Management development
 help / color / mirror / Atom feed
* [PATCH] power: supply: axp288_fuel_gauge: Add ACEPC T8 and T11 mini PCs to the blacklist
@ 2019-04-22 20:43 Hans de Goede
  2019-04-22 20:43 ` Hans de Goede
  2019-05-01 22:57 ` Sebastian Reichel
  0 siblings, 2 replies; 4+ messages in thread
From: Hans de Goede @ 2019-04-22 20:43 UTC (permalink / raw)
  To: Sebastian Reichel; +Cc: Hans de Goede, Chen-Yu Tsai, linux-pm, stable

The ACEPC T8 and T11 Cherry Trail Z8350 mini PCs use an AXP288 and as PCs,
rather then portables, they does not have a battery. Still for some
reason the AXP288 not only thinks there is a battery, it actually
thinks it is discharging while the PC is running, slowly going to
0% full, causing userspace to shutdown the system due to the battery
being critically low after a while.

This commit adds the ACEPC T8 and T11 to the axp288 fuel-gauge driver
blacklist, so that we stop reporting bogus battery readings on this device.

BugLink: https://bugzilla.redhat.com/show_bug.cgi?id=1690852
Cc: stable@vger.kernel.org
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
---
 drivers/power/supply/axp288_fuel_gauge.c | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)

diff --git a/drivers/power/supply/axp288_fuel_gauge.c b/drivers/power/supply/axp288_fuel_gauge.c
index 9ff2461820d8..368281bc0d2b 100644
--- a/drivers/power/supply/axp288_fuel_gauge.c
+++ b/drivers/power/supply/axp288_fuel_gauge.c
@@ -685,6 +685,26 @@ static void fuel_gauge_init_irq(struct axp288_fg_info *info)
  * detection reports one despite it not being there.
  */
 static const struct dmi_system_id axp288_fuel_gauge_blacklist[] = {
+	{
+		/* ACEPC T8 Cherry Trail Z8350 mini PC */
+		.matches = {
+			DMI_EXACT_MATCH(DMI_BOARD_VENDOR, "To be filled by O.E.M."),
+			DMI_EXACT_MATCH(DMI_BOARD_NAME, "Cherry Trail CR"),
+			DMI_EXACT_MATCH(DMI_PRODUCT_SKU, "T8"),
+			/* also match on somewhat unique bios-version */
+			DMI_EXACT_MATCH(DMI_BIOS_VERSION, "1.000"),
+		},
+	},
+	{
+		/* ACEPC T11 Cherry Trail Z8350 mini PC */
+		.matches = {
+			DMI_EXACT_MATCH(DMI_BOARD_VENDOR, "To be filled by O.E.M."),
+			DMI_EXACT_MATCH(DMI_BOARD_NAME, "Cherry Trail CR"),
+			DMI_EXACT_MATCH(DMI_PRODUCT_SKU, "T11"),
+			/* also match on somewhat unique bios-version */
+			DMI_EXACT_MATCH(DMI_BIOS_VERSION, "1.000"),
+		},
+	},
 	{
 		/* Intel Cherry Trail Compute Stick, Windows version */
 		.matches = {
-- 
2.21.0

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH] power: supply: axp288_fuel_gauge: Add ACEPC T8 and T11 mini PCs to the blacklist
  2019-04-22 20:43 [PATCH] power: supply: axp288_fuel_gauge: Add ACEPC T8 and T11 mini PCs to the blacklist Hans de Goede
@ 2019-04-22 20:43 ` Hans de Goede
  2019-05-01 22:57 ` Sebastian Reichel
  1 sibling, 0 replies; 4+ messages in thread
From: Hans de Goede @ 2019-04-22 20:43 UTC (permalink / raw)
  To: Sebastian Reichel; +Cc: Hans de Goede, Chen-Yu Tsai, linux-pm, stable

The ACEPC T8 and T11 Cherry Trail Z8350 mini PCs use an AXP288 and as PCs,
rather then portables, they does not have a battery. Still for some
reason the AXP288 not only thinks there is a battery, it actually
thinks it is discharging while the PC is running, slowly going to
0% full, causing userspace to shutdown the system due to the battery
being critically low after a while.

This commit adds the ACEPC T8 and T11 to the axp288 fuel-gauge driver
blacklist, so that we stop reporting bogus battery readings on this device.

BugLink: https://bugzilla.redhat.com/show_bug.cgi?id=1690852
Cc: stable@vger.kernel.org
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
---
 drivers/power/supply/axp288_fuel_gauge.c | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)

diff --git a/drivers/power/supply/axp288_fuel_gauge.c b/drivers/power/supply/axp288_fuel_gauge.c
index 9ff2461820d8..368281bc0d2b 100644
--- a/drivers/power/supply/axp288_fuel_gauge.c
+++ b/drivers/power/supply/axp288_fuel_gauge.c
@@ -685,6 +685,26 @@ static void fuel_gauge_init_irq(struct axp288_fg_info *info)
  * detection reports one despite it not being there.
  */
 static const struct dmi_system_id axp288_fuel_gauge_blacklist[] = {
+	{
+		/* ACEPC T8 Cherry Trail Z8350 mini PC */
+		.matches = {
+			DMI_EXACT_MATCH(DMI_BOARD_VENDOR, "To be filled by O.E.M."),
+			DMI_EXACT_MATCH(DMI_BOARD_NAME, "Cherry Trail CR"),
+			DMI_EXACT_MATCH(DMI_PRODUCT_SKU, "T8"),
+			/* also match on somewhat unique bios-version */
+			DMI_EXACT_MATCH(DMI_BIOS_VERSION, "1.000"),
+		},
+	},
+	{
+		/* ACEPC T11 Cherry Trail Z8350 mini PC */
+		.matches = {
+			DMI_EXACT_MATCH(DMI_BOARD_VENDOR, "To be filled by O.E.M."),
+			DMI_EXACT_MATCH(DMI_BOARD_NAME, "Cherry Trail CR"),
+			DMI_EXACT_MATCH(DMI_PRODUCT_SKU, "T11"),
+			/* also match on somewhat unique bios-version */
+			DMI_EXACT_MATCH(DMI_BIOS_VERSION, "1.000"),
+		},
+	},
 	{
 		/* Intel Cherry Trail Compute Stick, Windows version */
 		.matches = {
-- 
2.21.0


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] power: supply: axp288_fuel_gauge: Add ACEPC T8 and T11 mini PCs to the blacklist
  2019-04-22 20:43 [PATCH] power: supply: axp288_fuel_gauge: Add ACEPC T8 and T11 mini PCs to the blacklist Hans de Goede
  2019-04-22 20:43 ` Hans de Goede
@ 2019-05-01 22:57 ` Sebastian Reichel
  2019-05-01 22:57   ` Sebastian Reichel
  1 sibling, 1 reply; 4+ messages in thread
From: Sebastian Reichel @ 2019-05-01 22:57 UTC (permalink / raw)
  To: Hans de Goede; +Cc: Chen-Yu Tsai, linux-pm, stable

[-- Attachment #1: Type: text/plain, Size: 2308 bytes --]

Hi,

On Mon, Apr 22, 2019 at 10:43:01PM +0200, Hans de Goede wrote:
> The ACEPC T8 and T11 Cherry Trail Z8350 mini PCs use an AXP288 and as PCs,
> rather then portables, they does not have a battery. Still for some
> reason the AXP288 not only thinks there is a battery, it actually
> thinks it is discharging while the PC is running, slowly going to
> 0% full, causing userspace to shutdown the system due to the battery
> being critically low after a while.
>
> This commit adds the ACEPC T8 and T11 to the axp288 fuel-gauge driver
> blacklist, so that we stop reporting bogus battery readings on this device.
> 
> BugLink: https://bugzilla.redhat.com/show_bug.cgi?id=1690852
> Cc: stable@vger.kernel.org
> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
> ---

Thanks, you made my day 😂. Queued to power-supply's for-next branch.

-- Sebastian

>  drivers/power/supply/axp288_fuel_gauge.c | 20 ++++++++++++++++++++
>  1 file changed, 20 insertions(+)
> 
> diff --git a/drivers/power/supply/axp288_fuel_gauge.c b/drivers/power/supply/axp288_fuel_gauge.c
> index 9ff2461820d8..368281bc0d2b 100644
> --- a/drivers/power/supply/axp288_fuel_gauge.c
> +++ b/drivers/power/supply/axp288_fuel_gauge.c
> @@ -685,6 +685,26 @@ static void fuel_gauge_init_irq(struct axp288_fg_info *info)
>   * detection reports one despite it not being there.
>   */
>  static const struct dmi_system_id axp288_fuel_gauge_blacklist[] = {
> +	{
> +		/* ACEPC T8 Cherry Trail Z8350 mini PC */
> +		.matches = {
> +			DMI_EXACT_MATCH(DMI_BOARD_VENDOR, "To be filled by O.E.M."),
> +			DMI_EXACT_MATCH(DMI_BOARD_NAME, "Cherry Trail CR"),
> +			DMI_EXACT_MATCH(DMI_PRODUCT_SKU, "T8"),
> +			/* also match on somewhat unique bios-version */
> +			DMI_EXACT_MATCH(DMI_BIOS_VERSION, "1.000"),
> +		},
> +	},
> +	{
> +		/* ACEPC T11 Cherry Trail Z8350 mini PC */
> +		.matches = {
> +			DMI_EXACT_MATCH(DMI_BOARD_VENDOR, "To be filled by O.E.M."),
> +			DMI_EXACT_MATCH(DMI_BOARD_NAME, "Cherry Trail CR"),
> +			DMI_EXACT_MATCH(DMI_PRODUCT_SKU, "T11"),
> +			/* also match on somewhat unique bios-version */
> +			DMI_EXACT_MATCH(DMI_BIOS_VERSION, "1.000"),
> +		},
> +	},
>  	{
>  		/* Intel Cherry Trail Compute Stick, Windows version */
>  		.matches = {
> -- 
> 2.21.0
> 

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] power: supply: axp288_fuel_gauge: Add ACEPC T8 and T11 mini PCs to the blacklist
  2019-05-01 22:57 ` Sebastian Reichel
@ 2019-05-01 22:57   ` Sebastian Reichel
  0 siblings, 0 replies; 4+ messages in thread
From: Sebastian Reichel @ 2019-05-01 22:57 UTC (permalink / raw)
  To: Hans de Goede; +Cc: Chen-Yu Tsai, linux-pm, stable

[-- Attachment #1: Type: text/plain, Size: 2308 bytes --]

Hi,

On Mon, Apr 22, 2019 at 10:43:01PM +0200, Hans de Goede wrote:
> The ACEPC T8 and T11 Cherry Trail Z8350 mini PCs use an AXP288 and as PCs,
> rather then portables, they does not have a battery. Still for some
> reason the AXP288 not only thinks there is a battery, it actually
> thinks it is discharging while the PC is running, slowly going to
> 0% full, causing userspace to shutdown the system due to the battery
> being critically low after a while.
>
> This commit adds the ACEPC T8 and T11 to the axp288 fuel-gauge driver
> blacklist, so that we stop reporting bogus battery readings on this device.
> 
> BugLink: https://bugzilla.redhat.com/show_bug.cgi?id=1690852
> Cc: stable@vger.kernel.org
> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
> ---

Thanks, you made my day 😂. Queued to power-supply's for-next branch.

-- Sebastian

>  drivers/power/supply/axp288_fuel_gauge.c | 20 ++++++++++++++++++++
>  1 file changed, 20 insertions(+)
> 
> diff --git a/drivers/power/supply/axp288_fuel_gauge.c b/drivers/power/supply/axp288_fuel_gauge.c
> index 9ff2461820d8..368281bc0d2b 100644
> --- a/drivers/power/supply/axp288_fuel_gauge.c
> +++ b/drivers/power/supply/axp288_fuel_gauge.c
> @@ -685,6 +685,26 @@ static void fuel_gauge_init_irq(struct axp288_fg_info *info)
>   * detection reports one despite it not being there.
>   */
>  static const struct dmi_system_id axp288_fuel_gauge_blacklist[] = {
> +	{
> +		/* ACEPC T8 Cherry Trail Z8350 mini PC */
> +		.matches = {
> +			DMI_EXACT_MATCH(DMI_BOARD_VENDOR, "To be filled by O.E.M."),
> +			DMI_EXACT_MATCH(DMI_BOARD_NAME, "Cherry Trail CR"),
> +			DMI_EXACT_MATCH(DMI_PRODUCT_SKU, "T8"),
> +			/* also match on somewhat unique bios-version */
> +			DMI_EXACT_MATCH(DMI_BIOS_VERSION, "1.000"),
> +		},
> +	},
> +	{
> +		/* ACEPC T11 Cherry Trail Z8350 mini PC */
> +		.matches = {
> +			DMI_EXACT_MATCH(DMI_BOARD_VENDOR, "To be filled by O.E.M."),
> +			DMI_EXACT_MATCH(DMI_BOARD_NAME, "Cherry Trail CR"),
> +			DMI_EXACT_MATCH(DMI_PRODUCT_SKU, "T11"),
> +			/* also match on somewhat unique bios-version */
> +			DMI_EXACT_MATCH(DMI_BIOS_VERSION, "1.000"),
> +		},
> +	},
>  	{
>  		/* Intel Cherry Trail Compute Stick, Windows version */
>  		.matches = {
> -- 
> 2.21.0
> 

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2019-05-01 22:57 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-04-22 20:43 [PATCH] power: supply: axp288_fuel_gauge: Add ACEPC T8 and T11 mini PCs to the blacklist Hans de Goede
2019-04-22 20:43 ` Hans de Goede
2019-05-01 22:57 ` Sebastian Reichel
2019-05-01 22:57   ` Sebastian Reichel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox