From: hjc Date: Thu, 21 Mar 2013 02:41:38 +0000 (+0800) Subject: rk3168_86v_codec(ds803f): add support am8963,ov2659,bt(2in1) X-Git-Tag: firefly_0821_release~7373 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=464f26696e166f2f5b24bf3cb0f8c766b54abdbb;p=firefly-linux-kernel-4.4.55.git rk3168_86v_codec(ds803f): add support am8963,ov2659,bt(2in1) --- diff --git a/arch/arm/configs/rk3168_86v_codec_defconfig b/arch/arm/configs/rk3168_86v_codec_defconfig index e6db57985f5b..314ed280d07a 100644 --- a/arch/arm/configs/rk3168_86v_codec_defconfig +++ b/arch/arm/configs/rk3168_86v_codec_defconfig @@ -184,6 +184,7 @@ CONFIG_BT_HCIUART=y CONFIG_BT_HCIUART_H4=y CONFIG_BT_HCIUART_LL=y CONFIG_BT_HCIBCM4325=y +CONFIG_MAC80211=y CONFIG_RFKILL=y CONFIG_RFKILL_RK=y CONFIG_DEVTMPFS=y @@ -244,9 +245,13 @@ CONFIG_TOUCHSCREEN_GT82X_IIC=y CONFIG_INPUT_MISC=y CONFIG_INPUT_KEYCHORD=y CONFIG_INPUT_UINPUT=y -CONFIG_GS_MMA7660=y +CONFIG_GS_LIS3DH=y +CONFIG_GYRO_L3G4200D=y CONFIG_SENSOR_DEVICE=y CONFIG_GSENSOR_DEVICE=y +CONFIG_COMPASS_DEVICE=y +CONFIG_COMPASS_AK8963=y +CONFIG_GYROSCOPE_DEVICE=y # CONFIG_SERIO is not set # CONFIG_CONSOLE_TRANSLATIONS is not set # CONFIG_LEGACY_PTYS is not set @@ -273,7 +278,6 @@ CONFIG_POWER_SUPPLY=y CONFIG_BATTERY_RK30_ADC_FAC=y CONFIG_BATTERY_RK30_AC_CHARGE=y CONFIG_BATTERY_RK30_VOL3V8=y -CONFIG_POWER_ON_CHARGER_DISPLAY=y # CONFIG_HWMON is not set CONFIG_WATCHDOG=y CONFIG_RK29_WATCHDOG=y @@ -289,6 +293,7 @@ CONFIG_REGULATOR_ACT8846=y CONFIG_MEDIA_SUPPORT=y CONFIG_VIDEO_DEV=y CONFIG_SOC_CAMERA=y +CONFIG_SOC_CAMERA_OV2659=y CONFIG_SOC_CAMERA_GC0308=y CONFIG_VIDEO_RK29=y CONFIG_VIDEO_RK29_CAMMEM_ION=y diff --git a/arch/arm/mach-rk30/board-rk3168-86v.c b/arch/arm/mach-rk30/board-rk3168-86v.c index 311150261420..56029d0ecee6 100755 --- a/arch/arm/mach-rk30/board-rk3168-86v.c +++ b/arch/arm/mach-rk30/board-rk3168-86v.c @@ -423,7 +423,7 @@ 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_COMPASS_AK8975) @@ -462,6 +462,43 @@ static struct sensor_platform_data akm8975_info = #endif +#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_GYRO_L3G4200D) #include @@ -1219,7 +1256,7 @@ static struct mt6622_platform_data mt6622_platdata = { .irq_gpio = { .io = RK30_PIN0_PA5, - .enable = GPIO_HIGH, + .enable = GPIO_LOW, .iomux = { .name = NULL, }, @@ -1331,6 +1368,15 @@ static struct i2c_board_info __initdata i2c0_info[] = { .platform_data = &akm8975_info, }, #endif +#if defined (CONFIG_COMPASS_AK8963) + { + .type = "ak8963", + .addr = 0x0d, + .flags = 0, + .irq = RK30_PIN3_PD7, + .platform_data = &akm8963_info, + }, +#endif #if defined (CONFIG_GYRO_L3G4200D) { .type = "l3g4200d_gryo",