public inbox for devicetree@vger.kernel.org
 help / color / mirror / Atom feed
From: Jonathan Cameron <Jonathan.Cameron@huawei.com>
To: "Sperling, Tobias" <Tobias.Sperling@Softing.com>
Cc: Jonathan Cameron <jic23@kernel.org>,
	Lars-Peter Clausen <lars@metafoo.de>,
	Rob Herring <robh@kernel.org>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	Conor Dooley <conor+dt@kernel.org>,
	"linux-iio@vger.kernel.org" <linux-iio@vger.kernel.org>,
	"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 2/2] iio: adc: Add driver for ADS7128 / ADS7138
Date: Thu, 6 Feb 2025 11:25:28 +0000	[thread overview]
Message-ID: <20250206112528.00005910@huawei.com> (raw)
In-Reply-To: <BE1P281MB2420B7C7A95A913B486A2228EFF42@BE1P281MB2420.DEUP281.PROD.OUTLOOK.COM>

On Tue, 4 Feb 2025 15:50:18 +0000
"Sperling, Tobias" <Tobias.Sperling@Softing.com> wrote:

> Just one more question, as I've received a mail from the kernel test robot.
> It reported two warnings regarding following unused functions
> ads71x8_runtime_suspend() and ads71x8_runtime_resume().
> I guess this is due PM not being used necessarily. So do I still have to use
> #ifdef CONFIG_PM or what did I miss there?
> 
> static int ads71x8_runtime_suspend(struct device *dev)
> {
>         struct iio_dev *indio_dev = dev_get_drvdata(dev);
>         struct ads71x8_data *data = iio_priv(indio_dev);
> 
>         return ads71x8_set_conv_mode(data, ADS71x8_MODE_MANUAL);
> }
> 
> static int ads71x8_runtime_resume(struct device *dev)
> {
>         struct iio_dev *indio_dev = dev_get_drvdata(dev);
>         struct ads71x8_data *data = iio_priv(indio_dev);
> 
>         return ads71x8_set_conv_mode(data, ADS71x8_MODE_AUTO);
> }
> 
> static const struct dev_pm_ops ads71x8_pm_ops = {
>         SET_RUNTIME_PM_OPS(ads71x8_runtime_suspend, ads71x8_runtime_resume, NULL)

Using SET_RUNTIME_PM_OPS() breaks the chain of references. Use
RUNTIME_PM_OPS() instead.


> };
> 
> ....
> 
> static struct i2c_driver ads71x8_driver = {
>         .driver = {
>                 .name = "ads7138",
>                 .of_match_table = ads71x8_of_match,
>                 .pm = pm_ptr(&ads71x8_pm_ops),

>         },
>         .id_table = ads71x8_device_ids,
>         .probe = ads71x8_probe,
> };
> module_i2c_driver(ads71x8_driver);
> 
>


  reply	other threads:[~2025-02-06 11:25 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-11-22 15:15 [PATCH 0/2] Support for TI ADS7128 and ADS7138 ADCs Tobias Sperling via B4 Relay
2024-11-22 15:15 ` [PATCH 1/2] dt-bindings: iio: adc: Introduce ADS7138 Tobias Sperling via B4 Relay
2024-11-23 16:53   ` Jonathan Cameron
2024-11-26  7:27   ` Krzysztof Kozlowski
2024-11-22 15:15 ` [PATCH 2/2] iio: adc: Add driver for ADS7128 / ADS7138 Tobias Sperling via B4 Relay
2024-11-24 12:42   ` Jonathan Cameron
2025-02-03 16:57     ` AW: " Sperling, Tobias
2025-02-04 14:43       ` Jonathan Cameron
2025-02-04 15:50         ` Sperling, Tobias
2025-02-06 11:25           ` Jonathan Cameron [this message]
2024-11-23 16:51 ` [PATCH 0/2] Support for TI ADS7128 and ADS7138 ADCs Krzysztof Kozlowski

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=20250206112528.00005910@huawei.com \
    --to=jonathan.cameron@huawei.com \
    --cc=Tobias.Sperling@Softing.com \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=jic23@kernel.org \
    --cc=krzk+dt@kernel.org \
    --cc=lars@metafoo.de \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=robh@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