From: Paul Eggleton <paul.eggleton@linux.intel.com>
To: Andrea Adami <andrea.adami@gmail.com>
Cc: openembedded-devel@lists.openembedded.org
Subject: Re: [meta-handheld][PATCH] udev: generalize the check in touchscreen rule
Date: Mon, 02 Apr 2012 12:10:48 +0100 [thread overview]
Message-ID: <3232177.RSLRf5oIft@helios> (raw)
In-Reply-To: <1333237424-22209-1-git-send-email-andrea.adami@gmail.com>
On Sunday 01 April 2012 01:43:44 Andrea Adami wrote:
> * The rule only works for devices reporting ts pressure
> * and ignores the other touchscreens (happens e.g. on ipaq h1940).
> * a0,1,*18 a = absolute axes (ABS_X 0x00 ABS_Y 0x01 ABS_PRESSURE 0x18)
> * (see include/linux/input.h)
> *
> * Guidelines for touchscreen suggest only ABS_X and ABS_Y are mandatory
> * (http://kernel.org/doc/Documentation/input/event-codes.txt)
> *
> * Side-effect of the patch is to remove a dependency on meta-oe
> * but using older udev from oe-core.
>
> Signed-off-by: Andrea Adami <andrea.adami@gmail.com>
> ---
> recipes-core/udev/udev/local.rules | 34
> ++++++++++++++++++++++++++++++ recipes-core/udev/udev/touchscreen.rules |
> 21 ------------------ recipes-core/udev/udev_164.bbappend | 5 ++++
> recipes-core/udev/udev_173.bbappend | 5 ----
> 4 files changed, 39 insertions(+), 26 deletions(-)
> create mode 100644 recipes-core/udev/udev/local.rules
> delete mode 100644 recipes-core/udev/udev/touchscreen.rules
> create mode 100644 recipes-core/udev/udev_164.bbappend
> delete mode 100644 recipes-core/udev/udev_173.bbappend
>
> diff --git a/recipes-core/udev/udev/local.rules
> b/recipes-core/udev/udev/local.rules new file mode 100644
> index 0000000..49e8d28
> --- /dev/null
> +++ b/recipes-core/udev/udev/local.rules
> @@ -0,0 +1,34 @@
> +# There are a number of modifiers that are allowed to be used in some
> +# of the different fields. They provide the following subsitutions:
> +#
> +# %n the "kernel number" of the device.
> +# For example, 'sda3' has a "kernel number" of '3'
> +# %e the smallest number for that name which does not matches an existing
> node +# %k the kernel name for the device
> +# %M the kernel major number for the device
> +# %m the kernel minor number for the device
> +# %b the bus id for the device
> +# %c the string returned by the PROGRAM
> +# %s{filename} the content of a sysfs attribute
> +# %% the '%' char itself
> +#
> +
> +# Media automounting
> +SUBSYSTEM=="block", ACTION=="add" RUN+="/etc/udev/scripts/mount.sh"
> +SUBSYSTEM=="block", ACTION=="remove" RUN+="/etc/udev/scripts/mount.sh"
> +
> +# Handle network interface setup
> +SUBSYSTEM=="net", ACTION=="add" RUN+="/etc/udev/scripts/network.sh"
> +SUBSYSTEM=="net", ACTION=="remove" RUN+="/etc/udev/scripts/network.sh"
> +
> +# The first framebuffer is symlinked to /dev/fb
> +KERNEL=="fb0", SYMLINK+="fb"
> +
> +# The first rtc device is symlinked to /dev/rtc
> +KERNEL=="rtc0", SYMLINK+="rtc"
> +
> +# Try and modprobe for drivers for new hardware
> +ACTION=="add", DEVPATH=="/devices/*", ENV{MODALIAS}=="?*",
> RUN+="/sbin/modprobe $env{MODALIAS}" +
> +# Create a symlink to any touchscreen input device
> +SUBSYSTEM=="input", KERNEL=="event[0-9]*",
> ATTRS{modalias}=="input:*-e0*,3,*a0,1,*", SYMLINK+="input/touchscreen0"
> diff --git a/recipes-core/udev/udev/touchscreen.rules
> b/recipes-core/udev/udev/touchscreen.rules deleted file mode 100644
> index b2307cf..0000000
> --- a/recipes-core/udev/udev/touchscreen.rules
> +++ /dev/null
> @@ -1,21 +0,0 @@
> -# There are a number of modifiers that are allowed to be used in some
> -# of the different fields. They provide the following subsitutions:
> -#
> -# %n the "kernel number" of the device.
> -# For example, 'sda3' has a "kernel number" of '3'
> -# %e the smallest number for that name which does not matches an existing
> node -# %k the kernel name for the device
> -# %M the kernel major number for the device
> -# %m the kernel minor number for the device
> -# %b the bus id for the device
> -# %c the string returned by the PROGRAM
> -# %s{filename} the content of a sysfs attribute
> -# %% the '%' char itself
> -#
> -
> -# Create a symlink to any touchscreen input device
> -SUBSYSTEM=="input", KERNEL=="event[0-9]*",
> ATTRS{modalias}=="input:*-e0*,3,*a0,1,*18,*", SYMLINK+="input/touchscreen0"
> -SUBSYSTEM=="input", KERNEL=="event[0-9]*", ATTRS{modalias}=="ads7846",
> SYMLINK+="input/touchscreen0" -# This one is necessary for h1940
> -SUBSYSTEM=="input", KERNEL=="event[0-9]*",
> ATTRS{modalias}=="input:*-e0*,3,*a0,1,*", SYMLINK+="input/touchscreen0" -
> diff --git a/recipes-core/udev/udev_164.bbappend
> b/recipes-core/udev/udev_164.bbappend new file mode 100644
> index 0000000..4770c5b
> --- /dev/null
> +++ b/recipes-core/udev/udev_164.bbappend
> @@ -0,0 +1,5 @@
> +
> +FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
> +
> +PRINC = "1"
> +
> diff --git a/recipes-core/udev/udev_173.bbappend
> b/recipes-core/udev/udev_173.bbappend deleted file mode 100644
> index 4770c5b..0000000
> --- a/recipes-core/udev/udev_173.bbappend
> +++ /dev/null
> @@ -1,5 +0,0 @@
> -
> -FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
> -
> -PRINC = "1"
> -
Merged to meta-handheld (with some rebasing), thanks.
FWIW I'd like to see this more generalised rule in OE-Core, but as we're in
stabilisation at the moment I don't think now is the time. For the moment we
can test it in meta-handheld.
Cheers,
Paul
--
Paul Eggleton
Intel Open Source Technology Centre
prev parent reply other threads:[~2012-04-02 11:20 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-31 23:43 [meta-handheld][PATCH] udev: generalize the check in touchscreen rule Andrea Adami
2012-04-02 11:10 ` Paul Eggleton [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=3232177.RSLRf5oIft@helios \
--to=paul.eggleton@linux.intel.com \
--cc=andrea.adami@gmail.com \
--cc=openembedded-devel@lists.openembedded.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.