devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Petre Rodan <petre.rodan@subdimension.ro>
To: Krzysztof Kozlowski <krzk@kernel.org>
Cc: Jonathan Cameron <jic23@kernel.org>,
	David Lechner <dlechner@baylibre.com>,
	Nuno S?? <nuno.sa@analog.com>, Andy Shevchenko <andy@kernel.org>,
	Rob Herring <robh@kernel.org>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	Conor Dooley <conor+dt@kernel.org>,
	Jonathan Cameron <Jonathan.Cameron@huawei.com>,
	linux-iio@vger.kernel.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 07/14] iio: accel: bma220: reset registers during init stage
Date: Thu, 11 Sep 2025 15:36:40 +0300	[thread overview]
Message-ID: <aMLCWFatVkePTxCa@sunspire> (raw)
In-Reply-To: <a10a2f6d-6cb7-4922-b505-dc6994f0415f@kernel.org>

[-- Attachment #1: Type: text/plain, Size: 2118 bytes --]


Hi Krzysztof,

On Thu, Sep 11, 2025 at 09:35:52AM +0200, Krzysztof Kozlowski wrote:
> On 10/09/2025 09:57, Petre Rodan wrote:
> > Bring all configuration registers to default values during device probe().
> > 
> > Signed-off-by: Petre Rodan <petre.rodan@subdimension.ro>
> > ---
> >  drivers/iio/accel/bma220_core.c | 71 ++++++++++++++++++++++++++++-------------
> >  1 file changed, 49 insertions(+), 22 deletions(-)
> > 
> > diff --git a/drivers/iio/accel/bma220_core.c b/drivers/iio/accel/bma220_core.c
> > index b6f1374a9cca52966c1055113710061a7284cf5a..322df516c90a7c645eeca579cae9803eb31caad1 100644
> > --- a/drivers/iio/accel/bma220_core.c
> > -static int bma220_init(struct spi_device *spi)
> > +static int bma220_reset(struct spi_device *spi, bool up)
> >  {
> > -	int ret;
> > -	static const char * const regulator_names[] = { "vddd", "vddio", "vdda" };
> > +	int i, ret;
> >  
> > -	ret = devm_regulator_bulk_get_enable(&spi->dev,
> 
> 
> You just added this code in patch 6. Don't add code which immediately
> you remove. I understand you re-add this later, so basically it is a
> move, but such patch diff is still confusing.

sorry, but this is an artefact of 'git diff' I don't think I have no control of.

the bma220_reset() function was added to bma220_core.c with this patch and the
diff process merged lines from this new function with lines from bma220_init()
causing the apparent removal of the lines added in the previous patch.
if you look a few lines below your cut, the bma220_init() function contains the
code:

+static int bma220_init(struct spi_device *spi)
+{
+	int ret;
+	static const char * const regulator_names[] = { "vddd", "vddio", "vdda" };
+
+	ret = devm_regulator_bulk_get_enable(&spi->dev,
+					     ARRAY_SIZE(regulator_names),
+					     regulator_names);
+	if (ret)
+		return dev_err_probe(&spi->dev, ret, "Failed to get regulators\n");
[..]

Just for my curiosity, do reviewers apply the patches one by one to (a branch of)
the tree itself or do they provide feedback directly based on the diffs?

best regards,
peter

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

  reply	other threads:[~2025-09-11 12:36 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-09-10  7:57 [PATCH v2 00/14] iio: accel: bma220 improvements Petre Rodan
2025-09-10  7:57 ` [PATCH v2 01/14] dt-bindings: iio: accel: bosch,bma220 cleanup typo Petre Rodan
2025-09-11  7:31   ` Krzysztof Kozlowski
2025-09-10  7:57 ` [PATCH v2 02/14] dt-bindings: iio: accel: bosch,bma220 setup SPI clock mode Petre Rodan
2025-09-10 17:48   ` Jonathan Cameron
2025-09-11  7:31   ` Krzysztof Kozlowski
2025-09-10  7:57 ` [PATCH v2 03/14] dt-bindings: iio: accel: bosch,bma220 change irq type Petre Rodan
2025-09-11  7:33   ` Krzysztof Kozlowski
2025-09-11  9:53     ` Petre Rodan
2025-09-10  7:57 ` [PATCH v2 04/14] iio: accel: bma220: split original driver Petre Rodan
2025-09-10 17:56   ` Jonathan Cameron
2025-09-11 19:01   ` David Lechner
2025-09-10  7:57 ` [PATCH v2 05/14] iio: accel: bma220: add open firmware table Petre Rodan
2025-09-10  7:57 ` [PATCH v2 06/14] iio: accel: bma220: add get regulator check Petre Rodan
2025-09-10 17:58   ` Jonathan Cameron
2025-09-10 18:51     ` Petre Rodan
2025-09-10 20:28       ` Andy Shevchenko
2025-09-10  7:57 ` [PATCH v2 07/14] iio: accel: bma220: reset registers during init stage Petre Rodan
2025-09-10 18:01   ` Jonathan Cameron
2025-09-11  7:35   ` Krzysztof Kozlowski
2025-09-11 12:36     ` Petre Rodan [this message]
2025-09-11 13:07       ` Krzysztof Kozlowski
2025-09-11 13:52         ` Petre Rodan
2025-09-11 13:59           ` Andy Shevchenko
2025-09-11 13:44       ` David Lechner
2025-09-12 14:24         ` Jonathan Cameron
2025-09-11 19:14   ` David Lechner
2025-09-10  7:57 ` [PATCH v2 08/14] iio: accel: bma220: migrate to regmap API Petre Rodan
2025-09-10 18:12   ` Jonathan Cameron
2025-09-12 14:54     ` Petre Rodan
2025-09-13 12:22       ` Jonathan Cameron
2025-09-10  7:57 ` [PATCH v2 09/14] iio: accel: bma220: add i2c module Petre Rodan
2025-09-11 19:23   ` David Lechner
2025-09-10  7:57 ` [PATCH v2 10/14] iio: accel: bma220: add i2c watchdog feature Petre Rodan
2025-09-10  7:57 ` [PATCH v2 11/14] iio: accel: bma220: add interrupt trigger Petre Rodan
2025-09-10 18:15   ` Jonathan Cameron
2025-09-10  7:57 ` [PATCH v2 12/14] iio: accel: bma220: add LPF cut-off frequency mapping Petre Rodan
2025-09-10 18:16   ` Jonathan Cameron
2025-09-10  7:57 ` [PATCH v2 13/14] iio: accel: bma220: add debugfs reg access Petre Rodan
2025-09-10  7:57 ` [PATCH v2 14/14] iio: accel: bma220: add maintainer Petre Rodan
2025-09-10 18:18 ` [PATCH v2 00/14] iio: accel: bma220 improvements Jonathan Cameron

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=aMLCWFatVkePTxCa@sunspire \
    --to=petre.rodan@subdimension.ro \
    --cc=Jonathan.Cameron@huawei.com \
    --cc=andy@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=dlechner@baylibre.com \
    --cc=jic23@kernel.org \
    --cc=krzk+dt@kernel.org \
    --cc=krzk@kernel.org \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nuno.sa@analog.com \
    --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;
as well as URLs for NNTP newsgroup(s).