From: Andy Shevchenko <andriy.shevchenko@intel.com>
To: "Duje Mihanović" <duje@dujemihanovic.xyz>
Cc: "Jonathan Cameron" <jic23@kernel.org>,
"David Lechner" <dlechner@baylibre.com>,
"Nuno Sá" <nuno.sa@analog.com>,
"Andy Shevchenko" <andy@kernel.org>,
"Karel Balej" <balejk@matfyz.cz>, "Lee Jones" <lee@kernel.org>,
"Rob Herring" <robh@kernel.org>,
"Krzysztof Kozlowski" <krzk+dt@kernel.org>,
"Conor Dooley" <conor+dt@kernel.org>,
"David Wronek" <david@mainlining.org>,
phone-devel@vger.kernel.org,
~postmarketos/upstreaming@lists.sr.ht,
linux-kernel@vger.kernel.org, linux-iio@vger.kernel.org,
devicetree@vger.kernel.org
Subject: Re: [PATCH v2 2/3] iio: adc: Add driver for Marvell 88PM886 PMIC ADC
Date: Tue, 2 Sep 2025 12:50:05 +0300 [thread overview]
Message-ID: <aLa9zbls-Cl4PNQd@smile.fi.intel.com> (raw)
In-Reply-To: <3031049.e9J7NaK4W3@radijator>
On Mon, Sep 01, 2025 at 06:51:19PM +0200, Duje Mihanović wrote:
> On Monday, 1 September 2025 17:35:23 Central European Summer Time Andy Shevchenko wrote:
> > On Sun, Aug 31, 2025 at 12:33:05PM +0200, Duje Mihanović wrote:
...
> > > + .max_register = PM886_REG_GPADC_VBAT_SLP + 1,
> >
> > What is this + 1 register? Why is it not defined / documented?
>
> It is the second field of the vbat_slp channel.
Can you define it separately? Or define _MAX_REGISTER to be equal to that and
put a comment that _VBAT_SLP takes two (byte) offsets.
...
> > > +err:
> > > + gpadc_set_bias(gpadc, chan->channel, false);
> >
> > You do the same in the other branch and checking there for an error. Why this
> > one is so special?
>
> My rationale here was to not override the error from either the first
> gpadc_set_bias() call or the subsequent gpadc_find_bias_current() call.
Maybe this needs splitting / refactoring to call bias setting separately?
...
> > > + iio->dev.of_node = dev->parent->of_node;
> >
> > No, use device_set_node() with the respective parameters.
> >
> > But rather debug why firmware node (or OF in your case) is not propagated from
> > the parent device.
>
> I guess it is because the IIO device is registered as a child of the
> GPADC platform device, which does not have a node unlike the PMIC
> device (GPADC pdev's parent). It seems that the regulator cell
> registers its regulators directly under the PMIC dev, so maybe I should
> do the same here with the IIO dev?
Maybe. Not an expert in DT.
--
With Best Regards,
Andy Shevchenko
next prev parent reply other threads:[~2025-09-02 9:50 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-31 10:33 [PATCH v2 0/3] Marvell 88PM886 PMIC GPADC driver Duje Mihanović
2025-08-31 10:33 ` [PATCH v2 1/3] dt-bindings: mfd: 88pm886: Add #io-channel-cells Duje Mihanović
2025-08-31 16:49 ` Krzysztof Kozlowski
2025-08-31 18:40 ` Karel Balej
2025-08-31 10:33 ` [PATCH v2 2/3] iio: adc: Add driver for Marvell 88PM886 PMIC ADC Duje Mihanović
2025-08-31 19:24 ` Karel Balej
2025-08-31 20:19 ` Duje Mihanović
2025-09-01 12:43 ` Andy Shevchenko
2025-09-01 18:04 ` Jonathan Cameron
2025-09-01 15:35 ` Andy Shevchenko
2025-09-01 16:51 ` Duje Mihanović
2025-09-02 9:50 ` Andy Shevchenko [this message]
2025-09-01 18:18 ` Jonathan Cameron
2025-08-31 10:33 ` [PATCH v2 3/3] mfd: 88pm886: Add GPADC cell Duje Mihanović
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=aLa9zbls-Cl4PNQd@smile.fi.intel.com \
--to=andriy.shevchenko@intel.com \
--cc=andy@kernel.org \
--cc=balejk@matfyz.cz \
--cc=conor+dt@kernel.org \
--cc=david@mainlining.org \
--cc=devicetree@vger.kernel.org \
--cc=dlechner@baylibre.com \
--cc=duje@dujemihanovic.xyz \
--cc=jic23@kernel.org \
--cc=krzk+dt@kernel.org \
--cc=lee@kernel.org \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=nuno.sa@analog.com \
--cc=phone-devel@vger.kernel.org \
--cc=robh@kernel.org \
--cc=~postmarketos/upstreaming@lists.sr.ht \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.