linux-iio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Maxim Kochetkov <fido_max@inbox.ru>
Cc: bigunclemax@gmail.com, Jonathan Cameron <jic23@kernel.org>,
	Hartmut Knaack <knaack.h@gmx.de>,
	Lars-Peter Clausen <lars@metafoo.de>,
	Peter Meerwald-Stadler <pmeerw@pmeerw.net>,
	linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] iio: adc: ti-ads1015: fix conversion when CONFIG_PM is not set
Date: Wed, 29 Jul 2020 11:34:19 +0300	[thread overview]
Message-ID: <20200729083419.GM3703480@smile.fi.intel.com> (raw)
In-Reply-To: <5bfad7df-ee64-f94a-003b-06320b9fad0f@inbox.ru>

On Wed, Jul 29, 2020 at 11:26:51AM +0300, Maxim Kochetkov wrote:
> In case of CONFIG_PM is not set:
> 
> static inline int __pm_runtime_suspend(struct device *dev, int rpmflags)
> {
> 	return -ENOSYS;
> }
> 
> and ads1015_read_raw failed at:
> 
> 		ret = ads1015_set_power_state(data, false);
> 		if (ret < 0)
> 			goto release_direct;
> 

I see. Please, elaborate all this in the commit message for v2.

P.S. Avoid top postings!

> 29.07.2020 11:21, Andy Shevchenko wrote:
> > On Wed, Jul 29, 2020 at 10:59:07AM +0300, Maxim Kochetkov wrote:
> > > To stop conversion ads1015_set_power_state function use unimplemented
> > > function pm_runtime_put_autosuspend if CONFIG_PM is not set.
> > > If CONFIG_PM is disabled, there is no need to start/stop conversion.
> > > Fix it by adding return 0 function variant if CONFIG_PM is not set.
> > 
> > I'm wondering if you check the real code (assembly) for any difference.
> > 
> > All calls AFAICS are statically defined in !CONFIG_PM case and compiler/linker
> > should be clever enough to drop this completely. Isn't it the case?
> > 

-- 
With Best Regards,
Andy Shevchenko



      reply	other threads:[~2020-07-29  8:34 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-29  7:59 [PATCH] iio: adc: ti-ads1015: fix conversion when CONFIG_PM is not set Maxim Kochetkov
2020-07-29  8:21 ` Andy Shevchenko
2020-07-29  8:26   ` Maxim Kochetkov
2020-07-29  8:34     ` Andy Shevchenko [this message]

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=20200729083419.GM3703480@smile.fi.intel.com \
    --to=andriy.shevchenko@linux.intel.com \
    --cc=bigunclemax@gmail.com \
    --cc=fido_max@inbox.ru \
    --cc=jic23@kernel.org \
    --cc=knaack.h@gmx.de \
    --cc=lars@metafoo.de \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pmeerw@pmeerw.net \
    /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).