struct op_mode_map { char *op_mode_name; long op_mode; }; #ifdef CONFIG_MACH_LGE /* */ static atomic_t bmm_diag = ATOMIC_INIT(0); static atomic_t bmm_cnt = ATOMIC_INIT(0); #endif static const u8 odr_map[] = {10, 2, 6, 8, 15, 20, 25, 30}; static const struct op_mode_map op_mode_maps[] = { {"normal", BMM_VAL_NAME(NORMAL_MODE)}, {"forced", BMM_VAL_NAME(FORCED_MODE)}, {"suspend", BMM_VAL_NAME(SUSPEND_MODE)}, {"sleep", BMM_VAL_NAME(SLEEP_MODE)}, }; struct bmm_client_data { struct bmm050 device; struct i2c_client *client; struct input_dev *input; struct delayed_work work; #ifdef CONFIG_HAS_EARLYSUSPEND struct early_suspend early_suspend_handler; #endif
struct bosch_sensor_data { union { int16_t v[3]; struct { int16_t x; int16_t y; int16_t z; }; }; }; static struct device *magnetic_device; static const u8 odr_map[] = {10, 2, 6, 8, 15, 20, 25, 30}; static const long op_mode_maps[] = { BMM_VAL_NAME(NORMAL_MODE), BMM_VAL_NAME(FORCED_MODE), BMM_VAL_NAME(SUSPEND_MODE), BMM_VAL_NAME(SLEEP_MODE) }; struct bmm_client_data { struct bmm050 device; struct i2c_client *client; struct input_dev *input; struct delayed_work work; atomic_t delay; /* whether the system in suspend state */