From: "Luke Jones" <luke@ljones.dev>
To: "Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>
Cc: platform-driver-x86@vger.kernel.org,
"Hans de Goede" <hdegoede@redhat.com>,
LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v1 1/1] platform/x86: asus-wmi: add support variant of TUF RGB
Date: Wed, 20 Mar 2024 14:08:10 +1300 [thread overview]
Message-ID: <22dfda61-6feb-49b1-a2dc-3f4eb0f7ec60@app.fastmail.com> (raw)
In-Reply-To: <42f1c0d5-e7ac-4efb-fef7-75d07ad2ffaa@linux.intel.com>
On Wed, 20 Mar 2024, at 1:31 AM, Ilpo Järvinen wrote:
> On Sun, 10 Mar 2024, Luke D. Jones wrote:
>
> > Adds support for a second TUF RGB wmi call that some versions of the TUF
> > laptop come with. Also adjusts existing support to select whichever is
> > available.
> >
> > Signed-off-by: Luke D. Jones <luke@ljones.dev>
> > ---
> > drivers/platform/x86/asus-wmi.c | 12 +++++++++++-
> > include/linux/platform_data/x86/asus-wmi.h | 1 +
> > 2 files changed, 12 insertions(+), 1 deletion(-)
> >
> > diff --git a/drivers/platform/x86/asus-wmi.c b/drivers/platform/x86/asus-wmi.c
> > index 2cf695289655..ca8c73c15fcc 100644
> > --- a/drivers/platform/x86/asus-wmi.c
> > +++ b/drivers/platform/x86/asus-wmi.c
> > @@ -280,6 +280,7 @@ struct asus_wmi {
> > bool nv_temp_tgt_available;
> >
> > bool kbd_rgb_mode_available;
> > + u32 kbd_rgb_dev;
> > bool kbd_rgb_state_available;
> >
> > bool throttle_thermal_policy_available;
> > @@ -870,6 +871,7 @@ static ssize_t kbd_rgb_mode_store(struct device *dev,
> > struct device_attribute *attr,
> > const char *buf, size_t count)
> > {
> > + struct asus_wmi *asus = dev_get_drvdata(dev);
> > u32 cmd, mode, r, g, b, speed;
> > int err;
> >
> > @@ -906,7 +908,7 @@ static ssize_t kbd_rgb_mode_store(struct device *dev,
> > speed = 0xeb;
> > }
> >
> > - err = asus_wmi_evaluate_method3(ASUS_WMI_METHODID_DEVS, ASUS_WMI_DEVID_TUF_RGB_MODE,
> > + err = asus_wmi_evaluate_method3(ASUS_WMI_METHODID_DEVS, asus->kbd_rgb_dev,
> > cmd | (mode << 8) | (r << 16) | (g << 24), b | (speed << 8), NULL);
> > if (err)
> > return err;
> > @@ -4537,6 +4539,14 @@ static int asus_wmi_add(struct platform_device *pdev)
> > asus->gpu_mux_dev = ASUS_WMI_DEVID_GPU_MUX_VIVO;
> > }
> >
> > + if (asus_wmi_dev_is_present(asus, ASUS_WMI_DEVID_TUF_RGB_MODE)) {
> > + asus->kbd_rgb_mode_available = true;
> > + asus->kbd_rgb_dev = ASUS_WMI_DEVID_TUF_RGB_MODE;
> > + } else if (asus_wmi_dev_is_present(asus, ASUS_WMI_DEVID_TUF_RGB_MODE2)) {
> > + asus->kbd_rgb_mode_available = true;
> > + asus->kbd_rgb_dev = ASUS_WMI_DEVID_TUF_RGB_MODE2;
> > + }
>
> Hi,
>
> Why are you leaving this line there (unlike in the GPU MUX patch where
> you replaced it with the similar if()s as above):
>
> asus->kbd_rgb_mode_available = asus_wmi_dev_is_present(asus, ASUS_WMI_DEVID_TUF_RGB_MODE);
Missed it I guess. Thanks for catching, I'll submit next version.
>
> ?
>
> --
> i.
>
>
prev parent reply other threads:[~2024-03-20 1:08 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-10 5:57 [PATCH v1 0/1] asus-wmi: add support variant of TUF RGB Luke D. Jones
2024-03-10 5:57 ` [PATCH v1 1/1] platform/x86: " Luke D. Jones
2024-03-19 12:31 ` Ilpo Järvinen
2024-03-20 1:08 ` Luke Jones [this message]
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=22dfda61-6feb-49b1-a2dc-3f4eb0f7ec60@app.fastmail.com \
--to=luke@ljones.dev \
--cc=hdegoede@redhat.com \
--cc=ilpo.jarvinen@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=platform-driver-x86@vger.kernel.org \
/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