* [PATCH] hwmon: (oxp-sensors) Differentiate new BIOS for the Mini
@ 2023-05-26 21:56 Joaquín Ignacio Aramendía
2023-05-26 23:31 ` Guenter Roeck
0 siblings, 1 reply; 5+ messages in thread
From: Joaquín Ignacio Aramendía @ 2023-05-26 21:56 UTC (permalink / raw)
To: linux
Cc: Joaquín Ignacio Aramendía, derekjohn.clark, jdelvare,
linux-hwmon, linux-kernel
Newer BIOS got some other changes aside from string changes. Add a board
enum to differentiate it from the old OneXplayer Mini AMD BIOS.
Signed-off-by: Joaquín Ignacio Aramendía <samsagax@gmail.com>
---
drivers/hwmon/oxp-sensors.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/drivers/hwmon/oxp-sensors.c b/drivers/hwmon/oxp-sensors.c
index 0ec7588610ad..423307ed4930 100644
--- a/drivers/hwmon/oxp-sensors.c
+++ b/drivers/hwmon/oxp-sensors.c
@@ -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:
--
2.40.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] hwmon: (oxp-sensors) Differentiate new BIOS for the Mini
2023-05-26 21:56 [PATCH] hwmon: (oxp-sensors) Differentiate new BIOS for the Mini Joaquín Ignacio Aramendía
@ 2023-05-26 23:31 ` Guenter Roeck
2023-05-26 23:42 ` Joaquin Aramendia
0 siblings, 1 reply; 5+ messages in thread
From: Guenter Roeck @ 2023-05-26 23:31 UTC (permalink / raw)
To: Joaquín Ignacio Aramendía
Cc: derekjohn.clark, jdelvare, linux-hwmon, linux-kernel
On Fri, May 26, 2023 at 06:56:22PM -0300, Joaquín Ignacio Aramendía wrote:
> 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
> Signed-off-by: Joaquín Ignacio Aramendía <samsagax@gmail.com>
> ---
> drivers/hwmon/oxp-sensors.c | 5 ++++-
> 1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/hwmon/oxp-sensors.c b/drivers/hwmon/oxp-sensors.c
> index 0ec7588610ad..423307ed4930 100644
> --- a/drivers/hwmon/oxp-sensors.c
> +++ b/drivers/hwmon/oxp-sensors.c
> @@ -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:
> --
> 2.40.1
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] hwmon: (oxp-sensors) Differentiate new BIOS for the Mini
2023-05-26 23:31 ` Guenter Roeck
@ 2023-05-26 23:42 ` Joaquin Aramendia
2023-05-27 12:19 ` Guenter Roeck
0 siblings, 1 reply; 5+ messages in thread
From: Joaquin Aramendia @ 2023-05-26 23:42 UTC (permalink / raw)
To: Guenter Roeck; +Cc: Derek J. Clark, Jean Delvare, linux-hwmon, linux-kernel
> On Fri, May 26, 2023 at 06:56:22PM -0300, Joaquín Ignacio Aramendía wrote:
> > 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
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] hwmon: (oxp-sensors) Differentiate new BIOS for the Mini
2023-05-26 23:42 ` Joaquin Aramendia
@ 2023-05-27 12:19 ` Guenter Roeck
2023-05-27 12:55 ` Joaquin Aramendia
0 siblings, 1 reply; 5+ messages in thread
From: Guenter Roeck @ 2023-05-27 12:19 UTC (permalink / raw)
To: Joaquin Aramendia; +Cc: Derek J. Clark, Jean Delvare, linux-hwmon, linux-kernel
On Fri, May 26, 2023 at 08:42:51PM -0300, Joaquin Aramendia wrote:
> > On Fri, May 26, 2023 at 06:56:22PM -0300, Joaquín Ignacio Aramendía wrote:
> > > 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?
>
It can stay as separate patch, but please resubmit it together with
the patch(es) actually using it.
Guenter
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2023-05-27 12:55 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-05-26 21:56 [PATCH] hwmon: (oxp-sensors) Differentiate new BIOS for the Mini Joaquín Ignacio Aramendía
2023-05-26 23:31 ` Guenter Roeck
2023-05-26 23:42 ` Joaquin Aramendia
2023-05-27 12:19 ` Guenter Roeck
2023-05-27 12:55 ` Joaquin Aramendia
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).