Linux IIO development
 help / color / mirror / Atom feed
From: "Nuno Sá" <noname.nuno@gmail.com>
To: Krzysztof Kozlowski <krzk@kernel.org>,
	Lothar Rubusch <l.rubusch@gmail.com>
Cc: lars@metafoo.de, Michael.Hennerich@analog.com, jic23@kernel.org,
	 linux-iio@vger.kernel.org, eraretuya@gmail.com
Subject: Re: [PATCH 1/2] iio: adxl345: add spi-3wire
Date: Fri, 22 Mar 2024 07:58:36 +0100	[thread overview]
Message-ID: <8bfab6e0f3b5749a60ee66b488835e3b5d843f2f.camel@gmail.com> (raw)
In-Reply-To: <4a9c9108-9de0-4ff0-ad1e-1945b09f5388@kernel.org>

On Fri, 2024-03-22 at 06:37 +0100, Krzysztof Kozlowski wrote:
> On 22/03/2024 01:32, Lothar Rubusch wrote:
> > 
> > > > +
> > > >       /* Bail out if max_speed_hz exceeds 5 MHz */
> > > >       if (spi->max_speed_hz > ADXL345_MAX_SPI_FREQ_HZ)
> > > >               return dev_err_probe(&spi->dev, -EINVAL, "SPI CLK, %d Hz
> > > > exceeds 5 MHz\n",
> > > >                                    spi->max_speed_hz);
> > > > 
> > > >       regmap = devm_regmap_init_spi(spi, &adxl345_spi_regmap_config);
> > > > -     if (IS_ERR(regmap))
> > > > -             return dev_err_probe(&spi->dev, PTR_ERR(regmap), "Error
> > > > initializing regmap\n");
> > > > +     if (IS_ERR(regmap)) {
> > > > +             dev_err_probe(&spi->dev, PTR_ERR(regmap), "Error initializing
> > > > spi regmap: %ld\n",
> > > > +                           PTR_ERR(regmap));
> > > > +             return PTR_ERR(regmap);
> > > 
> > > Why are you changing correct code into incorrect?
> > 
> > I'll adjust that. It looks odd, I agree, but is this incorrect code? I found
> > similar code in the neighbor adxl313 accel driver. I may change/update
> > that then, too. Thank   you for the hints.
> 
> Please explain why you are doing this. How is this related to adding SPI
> 3-wire mode?
> 
> 

Yeah... Already asked to separate the refactor from the feature in two different
patches.

- Nuno Sá

  reply	other threads:[~2024-03-22  6:58 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-19 21:27 [PATCH 0/2] iio: adxl345: add spi-3wire and refac Lothar Rubusch
2024-03-19 21:27 ` [PATCH 1/2] iio: adxl345: add spi-3wire Lothar Rubusch
2024-03-20  9:37   ` Krzysztof Kozlowski
2024-03-22  0:32     ` Lothar Rubusch
2024-03-22  5:37       ` Krzysztof Kozlowski
2024-03-22  6:58         ` Nuno Sá [this message]
2024-03-24 13:14       ` Jonathan Cameron
2024-03-20 10:34   ` Nuno Sá
2024-03-22  0:33     ` Lothar Rubusch
2024-03-19 21:27 ` [PATCH 2/2] iio: adxl345: update documentation for spi-3wire Lothar Rubusch
2024-03-20  9:34   ` Krzysztof Kozlowski
2024-03-22  0:27     ` Lothar Rubusch
2024-03-22  5:36       ` 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=8bfab6e0f3b5749a60ee66b488835e3b5d843f2f.camel@gmail.com \
    --to=noname.nuno@gmail.com \
    --cc=Michael.Hennerich@analog.com \
    --cc=eraretuya@gmail.com \
    --cc=jic23@kernel.org \
    --cc=krzk@kernel.org \
    --cc=l.rubusch@gmail.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