On Tue, 22 Jul 2025, Antheas Kapenekakis wrote: > On Tue, 22 Jul 2025 at 15:22, Ilpo Järvinen > wrote: > > > > On Fri, 18 Jul 2025, Antheas Kapenekakis wrote: > > > > > Turns out that the AMD variant of the G1 uses different turbo registers > > > than the Intel variant. Differentiate them and apply the correct ones > > > to the AMD variant. > > > > > > Fixes: b369395c895b ("platform/x86: oxpec: Add support for the OneXPlayer G1") > > > Signed-off-by: Antheas Kapenekakis > > > --- > > > drivers/platform/x86/oxpec.c | 37 +++++++++++++++++++++++------------- > > > 1 file changed, 24 insertions(+), 13 deletions(-) > > > > > > diff --git a/drivers/platform/x86/oxpec.c b/drivers/platform/x86/oxpec.c > > > index 06759036945d..9839e8cb82ce 100644 > > > --- a/drivers/platform/x86/oxpec.c > > > +++ b/drivers/platform/x86/oxpec.c > > > @@ -58,7 +58,8 @@ enum oxp_board { > > > oxp_mini_amd_a07, > > > oxp_mini_amd_pro, > > > oxp_x1, > > > - oxp_g1, > > > + oxp_g1_i, > > > + oxp_g1_a, > > > }; > > > > > > static enum oxp_board board; > > > @@ -247,14 +248,14 @@ static const struct dmi_system_id dmi_table[] = { > > > DMI_MATCH(DMI_BOARD_VENDOR, "ONE-NETBOOK"), > > > DMI_EXACT_MATCH(DMI_BOARD_NAME, "ONEXPLAYER G1 A"), > > > }, > > > - .driver_data = (void *)oxp_g1, > > > + .driver_data = (void *)oxp_g1_a, > > > }, > > > { > > > .matches = { > > > DMI_MATCH(DMI_BOARD_VENDOR, "ONE-NETBOOK"), > > > DMI_EXACT_MATCH(DMI_BOARD_NAME, "ONEXPLAYER G1 i"), > > > }, > > > - .driver_data = (void *)oxp_g1, > > > + .driver_data = (void *)oxp_g1_i, > > > }, > > > { > > > .matches = { > > > > > > > - case oxp_g1: > > > + case oxp_g1_i: > > > return read_from_ec(OXP_2_SENSOR_FAN_REG, 2, val); > > > @@ -757,6 +765,7 @@ static int oxp_pwm_fan_speed(long *val) > > > + case oxp_g1_a: > > > return read_from_ec(OXP_SENSOR_FAN_REG, 2, val); > > > > > - case oxp_g1: > > > + case oxp_g1_i: > > > /* scale to range [0-184] */ > > > val = (val * 184) / 255; > > > return write_to_ec(OXP_SENSOR_PWM_REG, val); > > > @@ -796,6 +805,7 @@ static int oxp_pwm_input_write(long val) > > > + case oxp_g1_a: > > > return write_to_ec(OXP_SENSOR_PWM_REG, val); > > > @@ -816,7 +826,7 @@ static int oxp_pwm_input_read(long *val) > > > - case oxp_g1: > > > + case oxp_g1_i: > > > ret = read_from_ec(OXP_SENSOR_PWM_REG, 1, val); > > > @@ -842,6 +852,7 @@ static int oxp_pwm_input_read(long *val) > > > + case oxp_g1_a: > > > default: > > > ret = read_from_ec(OXP_SENSOR_PWM_REG, 1, val); > > > > Do these FAN and PWM registers fall under what is described in the > > changelog as "turbo registers"? Or did you extend the scope of this patch > > and forgot to update the changelog? > > Yes. Perhaps its not the best wording and it should have said EC registers. Indeed, it is not the best wording as there is a register which has "TURBO" in its name so it's a bit confusing. I'll reword the changelog while applying. -- i.