lkml.org 
[lkml]   [2022]   [Aug]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v5 3/5] iio: pressure: bmp280: Add support for BMP380 sensor family
On Sun,  7 Aug 2022 13:55:52 +0200
Angel Iglesias <ang.iglesiasg@gmail.com> wrote:

> Adds compatibility with the new generation of this sensor, the BMP380
>
> Includes basic sensor initialization to do pressure and temp
> measurements and allows tuning oversampling settings for each channel.
>
> The compensation algorithms are adapted from the device datasheet and
> the repository https://github.com/BoschSensortec/BMP3-Sensor-API
>
> Signed-off-by: Angel Iglesias <ang.iglesiasg@gmail.com>

One additional comment from me inline.

Thanks,

Jonathan


> }
> @@ -1124,6 +1471,13 @@ int bmp280_common_probe(struct device *dev,
> return -EINVAL;
> }
>
> + /* BMP3xx requires soft-reset as part of initialization */
> + if (chip_id == BMP380_CHIP_ID) {

I'd prefer this to be based on a flag in chip_info so that we can
trivially add it to future devices by just setting that flag for the
chip_info added for the new device.

> + ret = bmp380_cmd(data, BMP380_CMD_SOFT_RESET);
> + if (ret < 0)
> + return ret;
> + }
> +
> ret = data->chip_info->chip_config(data);
> if (ret < 0)
> return ret;

\
 
 \ /
  Last update: 2022-08-14 16:05    [W:1.242 / U:0.720 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site