Re: [PATCH] Add sysfs interface for touchpad state

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Feb 1, 2017 at 6:17 PM, Ritesh Raj Sarraf <rrs@xxxxxxxxxx> wrote:

> On Wed, 2017-02-01 at 17:07 +0200, Andy Shevchenko wrote:
>> > root@learner:/sys/class/input# od -x /dev/input/event6
>> > ?0000000 ee33 5891 0000 0000 2bd9 0005 0000 0000
>> > ^@0000020 0004 0004 0042 0000 ee33 5891 0000 0000
>> > 0000040 2bd9 0005 0000 0000 0001 00c1 0001 0000
>> > 0000060 ee33 5891 0000 0000 2bd9 0005 0000 0000
>> > 0000100 0000 0000 0000 0000 ee33 5891 0000 0000
>> > 0000120 2c09 0005 0000 0000 0001 00c1 0000 0000
>> > 0000140 ee33 5891 0000 0000 2c09 0005 0000 0000
>> > 0000160 0000 0000 0000 0000 ee37 5891 0000 0000
>> > 0000200 3d7e 000f 0000 0000 0004 0004 0043 0000
>> > 0000220 ee37 5891 0000 0000 3d7e 000f 0000 0000
>> > 0000240 0001 00c0 0001 0000 ee37 5891 0000 0000
>> > 0000260 3d7e 000f 0000 0000 0000 0000 0000 0000
>> > 0000300 ee37 5891 0000 0000 3dae 000f 0000 0000
>> > 0000320 0001 00c0 0000 0000 ee37 5891 0000 0000
>> > 0000340 3dae 000f 0000 0000 0000 0000 0000 0000
>>
>> So, the whole idea of this exercise is to show that driver sends an
>> event whenever you bend / unbend the cover.
>> User space already will know what is the state of the cover.
>>
>
> Yes. But we've not found the interface in sysfs where we could read that from.
> Nor did udev report anything meaningful for it.
>
>> > By the way, does the patch make sense for
>> > inclusion ? To have an interface for touchpad mode ?
>>
>> The question now is why do you need that on top of existing event?
>
> If you have time, please see:
> https://bugs.launchpad.net/bugs/1366421
>
> It has pretty much all the details on what and why we need something in sysfs.

It's a lo-o-ong discussion from which I, might be wrongly, assumed
that there couple of problems: a) you don't know initial state, b)
something preventing use of event.

Keyboard and touchpad are disabled by hw, so, only what OS needs is a
notification.

Can you point me exactly to the message that explains _why_ it's
impossible to use standard eventX mechanism for that?

> For HP and ThinkPad, there already are interfaces available.

Perhaps those hybrids didn't lock keyboard and touchpad in hw and
don't send any event, that's why OS needs it.

> /sys/devices/platform/hp-wmi/tablet
> /sys/devices/platform/thinkpad_acpi/hotkey_tablet_mode
>
> It'd be nice to see the same for Yoga IdeaPad; a proper interface for tablet-
> mode


-- 
With Best Regards,
Andy Shevchenko



[Index of Archives]     [Linux Kernel Development]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux