Re: [PATCH v2] iio: imu: bmi270: add temperature channel
From: Jonathan Cameron
Date: Sat Jan 18 2025 - 12:01:04 EST
On Sat, 18 Jan 2025 07:55:49 -0300
Gustavo Silva <gustavograzs@xxxxxxxxx> wrote:
> The BMI270 IMU includes a temperature sensor. Add a channel for reading
> the temperature.
>
> Signed-off-by: Gustavo Silva <gustavograzs@xxxxxxxxx>
Hi Gustavo,
Applied with a small tweak.
> ---
> Changes in v2:
> - Use 'MICRO' instead of 'MEGA' for scale values
> - Remove unintended whitespace change
> - Link to v1: https://lore.kernel.org/r/20250111-bmi270-temp-v1-1-76ee38211bf2@xxxxxxxxx
> ---
> drivers/iio/imu/bmi270/bmi270_core.c | 48 ++++++++++++++++++++++++++++++++----
> 1 file changed, 43 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/iio/imu/bmi270/bmi270_core.c b/drivers/iio/imu/bmi270/bmi270_core.c
> index 7fec52e0b48624f07031b63a9caf6c318f33f5dc..0f89554d6cd321aeda6175cc17663cc7ad83b8e6 100644
> --- a/drivers/iio/imu/bmi270/bmi270_core.c
> +++ b/drivers/iio/imu/bmi270/bmi270_core.c
> struct bmi270_scale {
> @@ -136,6 +143,10 @@ static const struct bmi270_scale bmi270_gyro_scale[] = {
> { 0, 66 },
> };
>
> +static const struct bmi270_scale bmi270_temp_scale[] = {
> + {BMI270_TEMP_SCALE / MICRO, BMI270_TEMP_SCALE % MICRO},
For consistency with local style (and the one I'm trying to keep to across IIO)
I added space after { and before }
Thanks,
Jonathan
> +};
> +