mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-07 11:26:02 +09:00
rk3188 ds1006h: configuration the akm8963 based sensors framework
This commit is contained in:
@@ -194,11 +194,8 @@ CONFIG_MTD_NAND_IDS=y
|
||||
CONFIG_MTD_RKNAND=y
|
||||
CONFIG_BLK_DEV_LOOP=y
|
||||
CONFIG_MISC_DEVICES=y
|
||||
CONFIG_SENSORS_AK8963=y
|
||||
CONFIG_UID_STAT=y
|
||||
CONFIG_APANIC=y
|
||||
CONFIG_3G_MODULE=y
|
||||
CONFIG_MT6229=y
|
||||
CONFIG_SCSI=y
|
||||
CONFIG_BLK_DEV_SD=y
|
||||
CONFIG_SCSI_MULTI_LUN=y
|
||||
@@ -251,6 +248,7 @@ CONFIG_LIGHT_SENSOR_DEVICE=y
|
||||
CONFIG_SENSOR_DEVICE=y
|
||||
CONFIG_GSENSOR_DEVICE=y
|
||||
CONFIG_COMPASS_DEVICE=y
|
||||
CONFIG_COMPASS_AK8963=y
|
||||
CONFIG_GYROSCOPE_DEVICE=y
|
||||
CONFIG_LIGHT_DEVICE=y
|
||||
CONFIG_LS_PHOTORESISTOR=y
|
||||
|
||||
@@ -259,17 +259,44 @@ static struct sensor_platform_data lis3dh_info = {
|
||||
.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 = {-1, 0, 0, 0, 1, 0, 0, 0, -1},
|
||||
};
|
||||
#endif
|
||||
|
||||
#if (defined(CONFIG_SENSORS_AK8963) || defined(CONFIG_SENSORS_AK8963_MODULE))
|
||||
static struct akm8963_platform_data akm_platform_data_8963 = {
|
||||
.gpio_DRDY = RK30_PIN3_PD7,
|
||||
.gpio_RST = 0,
|
||||
.layout = 3,
|
||||
.outbit = 1,
|
||||
};
|
||||
#if defined (CONFIG_COMPASS_AK8963)
|
||||
static struct sensor_platform_data akm8963_info =
|
||||
{
|
||||
.type = SENSOR_TYPE_COMPASS,
|
||||
.irq_enable = 1,
|
||||
.poll_delay_ms = 30,
|
||||
.m_layout =
|
||||
{
|
||||
{
|
||||
{0, 1, 0},
|
||||
{1, 0, 0},
|
||||
{0, 0, -1},
|
||||
},
|
||||
|
||||
{
|
||||
{1, 0, 0},
|
||||
{0, 1, 0},
|
||||
{0, 0, 1},
|
||||
},
|
||||
|
||||
{
|
||||
{0, -1, 0},
|
||||
{-1, 0, 0},
|
||||
{0, 0, -1},
|
||||
},
|
||||
|
||||
{
|
||||
{1, 0, 0},
|
||||
{0, 1, 0},
|
||||
{0, 0, 1},
|
||||
},
|
||||
}
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_LS_PHOTORESISTOR)
|
||||
@@ -1294,15 +1321,16 @@ static struct i2c_board_info __initdata i2c0_info[] = {
|
||||
.platform_data = &lis3dh_info,
|
||||
},
|
||||
#endif
|
||||
#if defined (CONFIG_SENSORS_AK8963)
|
||||
{
|
||||
.type = "akm8963",
|
||||
.addr = 0x0d,
|
||||
.flags = I2C_CLIENT_WAKE,
|
||||
.irq = RK30_PIN3_PD7,
|
||||
.platform_data = &akm_platform_data_8963,
|
||||
},
|
||||
#if defined (CONFIG_COMPASS_AK8963)
|
||||
{
|
||||
.type = "ak8963",
|
||||
.addr = 0x0d,
|
||||
.flags = 0,
|
||||
.irq = RK30_PIN3_PD7,
|
||||
.platform_data = &akm8963_info,
|
||||
},
|
||||
#endif
|
||||
|
||||
#if defined (CONFIG_LS_PHOTORESISTOR)
|
||||
{
|
||||
.type = "ls_photoresistor",
|
||||
|
||||
Reference in New Issue
Block a user