linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Mark Brown <broonie@opensource.wolfsonmicro.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] input: add driver for pixcir i2c touchscreens
Date: Tue, 22 Feb 2011 17:31:12 -0800	[thread overview]
Message-ID: <20110223013111.GA23939@opensource.wolfsonmicro.com> (raw)
In-Reply-To: <f2894b.b085.12e500bb5f2.Coremail.jcbian@pixcir.com.cn>

On Wed, Feb 23, 2011 at 09:04:28AM +0800, jcbian wrote:
> > On Tue, Feb 22, 2011 at 11:17:01AM +0800, jcbian wrote:

> > If you can have a single global workqueue could you use the system one
> > and avoid having to create one at all?

> The system one is less efficient then the the creating one in my opioion,is it right?

Actually this is obsoleted by the comment below since you're using the
workqueue for interrupt handling only.

> > > + queue_work(pixcir_wq, &tsdata->work.work);

> > > + return IRQ_HANDLED;
> > > +}

> > Use a threaded IRQ handler - genirq can now implement this pattern for
> > you.

> I do not use genirq before, what the diffetence? Thanks!

genirq is the name of the standard kernel interrupt implementation.  If
you use a threaded IRQ handler using request_threaded_irq() then all the
workqueue stuff goes away.

> > > +static int pixcir_ts_open(struct input_dev *dev)
> > > +{
> > > + return 0;
> > > +}

> > You should have code to start the controller here, and matching shutdown
> > code in close().

> Yes normally should do like this,but this controller need any command to open,may be take come code
> to test the device working? 

If there's nothing at all to do I guess you can remove the code, though
at least disabling the IRQ while the device is closed would be nice.

> > > + dev_err(&tsdata->client->dev, "insmod successfully!\n");

> > No need for logs like this in production code, and the priority is all
> > wrong.

> I just want to show the correctly insmod.

It's not something that should be shown in production code.

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

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-22  3:17 [PATCH] input: add driver for pixcir i2c touchscreens jcbian
2011-02-22  3:48 ` Mark Brown
2011-02-23  1:04 ` jcbian
2011-02-23  1:31   ` Mark Brown [this message]
2011-02-23  1:47   ` 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=20110223013111.GA23939@opensource.wolfsonmicro.com \
    --to=broonie@opensource.wolfsonmicro.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).