From d55e29e52e04424a3a7f591133cb877237bbe929 Mon Sep 17 00:00:00 2001 From: root Date: Thu, 28 Apr 2011 12:17:03 +0800 Subject: [PATCH] xxm FIH:update fih(recommit some file) --- arch/arm/configs/rk29_FIH_defconfig | 55 ++++++++++++++++++++++++----- arch/arm/mach-rk29/board-rk29-fih.c | 50 ++++++++++++++++++++++++++ arch/arm/mach-rk29/devices.c | 9 +++++ arch/arm/mach-rk29/devices.h | 4 ++- drivers/video/backlight/Kconfig | 6 ++++ drivers/video/backlight/Makefile | 1 + 6 files changed, 116 insertions(+), 9 deletions(-) diff --git a/arch/arm/configs/rk29_FIH_defconfig b/arch/arm/configs/rk29_FIH_defconfig index fe42a47f66b5..7c9ff01faf68 100644 --- a/arch/arm/configs/rk29_FIH_defconfig +++ b/arch/arm/configs/rk29_FIH_defconfig @@ -1,7 +1,7 @@ # # Automatically generated make config: don't edit # Linux kernel version: 2.6.32.27 -# Tue Apr 26 18:33:17 2011 +# Thu Apr 28 11:04:44 2011 # CONFIG_ARM=y CONFIG_SYS_SUPPORTS_APM_EMULATION=y @@ -356,8 +356,8 @@ CONFIG_WAKELOCK_STAT=y CONFIG_USER_WAKELOCK=y CONFIG_EARLYSUSPEND=y # CONFIG_NO_USER_SPACE_SCREEN_ACCESS_CONTROL is not set -# CONFIG_CONSOLE_EARLYSUSPEND is not set -CONFIG_FB_EARLYSUSPEND=y +CONFIG_CONSOLE_EARLYSUSPEND=y +# CONFIG_FB_EARLYSUSPEND is not set # CONFIG_APM_EMULATION is not set # CONFIG_PM_RUNTIME is not set CONFIG_ARCH_SUSPEND_POSSIBLE=y @@ -603,6 +603,7 @@ CONFIG_APANIC=y CONFIG_APANIC_PLABEL="kpanic" # CONFIG_STE is not set # CONFIG_MTK23D is not set +# CONFIG_FM580X is not set # CONFIG_C2PORT is not set # @@ -612,7 +613,8 @@ CONFIG_APANIC_PLABEL="kpanic" # CONFIG_EEPROM_LEGACY is not set # CONFIG_EEPROM_MAX6875 is not set # CONFIG_EEPROM_93CX6 is not set -# CONFIG_RK29_SUPPORT_MODEM is not set +CONFIG_RK29_SUPPORT_MODEM=y +CONFIG_MODEM_ROCKCHIP_DEMO=y CONFIG_RK29_GPS=y # CONFIG_GPS_GNS7560 is not set @@ -768,8 +770,20 @@ CONFIG_BCM4329=y # CONFIG_USB_USBNET is not set # CONFIG_USB_HSO is not set # CONFIG_WAN is not set -# CONFIG_PPP is not set +CONFIG_PPP=y +CONFIG_PPP_MULTILINK=y +CONFIG_PPP_FILTER=y +CONFIG_PPP_ASYNC=y +CONFIG_PPP_SYNC_TTY=y +CONFIG_PPP_DEFLATE=y +CONFIG_PPP_BSDCOMP=y +CONFIG_PPP_MPPE=y +CONFIG_PPPOE=y +CONFIG_PPPOL2TP=y +CONFIG_PPPOLAC=y +CONFIG_PPPOPNS=y # CONFIG_SLIP is not set +CONFIG_SLHC=y # CONFIG_NETCONSOLE is not set # CONFIG_NETPOLL is not set # CONFIG_NET_POLL_CONTROLLER is not set @@ -874,7 +888,7 @@ CONFIG_CM3202=y # Character devices # CONFIG_VT=y -# CONFIG_CONSOLE_TRANSLATIONS is not set +CONFIG_CONSOLE_TRANSLATIONS=y CONFIG_VT_CONSOLE=y CONFIG_HW_CONSOLE=y # CONFIG_VT_HW_CONSOLE_BINDING is not set @@ -1096,6 +1110,7 @@ CONFIG_SOC_CAMERA=y # CONFIG_SOC_CAMERA_MT9T031 is not set CONFIG_SOC_CAMERA_MT9P111=y # CONFIG_SOC_CAMERA_MT9D112 is not set +# CONFIG_SOC_CAMERA_MT9D113 is not set # CONFIG_SOC_CAMERA_MT9V022 is not set # CONFIG_SOC_CAMERA_TW9910 is not set # CONFIG_SOC_CAMERA_PLATFORM is not set @@ -1108,6 +1123,15 @@ CONFIG_SOC_CAMERA_MT9P111=y # CONFIG_SOC_CAMERA_OV5642 is not set # CONFIG_SOC_CAMERA_OV5640 is not set CONFIG_SOC_CAMERA_S5K6AA=y +# CONFIG_SOC_CAMERA_GT2005 is not set +# CONFIG_SOC_CAMERA_GC0308 is not set +# CONFIG_SOC_CAMERA_GC0309 is not set +# CONFIG_SOC_CAMERA_GC2015 is not set +# CONFIG_SOC_CAMERA_HI253 is not set +# CONFIG_SOC_CAMERA_HI704 is not set +# CONFIG_SOC_CAMERA_SIV120B is not set +# CONFIG_SOC_CAMERA_SID130B is not set +# CONFIG_SOC_CAMERA_NT99250 is not set # CONFIG_VIDEO_SH_MOBILE_CEU is not set CONFIG_VIDEO_RK29=y CONFIG_VIDEO_RK29_WORK_ONEFRAME=y @@ -1219,6 +1243,7 @@ CONFIG_BACKLIGHT_LCD_SUPPORT=y CONFIG_BACKLIGHT_CLASS_DEVICE=y # CONFIG_BACKLIGHT_GENERIC is not set CONFIG_BACKLIGHT_RK29_BL=y +CONFIG_FIH_TOUCHKEY_LED=y # # Display device support @@ -1261,7 +1286,20 @@ CONFIG_ANX7150=y # # CONFIG_VGA_CONSOLE is not set CONFIG_DUMMY_CONSOLE=y -# CONFIG_FRAMEBUFFER_CONSOLE is not set +CONFIG_FRAMEBUFFER_CONSOLE=y +# CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY is not set +# CONFIG_FRAMEBUFFER_CONSOLE_ROTATION is not set +CONFIG_FONTS=y +# CONFIG_FONT_8x8 is not set +CONFIG_FONT_8x16=y +# CONFIG_FONT_6x11 is not set +# CONFIG_FONT_7x14 is not set +# CONFIG_FONT_PEARL_8x8 is not set +# CONFIG_FONT_ACORN_8x8 is not set +# CONFIG_FONT_MINI_4x6 is not set +# CONFIG_FONT_SUN8x16 is not set +# CONFIG_FONT_SUN12x22 is not set +# CONFIG_FONT_10x18 is not set CONFIG_LOGO=y # CONFIG_LOGO_LINUX_MONO is not set # CONFIG_LOGO_LINUX_VGA16 is not set @@ -1347,7 +1385,7 @@ CONFIG_USB_OTG_BLACKLIST_HUB=y # # USB Device Class drivers # -# CONFIG_USB_ACM is not set +CONFIG_USB_ACM=y # CONFIG_USB_PRINTER is not set # CONFIG_USB_WDM is not set # CONFIG_USB_TMC is not set @@ -2019,6 +2057,7 @@ CONFIG_CRC32=y # CONFIG_CRC7 is not set # CONFIG_LIBCRC32C is not set CONFIG_ZLIB_INFLATE=y +CONFIG_ZLIB_DEFLATE=y CONFIG_DECOMPRESS_GZIP=y CONFIG_REED_SOLOMON=y CONFIG_REED_SOLOMON_ENC8=y diff --git a/arch/arm/mach-rk29/board-rk29-fih.c b/arch/arm/mach-rk29/board-rk29-fih.c index dc918b6d4f3c..e4a70308a16d 100755 --- a/arch/arm/mach-rk29/board-rk29-fih.c +++ b/arch/arm/mach-rk29/board-rk29-fih.c @@ -1591,6 +1591,53 @@ struct rk29_bl_info rk29_bl_info = { .pwm_resume = rk29_backlight_pwm_resume, }; #endif + +#ifdef CONFIG_FIH_TOUCHKEY_LED +#define FIH_TOUCHKEY_LED_PWM_ID 1 +#define FIH_TOUCHKEY_LED_PWM_MUX_NAME GPIO5D2_PWM1_UART1SIRIN_NAME +#define FIH_TOUCHKEY_LED_PWM_MUX_MODE GPIO5H_PWM1 +#define FIH_TOUCHKEY_LED_PWM_MUX_MODE_GPIO GPIO5H_GPIO5D2 +#define FIH_TOUCHKEY_LED_PWM_GPIO RK29_PIN5_PD2 +#define FIH_TOUCHKEY_LED_PWM_EFFECT_VALUE 0 + +static int fih_touchkey_led_io_init(void) +{ + rk29_mux_api_set(FIH_TOUCHKEY_LED_PWM_MUX_NAME, FIH_TOUCHKEY_LED_PWM_MUX_MODE); +} +static int fih_touchkey_led_io_deinit(void) +{ + rk29_mux_api_set(FIH_TOUCHKEY_LED_PWM_MUX_NAME, FIH_TOUCHKEY_LED_PWM_MUX_MODE_GPIO); +} + +static int fih_touchkey_led_pwm_suspend(void) +{ + int ret = 0; + rk29_mux_api_set(FIH_TOUCHKEY_LED_PWM_MUX_NAME, FIH_TOUCHKEY_LED_PWM_MUX_MODE_GPIO); + if (ret = gpio_request(FIH_TOUCHKEY_LED_PWM_GPIO, NULL)) { + printk("func %s, line %d: request gpio fail\n", __FUNCTION__, __LINE__); + return -1; + } + gpio_direction_output(FIH_TOUCHKEY_LED_PWM_GPIO, GPIO_HIGH); + return ret; +} + +static int fih_touchkey_led_pwm_resume(void) +{ + gpio_free(FIH_TOUCHKEY_LED_PWM_GPIO); + rk29_mux_api_set(FIH_TOUCHKEY_LED_PWM_MUX_NAME, FIH_TOUCHKEY_LED_PWM_MUX_MODE); + return 0; +} + +struct rk29_bl_info fih_touchkey_led_info = { + .pwm_id = FIH_TOUCHKEY_LED_PWM_ID, + .bl_ref = FIH_TOUCHKEY_LED_PWM_EFFECT_VALUE, + .io_init = fih_touchkey_led_io_init, + .io_deinit = fih_touchkey_led_io_deinit, + .pwm_suspend = fih_touchkey_led_pwm_suspend, + .pwm_resume = fih_touchkey_led_pwm_resume, +}; +#endif + /***************************************************************************************** * pwm voltage regulator devices ******************************************************************************************/ @@ -2144,6 +2191,9 @@ static struct platform_device *devices[] __initdata = { #ifdef CONFIG_ANDROID_TIMED_GPIO &rk29_device_vibrator, #endif +#ifdef CONFIG_FIH_TOUCHKEY_LED + &fih_touchkey_led, +#endif }; /***************************************************************************************** diff --git a/arch/arm/mach-rk29/devices.c b/arch/arm/mach-rk29/devices.c index fc2258670367..884662077b02 100755 --- a/arch/arm/mach-rk29/devices.c +++ b/arch/arm/mach-rk29/devices.c @@ -178,6 +178,15 @@ struct platform_device rk29_device_backlight = { } }; #endif +#ifdef CONFIG_FIH_TOUCHKEY_LED +struct platform_device fih_touchkey_led = { + .name = "fih_touchkey_led", + .id = -1, + .dev = { + .platform_data = &fih_touchkey_led_info, + } +}; +#endif #ifdef CONFIG_SDMMC0_RK29 #ifndef CONFIG_EMMC_RK29 static struct resource resources_sdmmc0[] = { diff --git a/arch/arm/mach-rk29/devices.h b/arch/arm/mach-rk29/devices.h index b6e2c8033524..11666dc407e0 100755 --- a/arch/arm/mach-rk29/devices.h +++ b/arch/arm/mach-rk29/devices.h @@ -49,8 +49,10 @@ extern struct platform_device rk29_device_sdmmc0; extern struct platform_device rk29_device_sdmmc1; extern struct platform_device rk29_device_adc; extern struct platform_device rk29_device_vmac; -extern struct rk29_bl_info rk29_bl_info; +extern struct rk29_bl_info rk29_bl_info; extern struct platform_device rk29_device_backlight; +extern struct rk29_bl_info fih_touchkey_led_info; +extern struct platform_device fih_touchkey_led; extern struct platform_device rk29_device_usb20_otg; extern struct platform_device rk29_device_usb20_host; extern struct platform_device rk29_device_usb11_host; diff --git a/drivers/video/backlight/Kconfig b/drivers/video/backlight/Kconfig index bb85a9067202..53ee0f5d2e6a 100644 --- a/drivers/video/backlight/Kconfig +++ b/drivers/video/backlight/Kconfig @@ -275,3 +275,9 @@ config BACKLIGHT_RK29_BL default y help rk29 backlight support. +config FIH_TOUCHKEY_LED + bool "fih touch key led driver" + depends on BACKLIGHT_CLASS_DEVICE && ARCH_RK29 + default y + help + fih touch key led support. diff --git a/drivers/video/backlight/Makefile b/drivers/video/backlight/Makefile index 096d9731d907..b25c53105840 100644 --- a/drivers/video/backlight/Makefile +++ b/drivers/video/backlight/Makefile @@ -30,3 +30,4 @@ obj-$(CONFIG_BACKLIGHT_ADX) += adx_bl.o obj-$(CONFIG_BACKLIGHT_ADP5520) += adp5520_bl.o obj-$(CONFIG_BACKLIGHT_RK2818_BL) += rk2818_backlight.o obj-$(CONFIG_BACKLIGHT_RK29_BL) += rk29_backlight.o +obj-$(CONFIG_FIH_TOUCHKEY_LED) += fih_touchkey_led.o -- 2.34.1