All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: Michael Grzeschik <mgr@pengutronix.de>
Cc: support.opensource@diasemi.com, kernel@pengutronix.de,
	linux-input@vger.kernel.org
Subject: Re: [PATCH v2] Input: da9052_tsi: remove unnecessary worker
Date: Fri, 6 Feb 2015 15:54:59 -0800	[thread overview]
Message-ID: <20150206235459.GA7927@dtor-ws> (raw)
In-Reply-To: <20150206234124.GF1139@pengutronix.de>

On Sat, Feb 07, 2015 at 12:41:24AM +0100, Michael Grzeschik wrote:
> On Fri, Feb 06, 2015 at 03:24:48PM -0800, Dmitry Torokhov wrote:
> > On Fri, Feb 06, 2015 at 12:05:48PM +0100, Michael Grzeschik wrote:
> > > With the datardy irq we get the information if the
> > > pen got pulled from the screen. This patch changes
> > > the irq by checking this condition every time instead
> > > of triggering the worker.
> > > 
> > > Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de>
> > > ---
> > > v1 -> v2: - removed adc_on variable
> > > 	  - added locking for irq switch
> > > 	  - event reporting in ts_read and irq switchover in datardy_irq
> > >  drivers/input/touchscreen/da9052_tsi.c | 119 +++++++++++++++++----------------
> > >  1 file changed, 62 insertions(+), 57 deletions(-)
> > > 
> > > diff --git a/drivers/input/touchscreen/da9052_tsi.c b/drivers/input/touchscreen/da9052_tsi.c
> > > index 5a013bb..c28cfee 100644
> > > --- a/drivers/input/touchscreen/da9052_tsi.c
> > > +++ b/drivers/input/touchscreen/da9052_tsi.c
> > > @@ -22,19 +22,24 @@
> > >  
> > >  #define TSI_PEN_DOWN_STATUS 0x40
> > >  
> > > +#define TSI_PEN_UP		1
> > > +
> > >  struct da9052_tsi {
> > >  	struct da9052 *da9052;
> > >  	struct input_dev *dev;
> > > -	struct delayed_work ts_pen_work;
> > >  	struct mutex mutex;
> > > +	spinlock_t *lock;
> > 
> > I am gonna go out on a limb and say that you did not test it.
> 
> I was testing exactly this. It seems i did miss that pointer and it
> still worked.

That makes me worried even more - that pointer should have been NULL and
you should have been getting very low address fault when you try to
spin_lock_init(NULL) - so what exactly have you tested?

Thanks.

-- 
Dmitry

      reply	other threads:[~2015-02-06 23:55 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-18 15:36 [PATCH] Input: da9052_tsi: remove unnecessary worker Michael Grzeschik
2015-01-20  7:21 ` Dmitry Torokhov
2015-01-20 11:04   ` Michael Grzeschik
2015-02-06 11:05 ` [PATCH v2] " Michael Grzeschik
2015-02-06 23:24   ` Dmitry Torokhov
2015-02-06 23:41     ` Michael Grzeschik
2015-02-06 23:54       ` 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=20150206235459.GA7927@dtor-ws \
    --to=dmitry.torokhov@gmail.com \
    --cc=kernel@pengutronix.de \
    --cc=linux-input@vger.kernel.org \
    --cc=mgr@pengutronix.de \
    --cc=support.opensource@diasemi.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.