[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <FR3P281MB17575CB2EC8CFD3D5D74EC0CCEFCA@FR3P281MB1757.DEUP281.PROD.OUTLOOK.COM>
Date: Mon, 25 Sep 2023 11:14:16 +0000
From: Jean-Baptiste Maneyrol <Jean-Baptiste.Maneyrol@....com>
To: Andy Shevchenko <andy.shevchenko@...il.com>,
Andreas Kemnade <andreas@...nade.info>
CC: "jic23@...nel.org" <jic23@...nel.org>,
"lars@...afoo.de" <lars@...afoo.de>,
"robh+dt@...nel.org" <robh+dt@...nel.org>,
"krzysztof.kozlowski+dt@...aro.org"
<krzysztof.kozlowski+dt@...aro.org>,
"conor+dt@...nel.org" <conor+dt@...nel.org>,
"bcousson@...libre.com" <bcousson@...libre.com>,
"tony@...mide.com" <tony@...mide.com>,
"chenhuiz@...s.com" <chenhuiz@...s.com>,
"linux-iio@...r.kernel.org" <linux-iio@...r.kernel.org>,
"devicetree@...r.kernel.org" <devicetree@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"linux-omap@...r.kernel.org" <linux-omap@...r.kernel.org>
Subject: Re: [PATCH 2/3] iio: imu: mpu6050: add level shifter flag
Hello,
these are very old unsupported chips, thus this is not something I can easily find. Even after doing some archaeology.
But when looking at register maps, it should only be used with MPU-9150 and not MPU-9250. I would feel much more comfortable to restrict this fix to MPU-9150 only (by testing chip_type against INV_MPU9150).
Thanks,
JB
From: Andy Shevchenko <andy.shevchenko@...il.com>
Sent: Monday, September 25, 2023 13:07
To: Andreas Kemnade <andreas@...nade.info>
Cc: jic23@...nel.org <jic23@...nel.org>; lars@...afoo.de <lars@...afoo.de>; robh+dt@...nel.org <robh+dt@...nel.org>; krzysztof.kozlowski+dt@...aro.org <krzysztof.kozlowski+dt@...aro.org>; conor+dt@...nel.org <conor+dt@...nel.org>; bcousson@...libre.com <bcousson@...libre.com>; tony@...mide.com <tony@...mide.com>; Jean-Baptiste Maneyrol <Jean-Baptiste.Maneyrol@....com>; chenhuiz@...s.com <chenhuiz@...s.com>; linux-iio@...r.kernel.org <linux-iio@...r.kernel.org>; devicetree@...r.kernel.org <devicetree@...r.kernel.org>; linux-kernel@...r.kernel.org <linux-kernel@...r.kernel.org>; linux-omap@...r.kernel.org <linux-omap@...r.kernel.org>
Subject: Re: [PATCH 2/3] iio: imu: mpu6050: add level shifter flag
On Mon, Sep 25, 2023 at 1: 26 AM Andreas Kemnade <andreas@ kemnade. info> wrote: > > Some boards fail in magnetometer probe if flag is not set. Which flag? Can you elaborate a bit more? Does it deserve the Fixes tag? .. . > unsigned
ZjQcmQRYFpfptBannerStart
This Message Is From an Untrusted Sender
You have not previously corresponded with this sender.
ZjQcmQRYFpfptBannerEnd
On Mon, Sep 25, 2023 at 1:26 AM Andreas Kemnade <andreas@...nade.info> wrote:
>
> Some boards fail in magnetometer probe if flag is not set.
Which flag? Can you elaborate a bit more?
Does it deserve the Fixes tag?
...
> unsigned int val;
> int ret;
> + ret = regmap_update_bits(st->map, 0x1, 0x80,
> + st->level_shifter ? 0x80 : 0);
This is a bit cryptic, what does 1 stand for?
Also
unsigned int mask = BIT(7);
...
val = st->level_shifter ? mask : 0;
> + if (ret)
> + return ret;
...
> + st->level_shifter = device_property_present(dev,
> + "invensense,level-shifter");
It was a recommendation to use _read_bool() when reading the value,
while the result will be the same.
--
With Best Regards,
Andy Shevchenko
Powered by blists - more mailing lists