devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Justin Weiss <justin@justinweiss.com>
To: Jonathan Cameron <jic23@kernel.org>
Cc: "Alex Lanzano" <lanzano.alex@gmail.com>,
	"Lars-Peter Clausen" <lars@metafoo.de>,
	"Rob Herring" <robh@kernel.org>,
	"Krzysztof Kozlowski" <krzk+dt@kernel.org>,
	"Conor Dooley" <conor+dt@kernel.org>,
	linux-iio@vger.kernel.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org,
	"Derek J . Clark" <derekjohn.clark@gmail.com>,
	"Philip Müller" <philm@manjaro.org>
Subject: Re: [PATCH v2 1/6] iio: imu: bmi270: Use INFO_SAMP_FREQ instead of INFO_FREQUENCY
Date: Sat, 19 Oct 2024 13:48:15 -0700	[thread overview]
Message-ID: <87bjzfbz00.fsf@justinweiss.com> (raw)
In-Reply-To: <20241019123005.096f03c3@jic23-huawei> (Jonathan Cameron's message of "Sat, 19 Oct 2024 12:30:05 +0100")

Jonathan Cameron <jic23@kernel.org> writes:

> On Fri, 18 Oct 2024 16:36:07 -0700
> Justin Weiss <justin@justinweiss.com> wrote:
>
>> Use IIO_CHAN_INFO_SAMP_FREQ instead of IIO_CHAN_INFO_FREQUENCY
>> to match the BMI160 / BMI323 drivers.
>> 
>> Fixes: 3ea51548d6b2 ("iio: imu: Add i2c driver for bmi270 imu")
>> Signed-off-by: Justin Weiss <justin@justinweiss.com>
>
> Whilst this gets rid of the wrong attributes, they still aren't
> wired up to anything either way so a read will always return an error.
>
> For now, the fix is drop the bit and bring it back in a patch
> that adds the read_raw handling for the sampling frequency
> (patch 6 I think).

Makes sense. I'll remove both SCALE and FREQUENCY here, because neither
of them are wired up right now.

Justin

>> ---
>>  drivers/iio/imu/bmi270/bmi270_core.c | 4 ++--
>>  1 file changed, 2 insertions(+), 2 deletions(-)
>> 
>> diff --git a/drivers/iio/imu/bmi270/bmi270_core.c b/drivers/iio/imu/bmi270/bmi270_core.c
>> index aeda7c4228df..87036f352698 100644
>> --- a/drivers/iio/imu/bmi270/bmi270_core.c
>> +++ b/drivers/iio/imu/bmi270/bmi270_core.c
>> @@ -122,7 +122,7 @@ static const struct iio_info bmi270_info = {
>>  	.channel2 = IIO_MOD_##_axis,				\
>>  	.info_mask_separate = BIT(IIO_CHAN_INFO_RAW),		\
>>  	.info_mask_shared_by_type = BIT(IIO_CHAN_INFO_SCALE) |	\
>> -		BIT(IIO_CHAN_INFO_FREQUENCY),			\
>> +		BIT(IIO_CHAN_INFO_SAMP_FREQ),			\
>>  }
>>  
>>  #define BMI270_ANG_VEL_CHANNEL(_axis) {				\
>> @@ -131,7 +131,7 @@ static const struct iio_info bmi270_info = {
>>  	.channel2 = IIO_MOD_##_axis,				\
>>  	.info_mask_separate = BIT(IIO_CHAN_INFO_RAW),		\
>>  	.info_mask_shared_by_type = BIT(IIO_CHAN_INFO_SCALE) |	\
>> -		BIT(IIO_CHAN_INFO_FREQUENCY),			\
>> +		BIT(IIO_CHAN_INFO_SAMP_FREQ),			\
>>  }
>>  
>>  static const struct iio_chan_spec bmi270_channels[] = {

  reply	other threads:[~2024-10-19 20:48 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-18 23:36 [PATCH v2 0/6] Add i2c driver for Bosch BMI260 IMU Justin Weiss
2024-10-18 23:36 ` [PATCH v2 1/6] iio: imu: bmi270: Use INFO_SAMP_FREQ instead of INFO_FREQUENCY Justin Weiss
2024-10-19 11:30   ` Jonathan Cameron
2024-10-19 20:48     ` Justin Weiss [this message]
2024-10-18 23:36 ` [PATCH v2 2/6] iio: imu: bmi270: Provide chip info as configuration structure Justin Weiss
2024-10-19 11:33   ` Jonathan Cameron
2024-10-19 20:49     ` Justin Weiss
2024-10-18 23:36 ` [PATCH v2 3/6] dt-bindings: iio: imu: Add Bosch BMI260 Justin Weiss
2024-10-19 11:36   ` Jonathan Cameron
2024-10-19 20:49     ` Justin Weiss
2024-10-18 23:36 ` [PATCH v2 4/6] iio: imu: bmi270: Add support for BMI260 Justin Weiss
2024-10-19 11:40   ` Jonathan Cameron
2024-10-19 20:52     ` Justin Weiss
2024-10-20 11:00       ` Jonathan Cameron
2024-10-18 23:36 ` [PATCH v2 5/6] iio: imu: bmi270: Add triggered buffer for Bosch BMI270 IMU Justin Weiss
2024-10-19 11:41   ` Jonathan Cameron
2024-10-19 20:52     ` Justin Weiss
2024-10-18 23:36 ` [PATCH v2 6/6] iio: imu: bmi270: Add scale and sampling frequency to " Justin Weiss
2024-10-19 11:44   ` Jonathan Cameron
2024-10-19 20:52     ` Justin Weiss

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=87bjzfbz00.fsf@justinweiss.com \
    --to=justin@justinweiss.com \
    --cc=conor+dt@kernel.org \
    --cc=derekjohn.clark@gmail.com \
    --cc=devicetree@vger.kernel.org \
    --cc=jic23@kernel.org \
    --cc=krzk+dt@kernel.org \
    --cc=lanzano.alex@gmail.com \
    --cc=lars@metafoo.de \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=philm@manjaro.org \
    --cc=robh@kernel.org \
    /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;
as well as URLs for NNTP newsgroup(s).