Linux-PM Archive on lore.kernel.org
 help / color / Atom feed
* [PATCH 1/2] power: supply: axp288_fuel_gauge: Sort the DMI blacklist alphabetically
@ 2019-08-25 15:41 Hans de Goede
  2019-08-25 15:41 ` [PATCH 2/2] power: supply: axp288_fuel_gauge: Add Minix Neo Z83-4 to the blacklist Hans de Goede
  2019-09-01 20:13 ` [PATCH 1/2] power: supply: axp288_fuel_gauge: Sort the DMI blacklist alphabetically Sebastian Reichel
  0 siblings, 2 replies; 4+ messages in thread
From: Hans de Goede @ 2019-08-25 15:41 UTC (permalink / raw)
  To: Sebastian Reichel; +Cc: Hans de Goede, Chen-Yu Tsai, linux-pm

The blacklist is getting big enough that it is good to have some sort
of fixed order for it, sort it alphabetically.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
---
 drivers/power/supply/axp288_fuel_gauge.c | 13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)

diff --git a/drivers/power/supply/axp288_fuel_gauge.c b/drivers/power/supply/axp288_fuel_gauge.c
index 44169dabb705..6db2e86098e9 100644
--- a/drivers/power/supply/axp288_fuel_gauge.c
+++ b/drivers/power/supply/axp288_fuel_gauge.c
@@ -674,6 +674,7 @@ static void fuel_gauge_init_irq(struct axp288_fg_info *info)
 /*
  * Some devices have no battery (HDMI sticks) and the axp288 battery's
  * detection reports one despite it not being there.
+ * Please keep this listed sorted alphabetically.
  */
 static const struct dmi_system_id axp288_fuel_gauge_blacklist[] = {
 	{
@@ -696,6 +697,12 @@ static const struct dmi_system_id axp288_fuel_gauge_blacklist[] = {
 			DMI_EXACT_MATCH(DMI_BIOS_VERSION, "1.000"),
 		},
 	},
+	{
+		/* ECS EF20EA */
+		.matches = {
+			DMI_MATCH(DMI_PRODUCT_NAME, "EF20EA"),
+		},
+	},
 	{
 		/* Intel Cherry Trail Compute Stick, Windows version */
 		.matches = {
@@ -719,12 +726,6 @@ static const struct dmi_system_id axp288_fuel_gauge_blacklist[] = {
 			DMI_MATCH(DMI_BOARD_VERSION, "V1.1"),
 		},
 	},
-	{
-		/* ECS EF20EA */
-		.matches = {
-			DMI_MATCH(DMI_PRODUCT_NAME, "EF20EA"),
-		},
-	},
 	{}
 };
 
-- 
2.23.0


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

* [PATCH 2/2] power: supply: axp288_fuel_gauge: Add Minix Neo Z83-4 to the blacklist
  2019-08-25 15:41 [PATCH 1/2] power: supply: axp288_fuel_gauge: Sort the DMI blacklist alphabetically Hans de Goede
@ 2019-08-25 15:41 ` Hans de Goede
  2019-09-01 20:13   ` Sebastian Reichel
  2019-09-01 20:13 ` [PATCH 1/2] power: supply: axp288_fuel_gauge: Sort the DMI blacklist alphabetically Sebastian Reichel
  1 sibling, 1 reply; 4+ messages in thread
From: Hans de Goede @ 2019-08-25 15:41 UTC (permalink / raw)
  To: Sebastian Reichel; +Cc: Hans de Goede, Chen-Yu Tsai, linux-pm

The Minix Neo Z83-4 is another mini PC using the AXP288 PMIC where the
EFI code does not disable the charger part of the PMIC causing us to report
battery readings (of always 100%) to userspace even though there is no
battery in this wall-outlet powered device.

Add it to the blacklist to avoid the bogus battery status reporting.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
---
 drivers/power/supply/axp288_fuel_gauge.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/drivers/power/supply/axp288_fuel_gauge.c b/drivers/power/supply/axp288_fuel_gauge.c
index 6db2e86098e9..e1bc4e6e6f30 100644
--- a/drivers/power/supply/axp288_fuel_gauge.c
+++ b/drivers/power/supply/axp288_fuel_gauge.c
@@ -726,6 +726,13 @@ static const struct dmi_system_id axp288_fuel_gauge_blacklist[] = {
 			DMI_MATCH(DMI_BOARD_VERSION, "V1.1"),
 		},
 	},
+	{
+		/* Minix Neo Z83-4 mini PC */
+		.matches = {
+			DMI_MATCH(DMI_SYS_VENDOR, "MINIX"),
+			DMI_MATCH(DMI_PRODUCT_NAME, "Z83-4"),
+		}
+	},
 	{}
 };
 
-- 
2.23.0


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

* Re: [PATCH 1/2] power: supply: axp288_fuel_gauge: Sort the DMI blacklist alphabetically
  2019-08-25 15:41 [PATCH 1/2] power: supply: axp288_fuel_gauge: Sort the DMI blacklist alphabetically Hans de Goede
  2019-08-25 15:41 ` [PATCH 2/2] power: supply: axp288_fuel_gauge: Add Minix Neo Z83-4 to the blacklist Hans de Goede
@ 2019-09-01 20:13 ` Sebastian Reichel
  1 sibling, 0 replies; 4+ messages in thread
From: Sebastian Reichel @ 2019-09-01 20:13 UTC (permalink / raw)
  To: Hans de Goede; +Cc: Chen-Yu Tsai, linux-pm

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

Hi,

On Sun, Aug 25, 2019 at 05:41:51PM +0200, Hans de Goede wrote:
> The blacklist is getting big enough that it is good to have some sort
> of fixed order for it, sort it alphabetically.
> 
> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
> ---

Thanks, queued.

-- Sebastian

>  drivers/power/supply/axp288_fuel_gauge.c | 13 +++++++------
>  1 file changed, 7 insertions(+), 6 deletions(-)
> 
> diff --git a/drivers/power/supply/axp288_fuel_gauge.c b/drivers/power/supply/axp288_fuel_gauge.c
> index 44169dabb705..6db2e86098e9 100644
> --- a/drivers/power/supply/axp288_fuel_gauge.c
> +++ b/drivers/power/supply/axp288_fuel_gauge.c
> @@ -674,6 +674,7 @@ static void fuel_gauge_init_irq(struct axp288_fg_info *info)
>  /*
>   * Some devices have no battery (HDMI sticks) and the axp288 battery's
>   * detection reports one despite it not being there.
> + * Please keep this listed sorted alphabetically.
>   */
>  static const struct dmi_system_id axp288_fuel_gauge_blacklist[] = {
>  	{
> @@ -696,6 +697,12 @@ static const struct dmi_system_id axp288_fuel_gauge_blacklist[] = {
>  			DMI_EXACT_MATCH(DMI_BIOS_VERSION, "1.000"),
>  		},
>  	},
> +	{
> +		/* ECS EF20EA */
> +		.matches = {
> +			DMI_MATCH(DMI_PRODUCT_NAME, "EF20EA"),
> +		},
> +	},
>  	{
>  		/* Intel Cherry Trail Compute Stick, Windows version */
>  		.matches = {
> @@ -719,12 +726,6 @@ static const struct dmi_system_id axp288_fuel_gauge_blacklist[] = {
>  			DMI_MATCH(DMI_BOARD_VERSION, "V1.1"),
>  		},
>  	},
> -	{
> -		/* ECS EF20EA */
> -		.matches = {
> -			DMI_MATCH(DMI_PRODUCT_NAME, "EF20EA"),
> -		},
> -	},
>  	{}
>  };
>  
> -- 
> 2.23.0
> 

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

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

* Re: [PATCH 2/2] power: supply: axp288_fuel_gauge: Add Minix Neo Z83-4 to the blacklist
  2019-08-25 15:41 ` [PATCH 2/2] power: supply: axp288_fuel_gauge: Add Minix Neo Z83-4 to the blacklist Hans de Goede
@ 2019-09-01 20:13   ` Sebastian Reichel
  0 siblings, 0 replies; 4+ messages in thread
From: Sebastian Reichel @ 2019-09-01 20:13 UTC (permalink / raw)
  To: Hans de Goede; +Cc: Chen-Yu Tsai, linux-pm

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

Hi,

On Sun, Aug 25, 2019 at 05:41:52PM +0200, Hans de Goede wrote:
> The Minix Neo Z83-4 is another mini PC using the AXP288 PMIC where the
> EFI code does not disable the charger part of the PMIC causing us to report
> battery readings (of always 100%) to userspace even though there is no
> battery in this wall-outlet powered device.
> 
> Add it to the blacklist to avoid the bogus battery status reporting.
> 
> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
> ---

Thanks, queued.

-- Sebastian

>  drivers/power/supply/axp288_fuel_gauge.c | 7 +++++++
>  1 file changed, 7 insertions(+)
> 
> diff --git a/drivers/power/supply/axp288_fuel_gauge.c b/drivers/power/supply/axp288_fuel_gauge.c
> index 6db2e86098e9..e1bc4e6e6f30 100644
> --- a/drivers/power/supply/axp288_fuel_gauge.c
> +++ b/drivers/power/supply/axp288_fuel_gauge.c
> @@ -726,6 +726,13 @@ static const struct dmi_system_id axp288_fuel_gauge_blacklist[] = {
>  			DMI_MATCH(DMI_BOARD_VERSION, "V1.1"),
>  		},
>  	},
> +	{
> +		/* Minix Neo Z83-4 mini PC */
> +		.matches = {
> +			DMI_MATCH(DMI_SYS_VENDOR, "MINIX"),
> +			DMI_MATCH(DMI_PRODUCT_NAME, "Z83-4"),
> +		}
> +	},
>  	{}
>  };
>  
> -- 
> 2.23.0
> 

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

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

end of thread, back to index

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-08-25 15:41 [PATCH 1/2] power: supply: axp288_fuel_gauge: Sort the DMI blacklist alphabetically Hans de Goede
2019-08-25 15:41 ` [PATCH 2/2] power: supply: axp288_fuel_gauge: Add Minix Neo Z83-4 to the blacklist Hans de Goede
2019-09-01 20:13   ` Sebastian Reichel
2019-09-01 20:13 ` [PATCH 1/2] power: supply: axp288_fuel_gauge: Sort the DMI blacklist alphabetically Sebastian Reichel

Linux-PM Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-pm/0 linux-pm/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-pm linux-pm/ https://lore.kernel.org/linux-pm \
		linux-pm@vger.kernel.org linux-pm@archiver.kernel.org
	public-inbox-index linux-pm


Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-pm


AGPL code for this site: git clone https://public-inbox.org/ public-inbox