Linux IIO development
 help / color / mirror / Atom feed
From: "Mårten Lindahl" <marten.lindahl@axis.com>
To: Jonathan Cameron <jic23@kernel.org>
Cc: "Lars-Peter Clausen" <lars@metafoo.de>,
	linux-iio@vger.kernel.org, kernel@axis.com,
	"Mårten Lindahl" <marten.lindahl@axis.com>
Subject: [PATCH] iio: light: vcnl4000: Don't create sysfs PM nodes for child
Date: Tue, 1 Nov 2022 13:21:51 +0100	[thread overview]
Message-ID: <20221101122151.221029-1-marten.lindahl@axis.com> (raw)

PM runtime is enabled for the parent i2c device, but it is disabled for
the iio child device and remains so in this driver. But as the child
sysfs PM directory is created by default by iio_device_register =>
cdev_device_add => dpm_sysfs_add it doesn't bring any value exposing it
since it won't give any usable data for the user.

Tell dpm_sysfs to not create the PM directory for the iio device.

Signed-off-by: Mårten Lindahl <marten.lindahl@axis.com>
---
 drivers/iio/light/vcnl4000.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/iio/light/vcnl4000.c b/drivers/iio/light/vcnl4000.c
index f6c83ecaad8b..400dc1155559 100644
--- a/drivers/iio/light/vcnl4000.c
+++ b/drivers/iio/light/vcnl4000.c
@@ -1072,6 +1072,7 @@ static int vcnl4000_probe(struct i2c_client *client,
 	if (ret < 0)
 		goto fail_poweroff;
 
+	device_set_pm_not_required(&indio_dev->dev);
 	ret = iio_device_register(indio_dev);
 	if (ret < 0)
 		goto fail_poweroff;
-- 
2.30.2


             reply	other threads:[~2022-11-01 12:22 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-01 12:21 Mårten Lindahl [this message]
2022-11-06 15:23 ` [PATCH] iio: light: vcnl4000: Don't create sysfs PM nodes for child Jonathan Cameron
2022-11-07  7:22   ` Marten Lindahl
2022-11-07 10:36   ` Sudeep Holla
2022-11-07 17:08     ` Jonathan Cameron
2022-11-07 17:14       ` Sudeep Holla

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=20221101122151.221029-1-marten.lindahl@axis.com \
    --to=marten.lindahl@axis.com \
    --cc=jic23@kernel.org \
    --cc=kernel@axis.com \
    --cc=lars@metafoo.de \
    --cc=linux-iio@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