linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: jcbian <jcbian@pixcir.com.cn>
Cc: linux-input@vger.kernel.org, dqmeng <dqmeng@pixcir.com.cn>,
	zlchen <zlchen@pixcir.com.cn>
Subject: Re: [PATCH v2] input: add driver for pixcir i2c touchscreens
Date: Tue, 22 Feb 2011 17:36:39 -0800	[thread overview]
Message-ID: <20110223013639.GA891@core.coreip.homeip.net> (raw)
In-Reply-To: <1c85eba.b1cd.12e501cebb7.Coremail.jcbian@pixcir.com.cn>

On Wed, Feb 23, 2011 at 09:23:16AM +0800, jcbian wrote:
> > > +
> > > +static int pixcir_i2c_ts_remove(struct i2c_client *client)
> > > +{
> > > +	struct pixcir_i2c_ts_data *tsdata = dev_get_drvdata(&client->dev);
> > 
> > i2c_get_clientdata(). Also empty line between variable definitions and
> > code.
> > 
> Sorry,what's the meaning here?

1. Use i2c_get_clientdata() instead of dev_get_drvdata() to access
driver-private data

2. Add an empty line between variable definitions and the rest of the
code.

> > > +
> > > +	pixcir_wq = create_singlethread_workqueue("pixcir_wq");
> > 
> > Not needed if you use threaded IRQ.
> > 
> You mean the threaded IRQ is better than workqueue? If using the threaded IRQ should remove the request_irq()?   
> 

You request your IRQ to be serviced by a special thread by doing
request_threaded_irq(). Since interrupt processing will happen in a
thread you will be able to use sleeping functions directly in your
interrupt handler and won't need to rely on a separate workqueue
(and do not need to concern yourself with canceling/shutting down the
workqeue upon driver unload - which you did not do anyway ;) ).

Thanks.

-- 
Dmitry

  reply	other threads:[~2011-02-23  1:36 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-22  3:38 [PATCH v2] input: add driver for pixcir i2c touchscreens 卞建春
2011-02-22  5:40 ` Dmitry Torokhov
2011-02-22  8:15 ` Henrik Rydberg
2011-02-23  1:23 ` jcbian
2011-02-23  1:36   ` Dmitry Torokhov [this message]
2011-02-23  1:28 ` jcbian

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=20110223013639.GA891@core.coreip.homeip.net \
    --to=dmitry.torokhov@gmail.com \
    --cc=dqmeng@pixcir.com.cn \
    --cc=jcbian@pixcir.com.cn \
    --cc=linux-input@vger.kernel.org \
    --cc=zlchen@pixcir.com.cn \
    /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).