All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: Aniroop Mathur <a.mathur@samsung.com>
Cc: linux-input@vger.kernel.org, cpgs@samsung.com,
	a.anurag@samsung.com, naveen.sel@samsung.com,
	aniroop.mathur@gmail.com, vikas.kala@samsung.com,
	narendra.m1@samsung.com, poorva.s@samsung.com
Subject: Re: [PATCH] Introduce Naming Convention in Input Subsystem
Date: Wed, 8 Jan 2014 22:52:59 -0800	[thread overview]
Message-ID: <20140109065259.GB29893@core.coreip.homeip.net> (raw)
In-Reply-To: <1389243476-11196-1-git-send-email-a.mathur@samsung.com>

Hi Aniroop,

On Thu, Jan 09, 2014 at 10:27:56AM +0530, Aniroop Mathur wrote:
> This patch allows user(driver) to set sysfs node name of input
> devices.  To set sysfs node name, user(driver) just needs to set
> node_name_unique variable.  If node_name_unique is not set, default
> name is given(as before).  So, this patch is completely
> backward-compatible.
> 
> Sysfs Input node name format is: input_<name>
> Sysfs Event node name format is: event_<name>
>
> This "name" is given by user and automatically, prefix(input and
> event) is added by input core.
> 
> This name must be unique among all input devices and driver(user) has
> the responsibility to ensure it.  If same name is used again for other
> input device, registration of that input device will fail because two
> input devices cannot have same name.
> 
> Advantages of this patch are:
> 
> 1. Reduces Booting Time of HAL/Upper-Layer because now HAL or
> Upper-Layer do not need to search input/event number corresponding to
> each input device in /dev/input/...  This searching in /dev/input/ was
> taking too much time.  (Especially in mobile devices, where there are
> many input devices (many sensors, touchscreen, etc), it reduces a lot
> of booting time)

I am sorry, how much time does it take to scan a directory of what, 20
devices? If it such a factor have udev create nodes that are easier for
you to locate, similarly how we already create nodes by-id and by-path.
For example you can encode major:minor in device name.

> 
> 2. Improves Readabilty of input and event sysfs node paths because
> names are used instead of numbers.

I do not see why it is that important. If one wants overview
/proc/bus/input/devices gives nice picture.

> 
> 3. Removes Input Devices Dependency. If one input device probe fails,
> other input devices still work.  Before this patch, if one input
> device probe fails before input_register_device, then input number of
> other input devices changes and due to this permission settings are
> disturbed and hence HAL or upper layer cannot open the required sysfs
> node because permission denied error comes.

I have only one suggestion here: fix your userspace so that does not
depend on device initialization ordering.

IOW I am totally unconvinced that this facility is needed.

Thanks.

-- 
Dmitry

      reply	other threads:[~2014-01-09  6:53 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-09  4:57 [PATCH] Introduce Naming Convention in Input Subsystem Aniroop Mathur
2014-01-09  6:52 ` Dmitry Torokhov [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=20140109065259.GB29893@core.coreip.homeip.net \
    --to=dmitry.torokhov@gmail.com \
    --cc=a.anurag@samsung.com \
    --cc=a.mathur@samsung.com \
    --cc=aniroop.mathur@gmail.com \
    --cc=cpgs@samsung.com \
    --cc=linux-input@vger.kernel.org \
    --cc=narendra.m1@samsung.com \
    --cc=naveen.sel@samsung.com \
    --cc=poorva.s@samsung.com \
    --cc=vikas.kala@samsung.com \
    /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.