mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: <oskar.andero@sonyericsson.com>
To: anish kumar <anish198519851985@gmail.com>
Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>,
	"linux-input@vger.kernel.org" <linux-input@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"jic23@cam.ac.uk" <jic23@cam.ac.uk>,
	"aghayal@codeaurora.org" <aghayal@codeaurora.org>,
	"Cavin, Courtney" <Courtney.Cavin@sonyericsson.com>
Subject: Re: [PATCH v2] input: add driver support for Sharp gp2ap002a00f proximity sensor
Date: Wed, 16 Nov 2011 16:56:25 +0100	[thread overview]
Message-ID: <20111116155625.GB3375@caracas.corpusers.net> (raw)
In-Reply-To: <1321457952.1790.16.camel@anish-Inspiron-N5050>

> > > > +#ifdef CONFIG_PM_SLEEP
> > > > +static int gp2a_suspend(struct device *dev)
> > > > +{
> > > > +	struct i2c_client *client = to_i2c_client(dev);
> > > > +	struct gp2a_data *dt = i2c_get_clientdata(client);
> > > > +	int error;
> > > > +
> > > > +	if (device_may_wakeup(&client->dev)) {
> > > > +		enable_irq_wake(client->irq);
> > > > +	} else {
> > > 
> > > This needs locking WRT open/close. Please acquire dt->device->mutex and
> > > only disable if dt->device->users != 0. Similar shoudl be done for
> > > resume.
> > 
> > I see what you mean. I will fix it. 
> Is my understanding correct?You are going to disable the device 
> only when there are users of the driver and not disable the device
> otherwise.As anyway if there are no users the driver would have been
> already disabled right?

Please, see PATCH v3 for the answer to your question.

-Oskar

  reply	other threads:[~2011-11-16 15:55 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-14 15:39 oskar.andero
2011-11-14 17:03 ` Dmitry Torokhov
2011-11-15  7:34   ` oskar.andero
2011-11-16 15:39     ` anish kumar
2011-11-16 15:56       ` oskar.andero [this message]
2011-11-16 16:20         ` anish kumar
2011-11-16 16:50       ` Dmitry Torokhov
2011-11-15  7:56   ` oskar.andero
2011-11-15  8:29     ` Dmitry Torokhov
2011-11-15  8:34       ` Felipe Balbi
2011-11-15  8:46         ` Dmitry Torokhov
2011-11-15  8:47           ` Felipe Balbi
     [not found] ` <CAM=Q2cvH4gb5+=+ijE_d_ejoMCPikqd4g4uSw9T-z2yqDZCN+Q@mail.gmail.com>
2011-11-15  6:50   ` oskar.andero

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=20111116155625.GB3375@caracas.corpusers.net \
    --to=oskar.andero@sonyericsson.com \
    --cc=Courtney.Cavin@sonyericsson.com \
    --cc=aghayal@codeaurora.org \
    --cc=anish198519851985@gmail.com \
    --cc=dmitry.torokhov@gmail.com \
    --cc=jic23@cam.ac.uk \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@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

all inboxes | Powered by JetHome®