The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Trilok Soni <tsoni@codeaurora.org>
To: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: Tirupathi Reddy <tirupath@codeaurora.org>,
	bjorn.andersson@linaro.org, robh+dt@kernel.org,
	mark.rutland@arm.com, linux-input@vger.kernel.org,
	linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH V3] Input: pm8941-pwrkey: add resin key capabilities
Date: Fri, 23 Mar 2018 12:34:50 -0700	[thread overview]
Message-ID: <6928c292-b10b-3056-af02-f1ab70d8f494@codeaurora.org> (raw)
In-Reply-To: <20180323192210.GE255819@dtor-ws>

Hi Dmitry,

>>
>>
>> What happens if interrupts comes as soon as you have done the key_init(..)
>> here? I see that you are registering the input device after it, right? Looks
>> like you should do this at the end of probe?
> 
> It should be fine, input devices properly allocated (with
> input_allocate_device() or devm- version) are able to accept events even
> if input device has not been registered yet. It is and advertised
> feature:
> 
> drivers/input/input.c:
> 
> "
>   * input_event() - report new input event
> ...
>   * NOTE: input_event() may be safely used right after input device was
>   * allocated with input_allocate_device(), even before it is registered
>   * with input_register_device(), but the event will not reach any of the
>   * input handlers. Such early invocation of input_event() may be used
>   * to 'seed' initial state of a switch or initial position of absolute
>   * axis, etc.

Thanks. Looks good since input_allocate_device(...) is called before the 
init.

-- 
---Trilok Soni
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a 
Linux Foundation Collaborative Project

  reply	other threads:[~2018-03-23 19:34 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-23  6:23 [PATCH V3] Input: pm8941-pwrkey: add resin key capabilities Tirupathi Reddy
2018-03-23 19:14 ` Trilok Soni
2018-03-23 19:22   ` Dmitry Torokhov
2018-03-23 19:34     ` Trilok Soni [this message]
2018-03-26 22:24 ` Rob Herring
2018-05-05  0:10 ` Dmitry Torokhov
2018-05-07 18:46   ` Bjorn Andersson
2018-05-15 17:20     ` Dmitry Torokhov

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=6928c292-b10b-3056-af02-f1ab70d8f494@codeaurora.org \
    --to=tsoni@codeaurora.org \
    --cc=bjorn.andersson@linaro.org \
    --cc=devicetree@vger.kernel.org \
    --cc=dmitry.torokhov@gmail.com \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=robh+dt@kernel.org \
    --cc=tirupath@codeaurora.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox