All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: Sebastian Reichel <sre@kernel.org>
Cc: Tony Lindgren <tony@atomide.com>,
	Rob Herring <robh+dt@kernel.org>,
	linux-input@vger.kernel.org, linux-omap@vger.kernel.org,
	devicetree@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCHv3 1/2] Input: pwm-vibra: new driver
Date: Wed, 10 May 2017 14:56:50 -0700	[thread overview]
Message-ID: <20170510215650.GA29507@dtor-ws> (raw)
In-Reply-To: <20170508185128.2vkgkxn6cfnmkqc7@earth>

On Mon, May 08, 2017 at 08:51:28PM +0200, Sebastian Reichel wrote:
> On Sun, May 07, 2017 at 02:38:00PM -0700, Dmitry Torokhov wrote:
> > > +static int __maybe_unused pwm_vibrator_suspend(struct device *dev)
> > > +{
> > > +	struct platform_device *pdev = to_platform_device(dev);
> > > +	struct pwm_vibrator *vibrator = platform_get_drvdata(pdev);
> > > +	struct input_dev *input = vibrator->input;
> > > +	unsigned long flags;
> > > +
> > > +	spin_lock_irqsave(&input->event_lock, flags);
> > 
> > Hmm, no, this is not goting to work. The original patch had a chance if
> > PWM was not sleeping, but with introduction of regulator and work this
> > definitely sleeps.
> 
> Actually PWM is sleeping, that's why I added work (regulator was
> added later) :)
> 
> > I think we should solve issue of events [not] being delivered during
> > suspend transition in input core, and simply drop spin_lock_irqsave()
> > here and in resume().
> 
> Sounds good. will you take care of the input-core change?

Yeah, I'll add it to my todo... In the mean time, when you sending a new
version of this driver simply drop
spin_lock_irqsave/spin_unlock_irqrestore.

Thanks.

-- 
Dmitry

  reply	other threads:[~2017-05-10 21:56 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-05  9:28 [PATCHv3 0/2] PWM Vibrator driver Sebastian Reichel
2017-05-05  9:28 ` Sebastian Reichel
2017-05-05  9:28 ` [PATCHv3 1/2] Input: pwm-vibra: new driver Sebastian Reichel
2017-05-07 21:38   ` Dmitry Torokhov
2017-05-08 18:51     ` Sebastian Reichel
2017-05-08 18:51       ` Sebastian Reichel
2017-05-10 21:56       ` Dmitry Torokhov [this message]
2017-05-08 17:31   ` Rob Herring
2017-05-08 18:38     ` Sebastian Reichel
2017-05-08 18:38       ` Sebastian Reichel
2017-05-05  9:28 ` [PATCHv3 2/2] ARM: dts: omap4-droid4: Add vibrator Sebastian Reichel

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=20170510215650.GA29507@dtor-ws \
    --to=dmitry.torokhov@gmail.com \
    --cc=devicetree@vger.kernel.org \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=robh+dt@kernel.org \
    --cc=sre@kernel.org \
    --cc=tony@atomide.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.