mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-09 04:10:18 +09:00
rk30_phone:select all sensor items
This commit is contained in:
@@ -23,9 +23,9 @@ CONFIG_MODULE_UNLOAD=y
|
||||
CONFIG_MODULE_FORCE_UNLOAD=y
|
||||
CONFIG_ARCH_RK30=y
|
||||
CONFIG_DDR_SDRAM_FREQ=300
|
||||
CONFIG_CLK_SWITCH_TO_32K=y
|
||||
CONFIG_WIFI_CONTROL_FUNC=y
|
||||
CONFIG_MACH_RK30_PHONE=y
|
||||
CONFIG_CLK_SWITCH_TO_32K=y
|
||||
# CONFIG_SWP_EMULATE is not set
|
||||
CONFIG_FIQ_DEBUGGER=y
|
||||
CONFIG_FIQ_DEBUGGER_NO_SLEEP=y
|
||||
@@ -234,13 +234,17 @@ CONFIG_INPUT_TWL6030_PWRBUTTON=y
|
||||
CONFIG_INPUT_UINPUT=y
|
||||
CONFIG_COMPASS_AK8975=y
|
||||
CONFIG_GS_MMA8452=y
|
||||
CONFIG_GS_LIS3DH=y
|
||||
CONFIG_GYRO_L3G4200D=y
|
||||
CONFIG_LS_CM3217=y
|
||||
CONFIG_SENSOR_DEVICE=y
|
||||
CONFIG_GSENSOR_DEVICE=y
|
||||
CONFIG_GS_KXTIK=y
|
||||
CONFIG_COMPASS_DEVICE=y
|
||||
CONFIG_GYROSCOPE_DEVICE=y
|
||||
CONFIG_LIGHT_DEVICE=y
|
||||
CONFIG_LS_AL3006=y
|
||||
CONFIG_LS_STK3171=y
|
||||
# CONFIG_SERIO is not set
|
||||
# CONFIG_CONSOLE_TRANSLATIONS is not set
|
||||
# CONFIG_LEGACY_PTYS is not set
|
||||
|
||||
@@ -876,15 +876,37 @@ static int lis3dh_init_platform_hw(void)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static struct gsensor_platform_data lis3dh_info = {
|
||||
.model = lis3dh,
|
||||
.swap_xy = 0,
|
||||
.swap_xyz = 1,
|
||||
static struct sensor_platform_data lis3dh_info = {
|
||||
.type = SENSOR_TYPE_ACCEL,
|
||||
.irq_enable = 1,
|
||||
.poll_delay_ms = 30,
|
||||
.init_platform_hw = lis3dh_init_platform_hw,
|
||||
.orientation = {-1, 0, 0, 0, 0, 1, 0, -1, 0},
|
||||
.orientation = {0, 1, 0, 0, 0, -1, 1, 0, 0},
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
#if defined (CONFIG_GS_KXTIK)
|
||||
#define KXTIK_INT_PIN RK30_PIN4_PC0
|
||||
|
||||
static int kxtik_init_platform_hw(void)
|
||||
{
|
||||
rk30_mux_api_set(GPIO4C0_SMCDATA0_TRACEDATA0_NAME, GPIO4C_GPIO4C0);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static struct sensor_platform_data kxtik_info = {
|
||||
.type = SENSOR_TYPE_ACCEL,
|
||||
.irq_enable = 1,
|
||||
.poll_delay_ms = 30,
|
||||
.init_platform_hw = kxtik_init_platform_hw,
|
||||
.orientation = {0, 1, 0, 0, 0, -1, 1, 0, 0},
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
#if defined (CONFIG_RK_HEADSET_DET) || defined (CONFIG_RK_HEADSET_IRQ_HOOK_ADC_DET)
|
||||
|
||||
@@ -980,63 +1002,51 @@ static struct sensor_platform_data l3g4200d_info = {
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef CONFIG_LS_CM3217
|
||||
|
||||
#define CM3217_POWER_PIN INVALID_GPIO
|
||||
#define CM3217_IRQ_PIN INVALID_GPIO
|
||||
static int cm3217_init_hw(void)
|
||||
{
|
||||
#if 0
|
||||
if (gpio_request(CM3217_POWER_PIN, NULL) != 0) {
|
||||
gpio_free(CM3217_POWER_PIN);
|
||||
printk("%s: request cm3217 power pin error\n", __func__);
|
||||
return -EIO;
|
||||
}
|
||||
gpio_pull_updown(CM3217_POWER_PIN, PullDisable);
|
||||
|
||||
if (gpio_request(CM3217_IRQ_PIN, NULL) != 0) {
|
||||
gpio_free(CM3217_IRQ_PIN);
|
||||
printk("%s: request cm3217 int pin error\n", __func__);
|
||||
return -EIO;
|
||||
}
|
||||
gpio_pull_updown(CM3217_IRQ_PIN, PullDisable);
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void cm3217_exit_hw(void)
|
||||
{
|
||||
#if 0
|
||||
gpio_free(CM3217_POWER_PIN);
|
||||
gpio_free(CM3217_IRQ_PIN);
|
||||
#endif
|
||||
return;
|
||||
}
|
||||
|
||||
static struct cm3217_platform_data cm3217_info = {
|
||||
.irq_pin = CM3217_IRQ_PIN,
|
||||
.power_pin = CM3217_POWER_PIN,
|
||||
.init_platform_hw = cm3217_init_hw,
|
||||
.exit_platform_hw = cm3217_exit_hw,
|
||||
static struct sensor_platform_data cm3217_info = {
|
||||
.type = SENSOR_TYPE_LIGHT,
|
||||
.irq_enable = 0,
|
||||
.poll_delay_ms = 500,
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
#if defined(CONFIG_PS_AL3006)
|
||||
static struct sensor_platform_data proximity_info = {
|
||||
static struct sensor_platform_data proximity_al3006_info = {
|
||||
.type = SENSOR_TYPE_PROXIMITY,
|
||||
.irq_enable = 1,
|
||||
.poll_delay_ms = 200,
|
||||
};
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_PS_STK3171)
|
||||
static struct sensor_platform_data proximity_stk3171_info = {
|
||||
.type = SENSOR_TYPE_PROXIMITY,
|
||||
.irq_enable = 1,
|
||||
.poll_delay_ms = 200,
|
||||
};
|
||||
#endif
|
||||
|
||||
|
||||
#if defined(CONFIG_LS_AL3006)
|
||||
static struct sensor_platform_data light_info = {
|
||||
static struct sensor_platform_data light_al3006_info = {
|
||||
.type = SENSOR_TYPE_LIGHT,
|
||||
.irq_enable = 1,
|
||||
.poll_delay_ms = 200,
|
||||
};
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_LS_STK3171)
|
||||
static struct sensor_platform_data light_stk3171_info = {
|
||||
.type = SENSOR_TYPE_LIGHT,
|
||||
.irq_enable = 1,
|
||||
.poll_delay_ms = 200,
|
||||
};
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
#ifdef CONFIG_FB_ROCKCHIP
|
||||
|
||||
@@ -1685,7 +1695,7 @@ static struct i2c_board_info __initdata i2c0_info[] = {
|
||||
#endif
|
||||
#if defined (CONFIG_GS_LIS3DH)
|
||||
{
|
||||
.type = "lis3dh",
|
||||
.type = "gs_lis3dh",
|
||||
.addr = 0x19,
|
||||
.flags = 0,
|
||||
.irq = LIS3DH_INT_PIN,
|
||||
@@ -1693,6 +1703,17 @@ static struct i2c_board_info __initdata i2c0_info[] = {
|
||||
},
|
||||
#endif
|
||||
|
||||
#if defined (CONFIG_GS_KXTIK)
|
||||
{
|
||||
.type = "gs_kxtik",
|
||||
.addr = 0x0F,
|
||||
.flags = 0,
|
||||
.irq = KXTIK_INT_PIN,
|
||||
.platform_data = &kxtik_info,
|
||||
},
|
||||
#endif
|
||||
|
||||
|
||||
#if defined (CONFIG_COMPASS_AK8975)
|
||||
{
|
||||
.type = "ak8975",
|
||||
@@ -1726,9 +1747,19 @@ static struct i2c_board_info __initdata i2c0_info[] = {
|
||||
.addr = 0x1c, //sel = 0; if sel =1, then addr = 0x1D
|
||||
.flags = 0,
|
||||
.irq = RK30_PIN6_PA2,
|
||||
.platform_data = &light_info,
|
||||
.platform_data = &light_al3006_info,
|
||||
},
|
||||
#endif
|
||||
#if defined (CONFIG_LS_STK3171)
|
||||
{
|
||||
.type = "ls_stk3171",
|
||||
.addr = 0x48,
|
||||
.flags = 0,
|
||||
.irq = RK30_PIN6_PA2,
|
||||
.platform_data = &light_stk3171_info,
|
||||
},
|
||||
#endif
|
||||
|
||||
|
||||
#if defined (CONFIG_PS_AL3006)
|
||||
{
|
||||
@@ -1736,10 +1767,21 @@ static struct i2c_board_info __initdata i2c0_info[] = {
|
||||
.addr = 0x1c, //sel = 0; if sel =1, then addr = 0x1D
|
||||
.flags = 0,
|
||||
.irq = RK30_PIN6_PA2,
|
||||
.platform_data = &proximity_info,
|
||||
.platform_data = &proximity_al3006_info,
|
||||
},
|
||||
#endif
|
||||
|
||||
#if defined (CONFIG_PS_STK3171)
|
||||
{
|
||||
.type = "ps_stk3171",
|
||||
.addr = 0x48,
|
||||
.flags = 0,
|
||||
.irq = RK30_PIN6_PA2,
|
||||
.platform_data = &proximity_stk3171_info,
|
||||
},
|
||||
#endif
|
||||
|
||||
|
||||
#if defined (CONFIG_SND_SOC_RK1000)
|
||||
{
|
||||
.type = "rk1000_i2c_codec",
|
||||
@@ -1848,10 +1890,9 @@ static struct i2c_board_info __initdata i2c2_info[] = {
|
||||
|
||||
#if defined (CONFIG_LS_CM3217)
|
||||
{
|
||||
.type = "lightsensor",
|
||||
.type = "light_cm3217",
|
||||
.addr = 0x10,
|
||||
.flags = 0,
|
||||
.irq = CM3217_IRQ_PIN,
|
||||
.platform_data = &cm3217_info,
|
||||
},
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user