Linux Input Archive on lore.kernel.org
 help / color / Atom feed
From: Marco Felsch <m.felsch@pengutronix.de>
To: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: devicetree@vger.kernel.org, alexandre.belloni@bootlin.com,
	simon.budig@kernelconcepts.de, mripard@kernel.org,
	bparrot@ti.com, hdegoede@redhat.com, andy.shevchenko@gmail.com,
	robh+dt@kernel.org, kernel@pengutronix.de,
	linux-input@vger.kernel.org, andriy.shevchenko@linux.intel.com,
	shawnguo@kernel.org, fcooper@ti.com
Subject: Re: [PATCH v3 6/6] Input: edt-ft5x06 - improve power management operations
Date: Thu, 16 Jan 2020 14:32:19 +0100
Message-ID: <20200116133219.xtp3wkkcefbcumca@pengutronix.de> (raw)
In-Reply-To: <20200110071847.h5hqfb7ujnahuuus@pengutronix.de>

Hi Dmitry,

On 20-01-10 08:18, Marco Felsch wrote:
> On 20-01-10 08:16, Marco Felsch wrote:
> > Hi Dmitry,
> > 
> > On 20-01-09 17:09, Dmitry Torokhov wrote:
> > > Hi Marco,
> > > 
> > > On Wed, Jan 08, 2020 at 12:10:50PM +0100, Marco Felsch wrote:
> > > > +static int __maybe_unused edt_ft5x06_ts_resume(struct device *dev)
> > > > +{
> > > > +	struct i2c_client *client = to_i2c_client(dev);
> > > > +	struct edt_ft5x06_ts_data *tsdata = i2c_get_clientdata(client);
> > > > +	int ret;
> > > > +
> > > > +	if (device_may_wakeup(dev))
> > > > +		return 0;
> > > > +
> > > > +	ret = regulator_enable(tsdata->vcc);
> > > > +	if (ret)
> > > > +		dev_warn(dev, "Failed to enable vcc\n");
> > > 
> > > I wonder if we should not return error here instead of continuing. If
> > > device is not powered up properly we'll have hard time communicating
> > > with it.
> > 
> > That's a reasonable point.
> > 
> > > The same is for suspend: maybe we should abort if we can't switch off
> > > regulator or write to the device.
> > 
> > I have no strong opinion about that case but IMHO it's okay to go further
> > if we can't switch it off. Instead we should print a warning.
> 
> I just noticed that we do that already.. So the suspend case should be
> okay.


Is it okay to check the return val for the resume case only? I want to
prepare a v4 of this patch to get this done.

Regards,
  Marco

> 
> > Regards,
> >   Marco
> > 
> > > Thanks.
> > > 
> > > -- 
> > > Dmitry
> > > 
> 
> 

-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

      reply index

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-08 11:10 [PATCH v3 0/6] EDT-FT5x06 improvements Marco Felsch
2020-01-08 11:10 ` [PATCH v3 1/6] Input: edt-ft5x06: work around first register access error Marco Felsch
2020-01-10  1:06   ` Dmitry Torokhov
2020-01-08 11:10 ` [PATCH v3 2/6] Input: edt-ft5x06 - alphabetical include reorder Marco Felsch
2020-01-10  1:06   ` Dmitry Torokhov
2020-01-08 11:10 ` [PATCH v3 3/6] dt-bindings: Input: edt-ft5x06 - document wakeup-source capability Marco Felsch
2020-01-10  1:07   ` Dmitry Torokhov
2020-01-08 11:10 ` [PATCH v3 4/6] Input: edt-ft5x06 - make wakeup-source switchable Marco Felsch
2020-01-10  1:07   ` Dmitry Torokhov
2020-01-08 11:10 ` [PATCH v3 5/6] Input: edt-ft5x06 - use pm core to enable/disable the wake irq Marco Felsch
2020-01-10  1:07   ` Dmitry Torokhov
2020-01-08 11:10 ` [PATCH v3 6/6] Input: edt-ft5x06 - improve power management operations Marco Felsch
2020-01-10  1:09   ` Dmitry Torokhov
2020-01-10  7:16     ` Marco Felsch
2020-01-10  7:18       ` Marco Felsch
2020-01-16 13:32         ` Marco Felsch [this message]

Reply instructions:

You may reply publically 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=20200116133219.xtp3wkkcefbcumca@pengutronix.de \
    --to=m.felsch@pengutronix.de \
    --cc=alexandre.belloni@bootlin.com \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=andy.shevchenko@gmail.com \
    --cc=bparrot@ti.com \
    --cc=devicetree@vger.kernel.org \
    --cc=dmitry.torokhov@gmail.com \
    --cc=fcooper@ti.com \
    --cc=hdegoede@redhat.com \
    --cc=kernel@pengutronix.de \
    --cc=linux-input@vger.kernel.org \
    --cc=mripard@kernel.org \
    --cc=robh+dt@kernel.org \
    --cc=shawnguo@kernel.org \
    --cc=simon.budig@kernelconcepts.de \
    /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

Linux Input Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-input/0 linux-input/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-input linux-input/ https://lore.kernel.org/linux-input \
		linux-input@vger.kernel.org
	public-inbox-index linux-input

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-input


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git