mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jiaxun Yang <jiaxun.yang@flygoat.com>
To: "Barnabás Pőcze" <pobrn@protonmail.com>
Cc: "platform-driver-x86@vger.kernel.org" 
	<platform-driver-x86@vger.kernel.org>,
	"stable@vger.kernel.org" <stable@vger.kernel.org>,
	Ike Panhc <ike.pan@canonical.com>,
	Hans de Goede <hdegoede@redhat.com>,
	Mark Gross <mgross@linux.intel.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] platform/x86: ideapad-laptop: Add has_touchpad_switch
Date: Sat, 2 Jan 2021 10:36:02 +0800	[thread overview]
Message-ID: <063eb02d-a699-3f6c-fd1b-721e9d195e82@flygoat.com> (raw)
In-Reply-To: <XVSpzJf9TdCi-rg53vfxB7yLg8VJQsQVbqoC1Fu1L7tL5mPKCpMABkedQNatITMiUy7pvBC7g0Cqd30-zqc0bCsSSoy5YXp_gJLTLM0odTg=@protonmail.com>

在 2021/1/2 上午1:09, Barnabás Pőcze 写道:
> Hi
>
>
> 2021. január 1., péntek 17:08 keltezéssel, Jiaxun Yang írta:
>
>> [...]
>>>> @@ -1006,6 +1018,10 @@ static int ideapad_acpi_add(struct platform_device *pdev)
>>>>   	if (!priv->has_hw_rfkill_switch)
>>>>   		write_ec_cmd(priv->adev->handle, VPCCMD_W_RF, 1);
>>>>
>>>> +	/* The same for Touchpad */
>>>> +	if (!priv->has_touchpad_switch)
>>>> +		write_ec_cmd(priv->adev->handle, VPCCMD_W_TOUCHPAD, 1);
>>>> +
>>> Shouldn't it be the other way around: `if (priv->has_touchpad_switch)`?
>> It is to prevent accidentally disable touchpad on machines that do have EC switch,
>> so it's intentional.
>> [...]
> Sorry, but the explanation not fully clear to me. The commit message seems to
> indicate that some models "do not use EC to switch touchpad", and I take that
> means that reading from VPCCMD_R_TOUCHPAD will not reflect the actual state of the
> touchpad and writing to VPCCMD_W_TOUCHPAD will not change the state of the touchpad.

I'm just trying to prevent removing functionality on machines that 
touchpad can be controlled
by EC but also equipped I2C HID touchpad. At least users will have a 
functional touchpad
after that.

>
> But then why do you still write to VPCCMD_W_TOUCHPAD on devices where supposedly
> this does not have any effect (at least not the desired one)? And the part of the
> code I made my comment about only runs on machines on which the touchpad supposedly
> cannot be controlled by the EC. What am I missing?
>
> And there is the other problem: on some machines, this patch removes working
> functionality.
Yeah that's a problem. I just don't want to repeat the story of rfkill 
whitelist, it ends up with
countless machine to be added.

Maybe I should specify HID of touchpad as well. Two machines that known 
to be problematic
all have ELAN0634 touchpad.

Thanks.

- Jiaxun

>
>
> Regards,
> Barnabás Pőcze


  reply	other threads:[~2021-01-02  2:37 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-01  6:11 Jiaxun Yang
2021-01-01 14:20 ` Barnabás Pőcze
2021-01-01 16:08   ` Jiaxun Yang
2021-01-01 17:09     ` Barnabás Pőcze
2021-01-02  2:36       ` Jiaxun Yang [this message]
2021-01-02 12:19         ` Barnabás Pőcze

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=063eb02d-a699-3f6c-fd1b-721e9d195e82@flygoat.com \
    --to=jiaxun.yang@flygoat.com \
    --cc=hdegoede@redhat.com \
    --cc=ike.pan@canonical.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mgross@linux.intel.com \
    --cc=platform-driver-x86@vger.kernel.org \
    --cc=pobrn@protonmail.com \
    --cc=stable@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

all inboxes | Powered by JetHome®