Skip to content

Commit

Permalink
channel: Correct linear x/y/z modifier names
Browse files Browse the repository at this point in the history
I'm not sure where the `*-g` names came from, but the kernel calls them
`linear_*`[1]. This fixes an error when using the Bosch BNO055, which is
the only user of these modifiers.

[1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/iio/industrialio-core.c?id=83a7eefedc9b56fe7bfeff13b6c7356688ffa670#n147

Signed-off-by: Chris Spencer <[email protected]>
  • Loading branch information
spencercw authored and mhennerich committed Jul 22, 2024
1 parent fea2a83 commit 3dba184
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions channel.c
Original file line number Diff line number Diff line change
Expand Up @@ -113,9 +113,9 @@ static const char * const modifier_names[] = {
[IIO_MOD_PM2P5] = "pm2p5",
[IIO_MOD_PM4] = "pm4",
[IIO_MOD_PM10] = "pm10",
[IIO_MOD_LINEAR_X] = "x-g",
[IIO_MOD_LINEAR_Y] = "y-g",
[IIO_MOD_LINEAR_Z] = "z-g",
[IIO_MOD_LINEAR_X] = "linear_x",
[IIO_MOD_LINEAR_Y] = "linear_y",
[IIO_MOD_LINEAR_Z] = "linear_z",
[IIO_MOD_PITCH] = "pitch",
[IIO_MOD_YAW] = "yaw",
[IIO_MOD_ROLL] = "roll",
Expand Down

0 comments on commit 3dba184

Please sign in to comment.