linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: linux-input@vger.kernel.org, patches@opensource.wolfsonmicro.com
Subject: Re: [PATCH] Input: wm831x - Add driver for Wolfson WM831x PMIC touchscreen controllers
Date: Tue, 25 Jan 2011 11:51:09 -0800	[thread overview]
Message-ID: <20110125195109.GB19823@core.coreip.homeip.net> (raw)
In-Reply-To: <20110125195019.GA19823@core.coreip.homeip.net>

On Tue, Jan 25, 2011 at 11:50:19AM -0800, Dmitry Torokhov wrote:
> On Tue, Jan 25, 2011 at 07:34:23PM +0000, Mark Brown wrote:
> > On Tue, Jan 25, 2011 at 09:07:29AM -0800, Dmitry Torokhov wrote:
> > > On Tue, Jan 25, 2011 at 02:09:16PM +0000, Mark Brown wrote:
> > 
> > > > +	int data_irq;
> > > > +	int pd_irq;
> > 
> > > Maybe make irqs unsigned?
> > 
> > I guess.
> > 
> > > > +static void wm831x_ts_input_close(struct input_dev *idev)
> > > > +{
> > > > +	struct wm831x_ts *wm831x_ts = input_get_drvdata(idev);
> > > > +	struct wm831x *wm831x = wm831x_ts->wm831x;
> > > > +
> > > > +	wm831x_set_bits(wm831x, WM831X_TOUCH_CONTROL_1,
> > > > +			WM831X_TCH_ENA | WM831X_TCH_CVT_ENA |
> > > > +			WM831X_TCH_X_ENA | WM831X_TCH_Y_ENA |
> > > > +			WM831X_TCH_Z_ENA, 0);
> > > > +
> > > > +	if (wm831x_ts->pen_down)
> > > > +		disable_irq_nosync(wm831x_ts->data_irq);
> > 
> > > Why nosync?
> > 
> > Cut'n'paste from the pen up handling in the data IRQ (which obviously
> > does need to be nosync due to the fact that it runs from IRQ context).
> > 
> > > > +	input_dev = input_allocate_device();
> > 
> > > Are we 100% sure it is impossible for the 2 irqs above to fire up before
> > > we get here? Like if we happen to have hardware in half-active state
> > > while binding?
> > 
> > It's spectacularly unlikely - in the sort of hardware this device is
> > useful for nothing below Linux would realistically want to talk to the
> > touchscreen and since the IRQs are threaded they can't be shared.
> 
> Would you please move input allocation still - even if it works fine
> with your device the code might be used as an example by other
> authors... and there should be no penalties for your driver if you
> allocate just a tad earlier.
> 

Ah, you did already. Thank you.

-- 
Dmitry

  reply	other threads:[~2011-01-25 19:51 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-25 14:09 [PATCH] Input: wm831x - Add driver for Wolfson WM831x PMIC touchscreen controllers Mark Brown
2011-01-25 17:07 ` Dmitry Torokhov
2011-01-25 19:34   ` Mark Brown
2011-01-25 19:50     ` Dmitry Torokhov
2011-01-25 19:51       ` Dmitry Torokhov [this message]
  -- strict thread matches above, loose matches on Subject: below --
2011-01-25 19:46 Mark Brown

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=20110125195109.GB19823@core.coreip.homeip.net \
    --to=dmitry.torokhov@gmail.com \
    --cc=broonie@opensource.wolfsonmicro.com \
    --cc=linux-input@vger.kernel.org \
    --cc=patches@opensource.wolfsonmicro.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).