public inbox for linux-input@vger.kernel.org
 help / color / mirror / Atom feed
From: Florian Klink <flokli@flokli.de>
To: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Cc: Jiri Kosina <jikos@kernel.org>,
	"open list:HID CORE LAYER" <linux-input@vger.kernel.org>,
	lkml <linux-kernel@vger.kernel.org>,
	ValdikSS <iam@valdikss.org.ru>
Subject: Re: [PATCH v4 1/3] HID: lenovo: Add support for ThinkPad TrackPoint Keyboard II
Date: Fri, 1 Apr 2022 13:57:26 +0200	[thread overview]
Message-ID: <20220401115726.6pp2avtl5ezqkbr2@tp> (raw)
In-Reply-To: <CAO-hwJ+AXxf+0TtQ1Zkk9MQNZuBWsa3_eb4aAg_u+-gEuKbLPQ@mail.gmail.com>

>On 22-04-01 12:30:47, Benjamin Tissoires wrote:
>>Thanks for the work Florian, and sorry for the delay.
>>
>>One comment below:
>>> @@ -977,11 +1114,14 @@ static int lenovo_probe_cptkbd(struct hid_device *hdev)
>>>
>>>         /*
>>>          * Tell the keyboard a driver understands it, and turn F7, F9, F11 into
>>> -        * regular keys
>>> +        * regular keys (Compact only)
>>>          */
>>> -       ret = lenovo_send_cmd_cptkbd(hdev, 0x01, 0x03);
>>> -       if (ret)
>>> -               hid_warn(hdev, "Failed to switch F7/9/11 mode: %d\n", ret);
>>> +       if (hdev->product == USB_DEVICE_ID_LENOVO_CUSBKBD ||
>>> +           hdev->product == USB_DEVICE_ID_LENOVO_CBTKBD) {
>>
>>Is there a chance that other PIDs included in the files are needing that call?
>>I'm just worried about regressions here.
>>
>>Beside that question, the series is:
>>Reviewed-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>

`lenovo_probe_cptkbd` was introduced in

f3d4ff0e04cc4450bdc7a4140020913b1280d205
HID: lenovo: Add support for Compact (BT|USB) keyboard)

Back then, it was only called for these two "Compact (BT|USB) keyboard)"
devices (see switch case in `lenovo_probe`).

The new code now calls `lenovo_probe_cptkbd` also for
`USB_DEVICE_ID_LENOVO_TPII{BT,USB}KBD`:

> 	case USB_DEVICE_ID_LENOVO_CUSBKBD:
> 	case USB_DEVICE_ID_LENOVO_CBTKBD:
> 	case USB_DEVICE_ID_LENOVO_TPIIUSBKBD:
> 	case USB_DEVICE_ID_LENOVO_TPIIBTKBD:
> 		ret = lenovo_probe_cptkbd(hdev);

… and the F7/9/11 thing is only done for the compact variants.

Other keyboards still use other `lenovo_probe_tpkbd` and
`lenovo_probe_tp10ubkbd` functions.

I agree the `lenovo_probe_*` names became a bit less self-explaining
over time, but the switch case in `lenovo_probe` itself should be pretty
authoritative about which hardware causes which function to be called.

Regards,
Florian

  reply	other threads:[~2022-04-01 12:04 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-13 21:49 [PATCH v4 0/3] HID: lenovo: Add support for ThinkPad TrackPoint Florian Klink
2022-02-13 21:49 ` [PATCH v4 1/3] HID: lenovo: Add support for ThinkPad TrackPoint Keyboard II Florian Klink
2022-04-01 10:30   ` Benjamin Tissoires
2022-04-01 11:57     ` Florian Klink [this message]
2022-02-13 21:49 ` [PATCH v4 2/3] HID: lenovo: Sync Fn-lock state on button press for Compact and TrackPoint II keyboards Florian Klink
2022-02-13 21:49 ` [PATCH v4 3/3] HID: lenovo: Add note about different report numbers Florian Klink
2022-05-02 15:50 ` [PATCH v4 0/3] HID: lenovo: Add support for ThinkPad TrackPoint Jiri Kosina

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=20220401115726.6pp2avtl5ezqkbr2@tp \
    --to=flokli@flokli.de \
    --cc=benjamin.tissoires@redhat.com \
    --cc=iam@valdikss.org.ru \
    --cc=jikos@kernel.org \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@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