diff mbox series

[v2,1/2] Input: atkbd - Make it possible to apply atkbd.reset via kernel quirk

Message ID 20230227185907.569154-2-wse@tuxedocomputers.com (mailing list archive)
State New, archived
Headers show
Series Fix "Input: i8042 - add TUXEDO devices to i8042 quirk tables for partial fix" | expand

Commit Message

Werner Sembach Feb. 27, 2023, 6:59 p.m. UTC
atkbd.reset was only a command line parameter. Some devices might have a
known bug that can be worked around by just permanently applying this
quirk.

This patch adds the ability to do this on the kernel level for known buggy
devices.

Signed-off-by: Werner Sembach <wse@tuxedocomputers.com>
Cc: stable@vger.kernel.org
---
 drivers/input/keyboard/atkbd.c | 6 ++++++
 1 file changed, 6 insertions(+)

Comments

Greg KH Feb. 28, 2023, 7:34 a.m. UTC | #1
On Mon, Feb 27, 2023 at 07:59:06PM +0100, Werner Sembach wrote:
> atkbd.reset was only a command line parameter. Some devices might have a
> known bug that can be worked around by just permanently applying this
> quirk.
> 
> This patch adds the ability to do this on the kernel level for known buggy
> devices.
> 
> Signed-off-by: Werner Sembach <wse@tuxedocomputers.com>
> Cc: stable@vger.kernel.org
> ---
>  drivers/input/keyboard/atkbd.c | 6 ++++++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/drivers/input/keyboard/atkbd.c b/drivers/input/keyboard/atkbd.c
> index 246958795f60..ef65c46c4efe 100644
> --- a/drivers/input/keyboard/atkbd.c
> +++ b/drivers/input/keyboard/atkbd.c
> @@ -1731,6 +1731,12 @@ static int __init atkbd_deactivate_fixup(const struct dmi_system_id *id)
>  	return 1;
>  }
>  
> +static int __init atkbd_reset_fixup(const struct dmi_system_id *id)
> +{
> +	atkbd_reset = true;
> +	return 1;

Why is this returning 1?  Who calls this?

And this should be a per-device attribute, not a global one, right?

thanks,

greg k-h
Werner Sembach Feb. 28, 2023, 10:58 a.m. UTC | #2
Am 28.02.23 um 08:34 schrieb Greg KH:
> On Mon, Feb 27, 2023 at 07:59:06PM +0100, Werner Sembach wrote:
>> atkbd.reset was only a command line parameter. Some devices might have a
>> known bug that can be worked around by just permanently applying this
>> quirk.
>>
>> This patch adds the ability to do this on the kernel level for known buggy
>> devices.
>>
>> Signed-off-by: Werner Sembach <wse@tuxedocomputers.com>
>> Cc: stable@vger.kernel.org
>> ---
>>   drivers/input/keyboard/atkbd.c | 6 ++++++
>>   1 file changed, 6 insertions(+)
>>
>> diff --git a/drivers/input/keyboard/atkbd.c b/drivers/input/keyboard/atkbd.c
>> index 246958795f60..ef65c46c4efe 100644
>> --- a/drivers/input/keyboard/atkbd.c
>> +++ b/drivers/input/keyboard/atkbd.c
>> @@ -1731,6 +1731,12 @@ static int __init atkbd_deactivate_fixup(const struct dmi_system_id *id)
>>   	return 1;
>>   }
>>   
>> +static int __init atkbd_reset_fixup(const struct dmi_system_id *id)
>> +{
>> +	atkbd_reset = true;
>> +	return 1;
> Why is this returning 1?  Who calls this?

This function is following the format of the other fixup functions directly 
above it.

It is there to be called as a callback via the atkbd_dmi_quirk_table on a per 
device basis. See 2nd patch of this patchset.

Greetings,

Werner

>
> And this should be a per-device attribute, not a global one, right?
>
> thanks,
>
> greg k-h
diff mbox series

Patch

diff --git a/drivers/input/keyboard/atkbd.c b/drivers/input/keyboard/atkbd.c
index 246958795f60..ef65c46c4efe 100644
--- a/drivers/input/keyboard/atkbd.c
+++ b/drivers/input/keyboard/atkbd.c
@@ -1731,6 +1731,12 @@  static int __init atkbd_deactivate_fixup(const struct dmi_system_id *id)
 	return 1;
 }
 
+static int __init atkbd_reset_fixup(const struct dmi_system_id *id)
+{
+	atkbd_reset = true;
+	return 1;
+}
+
 /*
  * NOTE: do not add any more "force release" quirks to this table.  The
  * task of adjusting list of keys that should be "released" automatically