From: Jonathan Cameron <jic23@kernel.org>
To: LI Qingwu <Qing-wu.Li@leica-geosystems.com.cn>
Cc: lars@metafoo.de, robh+dt@kernel.org, tomas.melin@vaisala.com,
andy.shevchenko@gmail.com, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org,
thomas.haemmerle@leica-geosystems.com, linux-iio@vger.kernel.org
Subject: Re: [PATCH V8 5/5] iio: accel: sca3300: Add inclination channels
Date: Sat, 28 May 2022 18:23:14 +0100 [thread overview]
Message-ID: <20220528182314.0785a92b@jic23-huawei> (raw)
In-Reply-To: <20220523062312.1401944-6-Qing-wu.Li@leica-geosystems.com.cn>
On Mon, 23 May 2022 06:23:12 +0000
LI Qingwu <Qing-wu.Li@leica-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@leica-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
prev parent reply other threads:[~2022-05-28 17:14 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-23 6:23 [PATCH V8 0/5] iio: accel: sca3300: add compatible for scl3300 LI Qingwu
2022-05-23 6:23 ` [PATCH V8 1/5] dt-bindings: iio: accel: sca3300: Document murata,scl3300 LI Qingwu
2022-05-23 6:23 ` [PATCH V8 2/5] iio: accel: sca3300: add define for temp channel for reuse LI Qingwu
2022-05-23 6:23 ` [PATCH V8 3/5] iio: accel: sca3300: modified to support multi chips LI Qingwu
2022-05-25 9:59 ` Tomas Melin
2022-05-23 6:23 ` [PATCH V8 4/5] iio: accel: sca3300: Add support for SCL3300 LI Qingwu
2022-05-25 10:08 ` Tomas Melin
2022-05-23 6:23 ` [PATCH V8 5/5] iio: accel: sca3300: Add inclination channels LI Qingwu
2022-05-28 17:23 ` Jonathan Cameron [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220528182314.0785a92b@jic23-huawei \
--to=jic23@kernel.org \
--cc=Qing-wu.Li@leica-geosystems.com.cn \
--cc=andy.shevchenko@gmail.com \
--cc=devicetree@vger.kernel.org \
--cc=lars@metafoo.de \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=robh+dt@kernel.org \
--cc=thomas.haemmerle@leica-geosystems.com \
--cc=tomas.melin@vaisala.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox