Re: [PATCH 2/3] iio: imu: mpu6050: add level shifter flag

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Sep 25, 2023 at 1:26 AM Andreas Kemnade <andreas@xxxxxxxxxxxx> 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





[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux