Linux-IIO Archive mirror
 help / color / mirror / Atom feed
From: Jonathan Cameron <jic23@kernel.org>
To: David Lechner <dlechner@baylibre.com>
Cc: "Barnabás Czémán" <trabarni@gmail.com>,
	"Lars-Peter Clausen" <lars@metafoo.de>,
	"Rob Herring" <robh@kernel.org>,
	"Krzysztof Kozlowski" <krzk+dt@kernel.org>,
	"Conor Dooley" <conor+dt@kernel.org>,
	linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org,
	devicetree@vger.kernel.org,
	"Danila Tikhonov" <danila@jiaxyga.com>
Subject: Re: [PATCH v2 1/2] iio: imu: bmi160: add support for bmi120
Date: Sat, 11 May 2024 12:59:10 +0100	[thread overview]
Message-ID: <20240511125910.18e874cf@jic23-huawei> (raw)
In-Reply-To: <20240511125436.520e3ff4@jic23-huawei>


> >   
> > > +       }
> > > +
> > > +       return -ENODEV;
> > > +}
> > > +
> > >  static int bmi160_chip_init(struct bmi160_data *data, bool use_spi)
> > >  {
> > >         int ret;
> > > @@ -737,12 +753,10 @@ static int bmi160_chip_init(struct bmi160_data *data, bool use_spi)
> > >                 dev_err(dev, "Error reading chip id\n");
> > >                 goto disable_regulator;
> > >         }
> > > -       if (val != BMI160_CHIP_ID_VAL) {
> > > -               dev_err(dev, "Wrong chip id, got %x expected %x\n",
> > > -                       val, BMI160_CHIP_ID_VAL);
> > > -               ret = -ENODEV;
> > > -               goto disable_regulator;
> > > -       }
> > > +
> > > +       ret = bmi160_check_chip_id(val);
> > > +       if (ret)
> > > +               dev_warn(dev, "Chip id not found: %x\n", val);    
> > 
> > This changes the error with probe failure to a warning, but the commit
> > message doesn't explain why. We always want to know why changes were
> > made. :-)
> > 
> > Should also probably be in a separate patch since changing the
> > behavior here is a separate change from adding support for a new chip.  
> True, separate patch would be ideal as maybe someone will backport this change and
> not the rest.

Given I'd already picked up v3, I added a note on this to the commit rather
than splitting it.

I doubt anyone will care about dragging in bmi120 IDs along with the relaxation
of matching if they just want the relaxation.

Jonathan

> >   
> > >
> > >         ret = bmi160_set_mode(data, BMI160_ACCEL, true);
> > >         if (ret)    
> > 
> > ...  
> 
> 


  reply	other threads:[~2024-05-11 11:59 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-04 12:59 [PATCH v2 0/2] Add support for bosch bmi120 Barnabás Czémán
2024-05-04 12:59 ` [PATCH v2 1/2] iio: imu: bmi160: add support for bmi120 Barnabás Czémán
2024-05-07 22:05   ` David Lechner
2024-05-11 11:54     ` Jonathan Cameron
2024-05-11 11:59       ` Jonathan Cameron [this message]
2024-05-04 12:59 ` [PATCH v2 2/2] dt-bindings: iio: imu: bmi160: add bmi120 Barnabás Czémán
2024-05-07 15:32   ` Conor Dooley
2024-05-07 22:09 ` [PATCH v2 0/2] Add support for bosch bmi120 David Lechner

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=20240511125910.18e874cf@jic23-huawei \
    --to=jic23@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=danila@jiaxyga.com \
    --cc=devicetree@vger.kernel.org \
    --cc=dlechner@baylibre.com \
    --cc=krzk+dt@kernel.org \
    --cc=lars@metafoo.de \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=robh@kernel.org \
    --cc=trabarni@gmail.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).