public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
From: maxime.ripard@free-electrons.com (maxime.ripard at free-electrons.com)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 4/5] input: touchscreen: support Allwinner SoCs' touchscreen
Date: Mon, 25 Jul 2016 11:45:42 +0200	[thread overview]
Message-ID: <20160725094542.GI7419@lukather> (raw)
In-Reply-To: <20160721064140.GA17658@dtor-ws>

Hi Dmitry,

On Wed, Jul 20, 2016 at 11:41:40PM -0700, Dmitry Torokhov wrote:
> On Thu, Jul 21, 2016 at 08:29:50AM +0200, Maxime Ripard wrote:
> > On Wed, Jul 20, 2016 at 10:29:10AM +0200, Quentin Schulz wrote:
> > > +	irq = regmap_irq_get_virq(sunxi_gpadc_mfd_dev->regmap_irqc, irq);
> > > +	ret = devm_request_any_context_irq(&pdev->dev, irq,
> > > +					   sunxi_gpadc_tp_up_irq_handler, 0,
> > > +					   "tp_up", info);
> > > +	if (ret < 0) {
> > > +		dev_err(&pdev->dev,
> > > +			"could not request TP_UP_PENDING interrupt: %d\n", ret);
> > > +		goto err;
> > > +	}
> > 
> > You enable the interrupts...
> > 
> > > +	info->tp_up_irq = irq;
> > > +	disable_irq(irq);
> > > +
> > > +	ret = input_register_device(input);
> > > +	if (ret) {
> > > +		dev_err(&pdev->dev, "failed to register input device\n");
> > > +		goto err;
> > > +	}
> > 
> > ... but your driver isn't registered yet. How does input_report and
> > input_sync behave in such a case?
> 
> This is explicitly allowed:
> 
> "
> ...
>  * 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.
>  */
> "

Good to know. Still, it feels like it should be handled explicitly,
instead of relying on the fact that we only call input_event in our
handler and that it works that way.

Thanks,
Maxime

-- 
Maxime Ripard, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20160725/12bb33b2/attachment.sig>

  reply	other threads:[~2016-07-25  9:45 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-20  8:29 [PATCH 0/5] add resistive touchscreen support for new Allwinner SoCs' GPADC's driver Quentin Schulz
2016-07-20  8:29 ` [PATCH 1/5] mfd: sunxi-gpadc-mfd: add TP_UP_PENDING irq Quentin Schulz
2016-07-20  8:29 ` [PATCH 2/5] mfd: sunxi-gpadc-mfd: add buffer structure Quentin Schulz
2016-07-24 10:32   ` Jonathan Cameron
2016-07-20  8:29 ` [PATCH 3/5] iio: adc: sunxi-gpadc-iio: enable iio_buffers Quentin Schulz
2016-07-20  8:38   ` Peter Meerwald-Stadler
2016-07-20  8:57     ` Quentin Schulz
2016-07-24 11:03   ` Jonathan Cameron
2016-09-24 17:40     ` Quentin Schulz
2016-09-25  9:10       ` Jonathan Cameron
2016-09-25 19:57         ` Quentin Schulz
2016-09-27 19:38           ` Jonathan Cameron
2016-07-20  8:29 ` [PATCH 4/5] input: touchscreen: support Allwinner SoCs' touchscreen Quentin Schulz
2016-07-20 17:25   ` Dmitry Torokhov
2016-07-20 20:13     ` Jonathan Cameron
2016-09-24 18:26     ` Quentin Schulz
2016-09-24 18:39       ` Dmitry Torokhov
2016-07-21  6:29   ` Maxime Ripard
2016-07-21  6:41     ` Dmitry Torokhov
2016-07-25  9:45       ` maxime.ripard at free-electrons.com [this message]
2016-07-25 17:08         ` Dmitry Torokhov
2016-07-26 15:13           ` Maxime Ripard
2016-07-24 11:24   ` Jonathan Cameron
2016-09-25 19:44     ` Quentin Schulz
2016-09-27 19:59       ` Jonathan Cameron
2016-07-20  8:29 ` [PATCH 5/5] mfd: sunxi-gpadc-mfd: probe sunxi-gpadc-ts driver Quentin Schulz
2016-07-21  6:08   ` Maxime Ripard
2016-07-24 11:26     ` Jonathan Cameron
2016-07-25  9:51       ` Maxime Ripard
2016-07-25 10:08         ` Jonathan Cameron
2016-07-25 10:21       ` Lee Jones

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=20160725094542.GI7419@lukather \
    --to=maxime.ripard@free-electrons.com \
    --cc=linux-arm-kernel@lists.infradead.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