lis3lv02d: axis remap and resource setup/release
authorSamu Onkalo <[email protected]>
Tue, 15 Dec 2009 02:01:35 +0000 (18:01 -0800)
committerLinus Torvalds <[email protected]>
Tue, 15 Dec 2009 16:53:35 +0000 (08:53 -0800)
Add the possibility to remap axes via platform data.  Function pointers
for resource setup and release purposes

Signed-off-by: Samu Onkalo <[email protected]>
Acked-by: Éric Piel <[email protected]>
Cc: Pavel Machek <[email protected]>
Cc: Jean Delvare <[email protected]>
Cc: "Trisal, Kalhan" <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
include/linux/lis3lv02d.h

index 3cc2f2c53e4c699abeefed5869c3ca8da1ef6481..89701355c74f0dd5b8e86ab77712b2ef5a6f3e01 100644 (file)
@@ -43,6 +43,18 @@ struct lis3lv02d_platform_data {
 #define LIS3_WAKEUP_Z_HI       (1 << 5)
        unsigned char wakeup_flags;
        unsigned char wakeup_thresh;
+#define LIS3_NO_MAP            0
+#define LIS3_DEV_X             1
+#define LIS3_DEV_Y             2
+#define LIS3_DEV_Z             3
+#define LIS3_INV_DEV_X        -1
+#define LIS3_INV_DEV_Y        -2
+#define LIS3_INV_DEV_Z        -3
+       s8 axis_x;
+       s8 axis_y;
+       s8 axis_z;
+       int (*setup_resources)(void);
+       int (*release_resources)(void);
 };
 
 #endif /* __LIS3LV02D_H_ */