Hi Nitin,

On 4-Apr-25 8:44 AM, Nitin Joshi wrote:
> Hello Hans,
> 
> Thank you for reviewing patch.
> 
> On 4/3/25 19:34, Hans de Goede wrote:
>> Hi Nitin,
>>
>> On 3-Apr-25 7:31 AM, Nitin Joshi wrote:
>>> New Lenovo Thinkpad models, e.g. the 'X9-14 Gen 1' and 'X9-15 Gen 1'
>>> has new shortcut on F9 key i.e to switch camera shutter and it
>>> send a new 0x131b hkey event when F9 key is pressed.
>>>
>>> This commit adds support for new hkey 0x131b.
>>> Signed-off-by: Nitin Joshi <nitjo...@gmail.com>
>>
>> Does the EC also actually enable/disable the camera in response to
>> this new hotkey, or is this purely a request to userspace / the OS
>> to enable/disable the camera
> Enable/disable is actually being done by EC. Camera enablement for these 
> products are still in testing phase.
> ?

Ok, I assume we can also get the state (enabled vs disabled)
e.g. from the event? In that case the events should be reported using
EV_SW, SW_CAMERA_LENS_COVER and we should also get the initial
state and set the switch to the initial state before registering
the input device.

Regards,

Hans




>>> ---
>>>   drivers/platform/x86/thinkpad_acpi.c | 2 ++
>>>   1 file changed, 2 insertions(+)
>>>
>>> diff --git a/drivers/platform/x86/thinkpad_acpi.c 
>>> b/drivers/platform/x86/thinkpad_acpi.c
>>> index 0384cf311878..80f77f9c7a58 100644
>>> --- a/drivers/platform/x86/thinkpad_acpi.c
>>> +++ b/drivers/platform/x86/thinkpad_acpi.c
>>> @@ -182,6 +182,7 @@ enum tpacpi_hkey_event_t {
>>>                              * directly in the sparse-keymap.
>>>                              */
>>>       TP_HKEY_EV_AMT_TOGGLE        = 0x131a, /* Toggle AMT on/off */
>>> +    TP_HKEY_EV_CAMERASHUTTER_TOGGLE = 0x131b, /* Toggle Camera Shutter */
>>>       TP_HKEY_EV_DOUBLETAP_TOGGLE    = 0x131c, /* Toggle trackpoint 
>>> doubletap on/off */
>>>       TP_HKEY_EV_PROFILE_TOGGLE    = 0x131f, /* Toggle platform profile in 
>>> 2024 systems */
>>>       TP_HKEY_EV_PROFILE_TOGGLE2    = 0x1401, /* Toggle platform profile in 
>>> 2025 + systems */
>>> @@ -3271,6 +3272,7 @@ static const struct key_entry keymap_lenovo[] 
>>> __initconst = {
>>>        * after switching to sparse keymap support. The mappings above use 
>>> translated
>>>        * scancodes to preserve uAPI compatibility, see 
>>> tpacpi_input_send_key().
>>>        */
>>> +    { KE_KEY, TP_HKEY_EV_CAMERASHUTTER_TOGGLE, { KEY_CAMERA_ACCESS_TOGGLE 
>>> } },
>>>       { KE_KEY, 0x131d, { KEY_VENDOR } }, /* System debug info, similar to 
>>> old ThinkPad key */
>>>       { KE_KEY, 0x1320, { KEY_LINK_PHONE } },
>>>       { KE_KEY, TP_HKEY_EV_TRACK_DOUBLETAP /* 0x8036 */, { KEY_PROG4 } },
>>
> 



_______________________________________________
ibm-acpi-devel mailing list
ibm-acpi-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ibm-acpi-devel

Reply via email to