[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAHp75Vf-TZrfesq4P7jGq9Aj_+_Fh5Mot9TU5A3v2JbfCpWSww@mail.gmail.com>
Date: Mon, 25 Jul 2022 23:05:22 +0200
From: Andy Shevchenko <andy.shevchenko@...il.com>
To: Angel Iglesias <ang.iglesiasg@...il.com>
Cc: linux-iio <linux-iio@...r.kernel.org>,
Jonathan Cameron <jic23@...nel.org>,
Lars-Peter Clausen <lars@...afoo.de>,
Paul Cercueil <paul@...pouillou.net>,
"Rafael J. Wysocki" <rafael.j.wysocki@...el.com>,
Ulf Hansson <ulf.hansson@...aro.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v4 2/5] iio: pressure: bmp280: simplify driver
initialization logic
On Sat, Jul 23, 2022 at 7:40 PM Angel Iglesias <ang.iglesiasg@...il.com> wrote:
>
> Simplified common initialization logic of different sensor types
> unifying calibration and initial configuration recovery.
>
> Default config param values of each sensor type are stored inside
> chip_info structure and used to initialize sensor data struct instance.
>
> The auxiliar functions for read each sensor type calibration are converted
> to a callback available on the chip_info struct.
...
> + .oversampling_temp_default = ilog2(2),
> + .oversampling_press_default = ilog2(16),
> + .oversampling_humid_default = ilog2(16),
> + .oversampling_temp_default = ilog2(1),
> + .oversampling_press_default = ilog2(8),
It's a very interesting way of writing BIT(x)...
--
With Best Regards,
Andy Shevchenko
Powered by blists - more mailing lists