forked from torvalds/linux
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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 <[email protected]> Acked-by: Rob Herring <[email protected]> Signed-off-by: Jonathan Cameron <[email protected]>
- Loading branch information
Showing
3 changed files
with
56 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |