Linux Input/HID development
 help / color / mirror / Atom feed
From: Helge Deller <deller@gmx.de>
To: Dmitry Torokhov <dmitry.torokhov@gmail.com>,
	"James E.J. Bottomley" <James.Bottomley@hansenpartnership.com>
Cc: linux-kernel@vger.kernel.org, linux-input@vger.kernel.org,
	linux-parisc@vger.kernel.org
Subject: Re: [PATCH] Input: gscps2 - supply PA-RISC keyboard keymap via device property
Date: Tue, 4 Aug 2026 20:36:17 +0200	[thread overview]
Message-ID: <f0d96059-31c1-434c-b3d0-b2119f915d61@gmx.de> (raw)
In-Reply-To: <4346aa03-1d8c-4a9a-bad3-0c4186dbc65d@gmx.de>

On 8/4/26 15:59, Helge Deller wrote:
> Hi Dmitry,
> 
> On 8/3/26 06:39, Dmitry Torokhov wrote:
>> Instead of hardcoding PA-RISC specific keycode tables into atkbd via
>> compile-time inclusion, have the gscps2 PS/2 port driver attach a
>> linux,keymap software node device property to the serio device when
>> a keyboard port is registered. This allows atkbd to dynamically fetch
>> and apply the custom keymap when probing the port using generic
>> firmware property helpers, removing architecture-specific hacks from
>> generic keyboard driver code.
>>
>> Co-locate the keymap definitions with the serio port driver by moving
>> hpps2atkbd.h from drivers/input/keyboard/ to drivers/input/serio/.
>> To handle the five conflicting keys on RDI PrecisionBook laptops without
>> runtime model string checks or duplicate keymap tables in memory, add
>> CONFIG_SERIO_GSCPS2_RDI_KEYCODES to drivers/input/serio/Kconfig and
>> resolve the conflicting keycodes at compile time via preprocessor
>> macros.
>>
>> Assisted-by: Antigravity:gemini-3.5-flash
>> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
>> ---
>>
>> v2:
>> - instead of using device_create_managed_software_node() that has issue
>>    if serio port is unregistered before it is fully registered, switch to
>>    creating software node when initializing the driver and attach it to
>>    the serio port
>> - added keycodes lost in movement (0x92 - silently ignored, 0xca -
>>    KEY_KPSLASH, 0xda - KEY_KPENTER).
>>
>>   drivers/input/keyboard/Kconfig      |  38 ---------
>>   drivers/input/keyboard/atkbd.c      |   8 --
>>   drivers/input/keyboard/hpps2atkbd.h | 110 -------------------------
>>   drivers/input/serio/Kconfig         |  27 +++++++
>>   drivers/input/serio/gscps2.c        |  47 ++++++++---
>>   drivers/input/serio/hpps2atkbd.h    | 120 ++++++++++++++++++++++++++++
>>   6 files changed, 184 insertions(+), 166 deletions(-)
> 
> Thanks for cleaning it up.
> Your solution is much cleaner and gets the hacks away.
> I'll test and report back very soon.
> 
>> diff --git a/drivers/input/serio/gscps2.c b/drivers/input/serio/gscps2.c
>> index bf9b993f5733..cd1bca57fda3 100644
>> --- a/drivers/input/serio/gscps2.c
>> +++ b/drivers/input/serio/gscps2.c
>> @@ -22,20 +22,19 @@
>>    *                 was usable/enabled ?)
>>    */
>> -#include <linux/init.h>
>> -#include <linux/module.h>
>> -#include <linux/slab.h>
>> -#include <linux/serio.h>
>> +#include <linux/delay.h>
>>   #include <linux/input.h>
>>   #include <linux/interrupt.h>
>> -#include <linux/spinlock.h>
>> -#include <linux/delay.h>
>> +#include <linux/io.h>
>>   #include <linux/ioport.h>
>> +#include <linux/property.h>
>> +#include <linux/serio.h>
>>   #include <asm/irq.h>
>> -#include <asm/io.h>
>>   #include <asm/parisc-device.h>
>> +#include "hpps2atkbd.h"
> 
> Doesn't it makes sense to move the contents of the new file
> "hpps2atkbd.h" directly in here instead of keeping in own header?
Other than that, you may add:

Acked-by: Helge Deller <deller@gmx.de>
Tested-by: Helge Deller <deller@gmx.de>

Thanks!
Helge

  reply	other threads:[~2026-08-04 18:36 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-03  4:39 [PATCH] Input: gscps2 - supply PA-RISC keyboard keymap via device property Dmitry Torokhov
2026-08-03  5:08 ` sashiko-bot
2026-08-04 13:59 ` Helge Deller
2026-08-04 18:36   ` Helge Deller [this message]
2026-08-06  6:22     ` Dmitry Torokhov
  -- strict thread matches above, loose matches on Subject: below --
2026-07-27  0:37 Dmitry Torokhov
2026-07-27  0:55 ` sashiko-bot

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=f0d96059-31c1-434c-b3d0-b2119f915d61@gmx.de \
    --to=deller@gmx.de \
    --cc=James.Bottomley@hansenpartnership.com \
    --cc=dmitry.torokhov@gmail.com \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-parisc@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