lkml.org 
[lkml]   [2022]   [Mar]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH v1 4/5] iio: accel: bma400: Add separate channel for step counter
On Sat, Mar 19, 2022 at 8:10 PM Jagath Jog J <jagathjog1996@gmail.com> wrote:
>
> Added channel for step counter which can be enable or disable
> through the sysfs interface.

...

> + u32 steps_raw;

I would expect this to be u8 ...[3].

...

> + ret = regmap_bulk_read(data->regmap, BMA400_STEP_CNT0_REG,
> + &steps_raw, 3 * sizeof(u8));

sizeof(&steps_raw);

...

> + *val = steps_raw & 0x00FFFFFF;

And here it seems to be be24_to_cpu() like Jonathan mentioned,


--
With Best Regards,
Andy Shevchenko

\
 
 \ /
  Last update: 2022-03-21 09:44    [W:1.110 / U:0.120 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site