diff mbox series

[v3,01/12] hwmon: (oxp-sensors) Distinguish the X1 variants

Message ID 20250309112114.1177361-2-lkml@antheas.dev (mailing list archive)
State Handled Elsewhere
Headers show
Series hwmon: (oxpsensors) Add devices, features, fix ABI and move to platform/x86 | expand

Commit Message

Antheas Kapenekakis March 9, 2025, 11:21 a.m. UTC
Currently, the oxp-sensors driver fuzzy matches the X1 variants. Luckily,
X1 and X1 mini share most hardware features so this works. However, they
are completely different product lines, and there is an expectation that
OneXPlayer will release more devices in the X1 line that may have
differences.

Therefore, distinguish the 3 devices that currently exist in the market.
These are the OneXPlayer X1 AMD and Intel variants, and the X1 mini which
only has an AMD variant. As far as registers go, all three support the
current driver functionality.

Signed-off-by: Antheas Kapenekakis <lkml@antheas.dev>
---
 drivers/hwmon/oxp-sensors.c | 23 ++++++++++++++++++++++-
 1 file changed, 22 insertions(+), 1 deletion(-)

Comments

Guenter Roeck March 9, 2025, 3:24 p.m. UTC | #1
On 3/9/25 04:21, Antheas Kapenekakis wrote:
> Currently, the oxp-sensors driver fuzzy matches the X1 variants. Luckily,
> X1 and X1 mini share most hardware features so this works. However, they
> are completely different product lines, and there is an expectation that
> OneXPlayer will release more devices in the X1 line that may have
> differences.
> 
> Therefore, distinguish the 3 devices that currently exist in the market.
> These are the OneXPlayer X1 AMD and Intel variants, and the X1 mini which
> only has an AMD variant. As far as registers go, all three support the
> current driver functionality.
> 
> Signed-off-by: Antheas Kapenekakis <lkml@antheas.dev>

It doesn't make sense to handle those two patches in the hwmon subsystem
because the others depend on it. I'll assume that all patches
will be applied through a platform tree.

Acked-by: Guenter Roeck <linux@roeck-us.net>
Derek John Clark March 10, 2025, 11:04 p.m. UTC | #2
On Sun, Mar 9, 2025 at 4:21 AM Antheas Kapenekakis <lkml@antheas.dev> wrote:
>
> Currently, the oxp-sensors driver fuzzy matches the X1 variants. Luckily,
> X1 and X1 mini share most hardware features so this works. However, they
> are completely different product lines, and there is an expectation that
> OneXPlayer will release more devices in the X1 line that may have
> differences.
>
> Therefore, distinguish the 3 devices that currently exist in the market.
> These are the OneXPlayer X1 AMD and Intel variants, and the X1 mini which
> only has an AMD variant. As far as registers go, all three support the
> current driver functionality.
>
> Signed-off-by: Antheas Kapenekakis <lkml@antheas.dev>
> ---
>  drivers/hwmon/oxp-sensors.c | 23 ++++++++++++++++++++++-
>  1 file changed, 22 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/hwmon/oxp-sensors.c b/drivers/hwmon/oxp-sensors.c
> index 83730d931824..5a4230ad3757 100644
> --- a/drivers/hwmon/oxp-sensors.c
> +++ b/drivers/hwmon/oxp-sensors.c
> @@ -205,7 +205,28 @@ static const struct dmi_system_id dmi_table[] = {
>         {
>                 .matches = {
>                         DMI_MATCH(DMI_BOARD_VENDOR, "ONE-NETBOOK"),
> -                       DMI_MATCH(DMI_BOARD_NAME, "ONEXPLAYER X1"),
> +                       DMI_EXACT_MATCH(DMI_BOARD_NAME, "ONEXPLAYER X1 A"),
> +               },
> +               .driver_data = (void *)oxp_x1,
> +       },
> +       {
> +               .matches = {
> +                       DMI_MATCH(DMI_BOARD_VENDOR, "ONE-NETBOOK"),
> +                       DMI_EXACT_MATCH(DMI_BOARD_NAME, "ONEXPLAYER X1 i"),
> +               },
> +               .driver_data = (void *)oxp_x1,
> +       },
> +       {
> +               .matches = {
> +                       DMI_MATCH(DMI_BOARD_VENDOR, "ONE-NETBOOK"),
> +                       DMI_EXACT_MATCH(DMI_BOARD_NAME, "ONEXPLAYER X1 mini"),
> +               },
> +               .driver_data = (void *)oxp_x1,
> +       },
> +       {
> +               .matches = {
> +                       DMI_MATCH(DMI_BOARD_VENDOR, "ONE-NETBOOK"),
> +                       DMI_EXACT_MATCH(DMI_BOARD_NAME, "ONEXPLAYER X1Pro"),
>                 },
>                 .driver_data = (void *)oxp_x1,
>         },
> --
> 2.48.1
>

Reviewed-by: Derek J. Clark <derekjohn.clark@gmail.com>
diff mbox series

Patch

diff --git a/drivers/hwmon/oxp-sensors.c b/drivers/hwmon/oxp-sensors.c
index 83730d931824..5a4230ad3757 100644
--- a/drivers/hwmon/oxp-sensors.c
+++ b/drivers/hwmon/oxp-sensors.c
@@ -205,7 +205,28 @@  static const struct dmi_system_id dmi_table[] = {
 	{
 		.matches = {
 			DMI_MATCH(DMI_BOARD_VENDOR, "ONE-NETBOOK"),
-			DMI_MATCH(DMI_BOARD_NAME, "ONEXPLAYER X1"),
+			DMI_EXACT_MATCH(DMI_BOARD_NAME, "ONEXPLAYER X1 A"),
+		},
+		.driver_data = (void *)oxp_x1,
+	},
+	{
+		.matches = {
+			DMI_MATCH(DMI_BOARD_VENDOR, "ONE-NETBOOK"),
+			DMI_EXACT_MATCH(DMI_BOARD_NAME, "ONEXPLAYER X1 i"),
+		},
+		.driver_data = (void *)oxp_x1,
+	},
+	{
+		.matches = {
+			DMI_MATCH(DMI_BOARD_VENDOR, "ONE-NETBOOK"),
+			DMI_EXACT_MATCH(DMI_BOARD_NAME, "ONEXPLAYER X1 mini"),
+		},
+		.driver_data = (void *)oxp_x1,
+	},
+	{
+		.matches = {
+			DMI_MATCH(DMI_BOARD_VENDOR, "ONE-NETBOOK"),
+			DMI_EXACT_MATCH(DMI_BOARD_NAME, "ONEXPLAYER X1Pro"),
 		},
 		.driver_data = (void *)oxp_x1,
 	},