[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20220528182314.0785a92b@jic23-huawei>
Date: Sat, 28 May 2022 18:23:14 +0100
From: Jonathan Cameron <jic23@...nel.org>
To: LI Qingwu <Qing-wu.Li@...ca-geosystems.com.cn>
Cc: lars@...afoo.de, robh+dt@...nel.org, tomas.melin@...sala.com,
andy.shevchenko@...il.com, devicetree@...r.kernel.org,
linux-kernel@...r.kernel.org,
thomas.haemmerle@...ca-geosystems.com, linux-iio@...r.kernel.org
Subject: Re: [PATCH V8 5/5] iio: accel: sca3300: Add inclination channels
On Mon, 23 May 2022 06:23:12 +0000
LI Qingwu <Qing-wu.Li@...ca-geosystems.com.cn> wrote:
> Different from SCA3300, SCL3300 can output inclination angles.
> Angles are formed from acceleration with following equations:
> ANG_X = atan2(accx , sqrt(pow(accy , 2) + pow(accz , 2)))
> ANG_Y = atan2(accy , sqrt(pow(accx , 2) + pow(accz , 2)))
> ANG_Z = atan2(accz , sqrt(pow(accx , 2) + pow(accy , 2)))
>
> The commit adds the output of the raw value, scale
> and scale_available of angles.
>
> New interfaces:
> in_incli_scale
> in_incli_scale_available
> in_incli_x_raw
> in_incli_y_raw
> in_incli_z_raw
> Data converted by application of scale to degrees.
>
> Signed-off-by: LI Qingwu <Qing-wu.Li@...ca-geosystems.com.cn>
> ---
Hi,
One comment inline.
> struct sca3300_chip_info {
> const char *name;
> const unsigned long *scan_masks;
> @@ -123,12 +167,16 @@ struct sca3300_chip_info {
> u8 num_accel_scales;
> const int (*accel_scale)[2];
> const int *accel_scale_map;
> + const int (*incli_scale)[2];
> + const int *incli_scale_map;
> + u8 num_incli_scales;
> u8 num_freqs;
> const int *freq_table;
> const int *freq_map;
> const int *avail_modes_table;
> u8 num_avail_modes;
> u8 chip_id;
> + bool angle;
"angle" is a bit vague. Perhaps "angle_supported"?
Otherwise this looks good to me.
Thanks,
Jonathan
Powered by blists - more mailing lists