.orientation = { -1, 0, 0, 0, 0, 1, 0, -1, 0},
};
#endif
+#if defined (CONFIG_COMPASS_AK8975)
+static struct akm8975_platform_data akm8975_info =
+{
+ .m_layout =
+ {
+ {
+ {1, 0, 0 },
+ {0, -1, 0 },
+ {0, 0, -1 },
+ },
+
+ {
+ {1, 0, 0 },
+ {0, 1, 0 },
+ {0, 0, 1 },
+ },
+
+ {
+ {1, 0, 0 },
+ {0, 1, 0 },
+ {0, 0, 1 },
+ },
+
+ {
+ {1, 0, 0 },
+ {0, 1, 0 },
+ {0, 0, 1 },
+ },
+ }
+
+};
+
+#endif
+
#if defined(CONFIG_GYRO_L3G4200D)
#include <linux/l3g4200d.h>
.platform_data = &mma8452_info,
},
#endif
+#if defined (CONFIG_COMPASS_AK8975)
+ {
+ .type = "ak8975",
+ .addr = 0x0d,
+ .flags = 0,
+ .irq = RK30_PIN4_PC1,
+ .platform_data = &akm8975_info,
+ },
+#endif
#if defined (CONFIG_GYRO_L3G4200D)
{
.type = "l3g4200d_gryo",
int (*io_deinit)(void);
};
-struct mma8452_platform_data {
- u16 model;
- u16 swap_xy;
- u16 swap_xyz;
- signed char orientation[9];
- int (*get_pendown_state)(void);
- int (*init_platform_hw)(void);
- int (*mma8452_platform_sleep)(void);
- int (*mma8452_platform_wakeup)(void);
- void (*exit_platform_hw)(void);
-};
-
extern struct rk29_sdmmc_platform_data default_sdmmc0_data;
extern struct rk29_sdmmc_platform_data default_sdmmc1_data;
int write_prt;
};
+struct mma8452_platform_data {
+ u16 model;
+ u16 swap_xy;
+ u16 swap_xyz;
+ signed char orientation[9];
+ int (*get_pendown_state)(void);
+ int (*init_platform_hw)(void);
+ int (*mma8452_platform_sleep)(void);
+ int (*mma8452_platform_wakeup)(void);
+ void (*exit_platform_hw)(void);
+};
+
+struct akm8975_platform_data {
+ short m_layout[4][3][3];
+ char project_name[64];
+ int gpio_DRDY;
+};
+
+
+
#define BOOT_MODE_NORMAL 0
#define BOOT_MODE_FACTORY2 1
#define BOOT_MODE_RECOVERY 2