From: Alexey Gladkov <legion@kernel.org>
To: make-initrd@lists.altlinux.org
Subject: Re: [make-initrd] Поддержка тачскрина
Date: Sun, 21 Jul 2024 13:53:15 +0200
Message-ID: <Zpz2q_gqpANfB9ud@example.org> (raw)
In-Reply-To: <20240721012544.b88a97679a5c902a0696ea8e@basealt.ru>
On Sun, Jul 21, 2024 at 01:25:44AM +0700, egor wrote:
> Всем привет!
>
> Пытаюсь разобраться, как сделать угадайку для модулей тачскрина для
> make-initrd, и не могу понять, что за заковыристый фрагмент кода в
> guess/keyboard/action:
>
> for i in "$SYSFS_PATH/class/input"/*; do
> [ -f "$i/name" ] && [ -f "$i/modalias" ] ||
> continue
>
> local led=
> readline led "$i/capabilities/led"
>
> [ "$led" != '0' ] ||
> continue
>
> Почему мы должны исключать устройства, у которых в led записан 0?
У клавиатур обычно есть led и они не 0. Я не придумал лучшего способа
определения клавиатуры.
Возможно, можно было бы искать что-то типа /sys/class/input/*/*::capslock
>
> Также из guess/keyboard/README.md:
>
> > # Guess module: keyboard
> >
> > This module tries to guess modules for all input devices.
>
> Этот модуль предполагает использование только для поиска клавиатур или
> всех устройств ввода? Просто что-то отличное от нуля я встречал только у
> клавиатур.
Как следует из названия этот модуль должен искать именно клавиатуры.
--
Rgrds, legion
prev parent reply other threads:[~2024-07-21 11:53 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-20 18:25 egor
2024-07-21 11:53 ` Alexey Gladkov [this message]
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=Zpz2q_gqpANfB9ud@example.org \
--to=legion@kernel.org \
--cc=make-initrd@lists.altlinux.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
Make-initrd development discussion
This inbox may be cloned and mirrored by anyone:
git clone --mirror http://lore.altlinux.org/make-initrd/0 make-initrd/git/0.git
# If you have public-inbox 1.1+ installed, you may
# initialize and index your mirror using the following commands:
public-inbox-init -V2 make-initrd make-initrd/ http://lore.altlinux.org/make-initrd \
make-initrd@lists.altlinux.org make-initrd@lists.altlinux.ru make-initrd@lists.altlinux.com
public-inbox-index make-initrd
Example config snippet for mirrors.
Newsgroup available over NNTP:
nntp://lore.altlinux.org/org.altlinux.lists.make-initrd
AGPL code for this site: git clone https://public-inbox.org/public-inbox.git