Re: [PATCH v4 2/5] iio: pressure: bmp280: simplify driver initialization logic

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

 



On Sat, Jul 23, 2022 at 7:40 PM Angel Iglesias <ang.iglesiasg@xxxxxxxxx> 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



[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Input]     [Linux Kernel]     [Linux SCSI]     [X.org]

  Powered by Linux