mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>
To: Antheas Kapenekakis <lkml@antheas.dev>
Cc: platform-driver-x86@vger.kernel.org,
	LKML <linux-kernel@vger.kernel.org>,
	"Derek John Clark" <derekjohn.clark@gmail.com>,
	"Joaquín Ignacio Aramendía" <samsagax@gmail.com>,
	"Hans de Goede" <hdegoede@redhat.com>,
	Eileen <eileen@one-netbook.com>
Subject: Re: [PATCH v1 1/2] platform/x86: oxpec: Fix turbo register for G1 AMD
Date: Tue, 22 Jul 2025 16:31:39 +0300 (EEST)	[thread overview]
Message-ID: <73ae539a-96e3-bec3-f02c-e74660297b38@linux.intel.com> (raw)
In-Reply-To: <CAGwozwFvWuXM_oSzY9S+2CdW+dHiusuYra6kJeA+Vo00NZFb4g@mail.gmail.com>

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

On Tue, 22 Jul 2025, Antheas Kapenekakis wrote:

> On Tue, 22 Jul 2025 at 15:22, Ilpo Järvinen
> <ilpo.jarvinen@linux.intel.com> 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 <lkml@antheas.dev>
> > > ---
> > >  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.

  reply	other threads:[~2025-07-22 13:31 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-07-18 16:33 Antheas Kapenekakis
2025-07-18 16:33 ` [PATCH v1 2/2] platform/x86: oxpec: Add support for OneXPlayer X1 Mini Pro (Strix Point) Antheas Kapenekakis
2025-07-22 13:22 ` [PATCH v1 1/2] platform/x86: oxpec: Fix turbo register for G1 AMD Ilpo Järvinen
2025-07-22 13:27   ` Antheas Kapenekakis
2025-07-22 13:31     ` Ilpo Järvinen [this message]
2025-07-22 15:38 ` Ilpo Järvinen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=73ae539a-96e3-bec3-f02c-e74660297b38@linux.intel.com \
    --to=ilpo.jarvinen@linux.intel.com \
    --cc=derekjohn.clark@gmail.com \
    --cc=eileen@one-netbook.com \
    --cc=hdegoede@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lkml@antheas.dev \
    --cc=platform-driver-x86@vger.kernel.org \
    --cc=samsagax@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®