Skip to contentSkip to conversation

hwmon: (oxp-sensors) Differentiate new BIOS for the Mini

PATCH In review Joaquín Ignacio Aramendía 2 participants 5 messages May 26, 2023 – May 27, 2023 Hardware monitoring

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 hwmon: (oxp-sensors) Differentiate new BIOS for the Mini

Newer BIOS got some other changes aside from string changes. Add a board enum to differentiate it from the old OneXplayer Mini AMD BIOS.

---
 drivers/hwmon/oxp-sensors.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
drivers/hwmon/oxp-sensors.c +4 -1
index 0ec7588610ad..423307ed4930 100644
@@ -47,6 +47,7 @@ enum oxp_board {
 	aya_neo_air_pro,
 	aya_neo_geek,
 	oxp_mini_amd,
+	oxp_mini_amd_a07,
 	oxp_mini_amd_pro,
 };
 
@@ -104,7 +105,7 @@ static const struct dmi_system_id dmi_table[] = {
 			DMI_MATCH(DMI_BOARD_VENDOR, "ONE-NETBOOK"),
 			DMI_EXACT_MATCH(DMI_BOARD_NAME, "ONEXPLAYER mini A07"),
 		},
-		.driver_data = (void *)oxp_mini_amd,
+		.driver_data = (void *)oxp_mini_amd_a07,
 	},
 	{
 		.matches = {
@@ -206,6 +207,7 @@ static int oxp_platform_read(struct device *dev, enum hwmon_sensor_types type,
 			case aya_neo_air_pro:
 			case aya_neo_geek:
 			case oxp_mini_amd:
+			case oxp_mini_amd_a07:
 				*val = (*val * 255) / 100;
 				break;
 			case oxp_mini_amd_pro:
@@ -247,6 +249,7 @@ static int oxp_platform_write(struct device *dev, enum hwmon_sensor_types type,
 			case aya_neo_air_pro:
 			case aya_neo_geek:
 			case oxp_mini_amd:
+			case oxp_mini_amd_a07:
 				val = (val * 100) / 255;
 				break;
 			case aok_zoe_a1:
Signature · 1 line
2.40.1
maintainer
#1 lore raw
Quoted 3 lines · Joaquín Ignacio Aramendía

Newer BIOS got some other changes aside from string changes. Add a board enum to differentiate it from the old OneXplayer Mini AMD BIOS.

I see no functional difference. What is the point of this change ?

Thanks,
Guenter

Quoted 45 lines
---
 drivers/hwmon/oxp-sensors.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
drivers/hwmon/oxp-sensors.c +4 -1
index 0ec7588610ad..423307ed4930 100644
@@ -47,6 +47,7 @@ enum oxp_board {
 	aya_neo_air_pro,
 	aya_neo_geek,
 	oxp_mini_amd,
+	oxp_mini_amd_a07,
 	oxp_mini_amd_pro,
 };
 
@@ -104,7 +105,7 @@ static const struct dmi_system_id dmi_table[] = {
 			DMI_MATCH(DMI_BOARD_VENDOR, "ONE-NETBOOK"),
 			DMI_EXACT_MATCH(DMI_BOARD_NAME, "ONEXPLAYER mini A07"),
 		},
-		.driver_data = (void *)oxp_mini_amd,
+		.driver_data = (void *)oxp_mini_amd_a07,
 	},
 	{
 		.matches = {
@@ -206,6 +207,7 @@ static int oxp_platform_read(struct device *dev, enum hwmon_sensor_types type,
 			case aya_neo_air_pro:
 			case aya_neo_geek:
 			case oxp_mini_amd:
+			case oxp_mini_amd_a07:
 				*val = (*val * 255) / 100;
 				break;
 			case oxp_mini_amd_pro:
@@ -247,6 +249,7 @@ static int oxp_platform_write(struct device *dev, enum hwmon_sensor_types type,
 			case aya_neo_air_pro:
 			case aya_neo_geek:
 			case oxp_mini_amd:
+			case oxp_mini_amd_a07:
 				val = (val * 100) / 255;
 				break;
 			case aok_zoe_a1:
Signature · 1 line
2.40.1
#2 lore raw
Quoted 9 lines · Joaquín Ignacio Aramendía
Quoted 3 lines

Newer BIOS got some other changes aside from string changes. Add a board enum to differentiate it from the old OneXplayer Mini AMD BIOS.

I see no functional difference. What is the point of this change ?

Thanks,
Guenter

It is nothing right now, honestly. But is necessary for a later change i have queued and a bit of OCD on my part. Should I add this to the other change?

Joaquín I. Aramendía

maintainer
#3 lore raw
Quoted 5 lines · Joaquin Aramendia
Quoted 5 lines · Joaquín Ignacio Aramendía
Quoted 3 lines

Newer BIOS got some other changes aside from string changes. Add a board enum to differentiate it from the old OneXplayer Mini AMD BIOS.

Quoted 9 lines
Quoted 4 lines

I see no functional difference. What is the point of this change ?

Thanks,
Guenter

It is nothing right now, honestly. But is necessary for a later change i have queued and a bit of OCD on my part. Should I add this to the other change?

It can stay as separate patch, but please resubmit it together with the patch(es) actually using it.

Guenter

#4 lore raw

I have resubmitted the change that uses this that includes this change. So drip this one and let's continue the review on the other.

Thanks!
Joaquín I Aramendía

Signature · 1 line
Joaquín I. Aramendía