From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: Christian Gmeiner <christian.gmeiner@gmail.com>
Cc: linux-input@vger.kernel.org
Subject: Re: [PATCH RFC] Input: Add Microchip AR1021 i2c touchscreen
Date: Fri, 31 Jan 2014 09:16:48 -0800 [thread overview]
Message-ID: <20140131171647.GB20872@core.coreip.homeip.net> (raw)
In-Reply-To: <20140131171521.GA20872@core.coreip.homeip.net>
On Fri, Jan 31, 2014 at 09:15:21AM -0800, Dmitry Torokhov wrote:
> Hi Chrisitian,
>
> On Fri, Jan 31, 2014 at 12:40:19PM +0100, Christian Gmeiner wrote:
> > >> --- /dev/null
> > >> +++ b/drivers/input/touchscreen/ar1021_i2c.c
> > >> @@ -0,0 +1,201 @@
> > >> +/*
> > >> + * Microchip AR1021 driver for I2C
> > >> + *
> > >> + * Author: Christian Gmeiner <christian.gmeiner@gmail.com>
> > >> + *
> > >> + * License: GPL as published by the FSF.
>
> By the way, you probably do not want GPL v1 to apply... Maybe say GPL v2
> or GPL v2 and later (depending on your preference and the license of the
> code you used as a base)?
>
> > >> +
> > >> +static int ar1021_i2c_resume(struct device *dev)
> > >> +{
> > >> + struct i2c_client *client = to_i2c_client(dev);
> > >> +
> > >> + enable_irq(client->irq);
> > >
> > > You do not want to enable IRQ if there are no users (nobody opened
> > > device).
> > >
> >
> > Okay.. but then I also do not need the disable_irq(..) call in
> > ar1021_i2c_suspend
> > and can totally remove the PM stuff - or?
>
> No, I think you still need the PM methods, you just need to check if
> device is opened (take dev->mutex, check dev->users) and decide if you
> need to enable/disable IRQ or not.
Hmm, on the other hand enable/disable does the counting for you so maybe
you should leave it all as it was.
--
Dmitry
next prev parent reply other threads:[~2014-01-31 17:16 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-30 9:29 [PATCH RFC] Input: Add Microchip AR1021 i2c touchscreen Christian Gmeiner
2014-01-31 1:01 ` Dmitry Torokhov
2014-01-31 11:40 ` Christian Gmeiner
2014-01-31 17:15 ` Dmitry Torokhov
2014-01-31 17:16 ` Dmitry Torokhov [this message]
2014-02-11 13:10 ` Christian Gmeiner
2014-02-11 16:34 ` Dmitry Torokhov
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=20140131171647.GB20872@core.coreip.homeip.net \
--to=dmitry.torokhov@gmail.com \
--cc=christian.gmeiner@gmail.com \
--cc=linux-input@vger.kernel.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;
as well as URLs for NNTP newsgroup(s).