public inbox for devicetree@vger.kernel.org
 help / color / mirror / Atom feed
From: Jonathan Cameron <jic23@kernel.org>
To: Andreas Klinger <ak@it-klinger.de>
Cc: robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org,
	lars@metafoo.de, linux-iio@vger.kernel.org,
	devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
	javier.carrasco.cruz@gmail.com, mazziesaccount@gmail.com,
	subhajit.ghosh@tweaklogic.com, muditsharma.info@gmail.com,
	arthur.becker@sentec.com, ivan.orlov0322@gmail.com
Subject: Re: [PATCH 2/3] iio: light: add support for veml6046x00 RGBIR color sensor
Date: Sun, 23 Mar 2025 11:51:29 +0000	[thread overview]
Message-ID: <20250323115129.665457c0@jic23-huawei> (raw)
In-Reply-To: <Z9jXLYYbY7nKDwA-@mail.your-server.de>

> > > +	data = iio_priv(iio);
> > > +	i2c_set_clientdata(i2c, iio);
> > > +	data->dev = dev;
> > > +	data->regmap = regmap;
> > > +
> > > +	ret = veml6046x00_regfield_init(data);
> > > +	if (ret)
> > > +		return dev_err_probe(dev, ret, "Failed to init regfield\n");
> > > +
> > > +	ret = devm_regulator_get_enable(dev, "vdd");
> > > +	if (ret)
> > > +		return dev_err_probe(dev, ret, "Failed to enable regulator\n");
> > > +
> > > +	ret = devm_add_action_or_reset(dev, veml6046x00_shutdown_action, data);  
> > 
> > Mostly we want a devm action to match against a specific setup operation.  Here is
> > it that the device comes up in non shut down state?  Perhaps a comment to
> > make it clear.  Also, how do we know it's in a good state rather than part
> > configured by someone else?  I'm not seeing a reset sequence though perhaps
> > that effectively happens in setup_device()  
> 
> In veml6046x00_setup_device() all registers are set up to bring the device in a
> known state. This function also switches the device on. I could move the call to
> setup_device() up to here and add a comment to make it clear.

Perfect.


  reply	other threads:[~2025-03-23 11:51 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-16 11:31 [PATCH 0/3] iio:light: add driver for veml6046x00 RGBIR color sensor Andreas Klinger
2025-03-16 11:31 ` [PATCH 1/3] dt-bindings: iio: light: veml6046x00: add " Andreas Klinger
2025-03-16 12:19   ` Rob Herring (Arm)
2025-03-17 11:00   ` Jonathan Cameron
2025-03-17 11:17     ` Andreas Klinger
2025-03-17 11:26       ` Krzysztof Kozlowski
2025-03-16 11:31 ` [PATCH 2/3] iio: light: add support for veml6046x00 RGBIR " Andreas Klinger
2025-03-17 11:50   ` Jonathan Cameron
2025-03-18  2:15     ` Andreas Klinger
2025-03-23 11:51       ` Jonathan Cameron [this message]
2025-04-06  8:43     ` Andreas Klinger
2025-04-06 11:08       ` Jonathan Cameron
2025-04-07  5:52         ` Matti Vaittinen
2025-05-05 19:10           ` Andreas Klinger
2025-05-06  6:03             ` Matti Vaittinen
2025-05-06  8:28               ` Andreas Klinger
2025-05-06  9:17                 ` Matti Vaittinen
2025-03-16 11:31 ` [PATCH 3/3] MAINTAINER: add maintainer for veml6046x00 Andreas Klinger

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=20250323115129.665457c0@jic23-huawei \
    --to=jic23@kernel.org \
    --cc=ak@it-klinger.de \
    --cc=arthur.becker@sentec.com \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=ivan.orlov0322@gmail.com \
    --cc=javier.carrasco.cruz@gmail.com \
    --cc=krzk+dt@kernel.org \
    --cc=lars@metafoo.de \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mazziesaccount@gmail.com \
    --cc=muditsharma.info@gmail.com \
    --cc=robh@kernel.org \
    --cc=subhajit.ghosh@tweaklogic.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox