iio:ak8975: add mounting matrix support
Expose a rotation matrix to indicate userspace the chip orientation with respect to the overall hardware system. Matrix is retrieved from "in_mount_matrix". It is declared into ak8975 DTS entry as a "mount-matrix" property. Signed-off-by: Gregor Boirie <gregor.boirie@parrot.com> Acked-by: Rob Herring <robh@kernel.org> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
This commit is contained in:

committed by
Jonathan Cameron

parent
dfc57732ad
commit
97eacb9166
16
include/linux/iio/magnetometer/ak8975.h
Normal file
16
include/linux/iio/magnetometer/ak8975.h
Normal file
@@ -0,0 +1,16 @@
|
||||
#ifndef __IIO_MAGNETOMETER_AK8975_H__
|
||||
#define __IIO_MAGNETOMETER_AK8975_H__
|
||||
|
||||
#include <linux/iio/iio.h>
|
||||
|
||||
/**
|
||||
* struct ak8975_platform_data - AK8975 magnetometer driver platform data
|
||||
* @eoc_gpio: data ready event gpio
|
||||
* @orientation: mounting matrix relative to main hardware
|
||||
*/
|
||||
struct ak8975_platform_data {
|
||||
int eoc_gpio;
|
||||
struct iio_mount_matrix orientation;
|
||||
};
|
||||
|
||||
#endif
|
Reference in New Issue
Block a user