From: xkd Date: Thu, 28 Mar 2013 11:28:44 +0000 (+0800) Subject: sync : rk2928 add phonepad support X-Git-Tag: firefly_0821_release~7315 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=d8d182aa526f1de1414a4369c2e3b1d29b7b8bfd;p=firefly-linux-kernel-4.4.55.git sync : rk2928 add phonepad support commit:72d981d8fde265a5b3768be98f4ee1ed1778b19d --- diff --git a/arch/arm/mach-rk2928/board-rk2926-sdk.c b/arch/arm/mach-rk2928/board-rk2926-sdk.c index dffaa1ea1949..4f409d337c36 100755 --- a/arch/arm/mach-rk2928/board-rk2926-sdk.c +++ b/arch/arm/mach-rk2928/board-rk2926-sdk.c @@ -55,6 +55,10 @@ #include "../../../drivers/spi/rk29_spim.h" #endif +#ifdef CONFIG_SND_SOC_RK2928 +#include "../../../sound/soc/codecs/rk2928_codec.h" +#endif + #include "board-rk2928-sdk-camera.c" #include "board-rk2928-sdk-key.c" @@ -809,6 +813,17 @@ struct rk29_sdmmc_platform_data default_sdmmc1_data = { #ifdef CONFIG_SND_SOC_RK2928 +static int hpctl_io_init(void) +{ + int ret = 0; + return ret; +} + +struct rk2928_codec_pdata rk2928_codec_pdata_info={ + .hpctl = INVALID_GPIO, + .hpctl_io_init = hpctl_io_init, +}; + static struct resource resources_acodec[] = { { .start = RK2928_ACODEC_PHYS, @@ -827,6 +842,9 @@ static struct platform_device device_acodec = { .id = -1, .num_resources = ARRAY_SIZE(resources_acodec), .resource = resources_acodec, + .dev = { + .platform_data = &rk2928_codec_pdata_info, + } }; #endif diff --git a/arch/arm/mach-rk2928/board-rk2928-a720.c b/arch/arm/mach-rk2928/board-rk2928-a720.c index c93d9e375a1c..f99dddf1926c 100755 --- a/arch/arm/mach-rk2928/board-rk2928-a720.c +++ b/arch/arm/mach-rk2928/board-rk2928-a720.c @@ -55,6 +55,10 @@ #include "../../../drivers/spi/rk29_spim.h" #endif +#ifdef CONFIG_SND_SOC_RK2928 +#include "../../../sound/soc/codecs/rk2928_codec.h" +#endif + #include "board-rk2928-a720-camera.c" #include "board-rk2928-a720-key.c" @@ -584,6 +588,17 @@ struct rk29_sdmmc_platform_data default_sdmmc0_data = { #endif // CONFIG_SDMMC0_RK29 #ifdef CONFIG_SND_SOC_RK2928 +static int hpctl_io_init(void) +{ + int ret=0; + return ret; +} + +struct rk2928_codec_pdata rk2928_codec_pdata_info={ + .hpctl = INVALID_GPIO, + .hpctl_io_init = hpctl_io_init, +}; + static struct resource resources_acodec[] = { { .start = RK2928_ACODEC_PHYS, @@ -602,6 +617,9 @@ static struct platform_device device_acodec = { .id = -1, .num_resources = ARRAY_SIZE(resources_acodec), .resource = resources_acodec, + .dev = { + .platform_data = &rk2928_codec_pdata_info, + } }; #endif diff --git a/arch/arm/mach-rk2928/board-rk2928-sdk.c b/arch/arm/mach-rk2928/board-rk2928-sdk.c index ac25fa49f4f4..62c15bdc5cf3 100755 --- a/arch/arm/mach-rk2928/board-rk2928-sdk.c +++ b/arch/arm/mach-rk2928/board-rk2928-sdk.c @@ -55,6 +55,10 @@ #include "../../../drivers/spi/rk29_spim.h" #endif +#ifdef CONFIG_SND_SOC_RK2928 +#include "../../../sound/soc/codecs/rk2928_codec.h" +#endif + #include "board-rk2928-sdk-camera.c" #include "board-rk2928-sdk-key.c" @@ -822,6 +826,17 @@ static struct platform_device device_mt6622 = { #endif #ifdef CONFIG_SND_SOC_RK2928 +static int hpctl_io_init(void) +{ + int ret = 0; + return ret; +} + +struct rk2928_codec_pdata rk2928_codec_pdata_info={ + .hpctl = INVALID_GPIO, + .hpctl_io_init = hpctl_io_init, +}; + static struct resource resources_acodec[] = { { .start = RK2928_ACODEC_PHYS, @@ -840,6 +855,9 @@ static struct platform_device device_acodec = { .id = -1, .num_resources = ARRAY_SIZE(resources_acodec), .resource = resources_acodec, + .dev = { + .platform_data = &rk2928_codec_pdata_info, + } }; #endif diff --git a/arch/arm/mach-rk2928/board-rk2928-tb.c b/arch/arm/mach-rk2928/board-rk2928-tb.c index e710a96b1c33..ef2b64de70ae 100755 --- a/arch/arm/mach-rk2928/board-rk2928-tb.c +++ b/arch/arm/mach-rk2928/board-rk2928-tb.c @@ -53,6 +53,11 @@ #if defined(CONFIG_SPIM_RK29) #include "../../../drivers/spi/rk29_spim.h" #endif + +#ifdef CONFIG_SND_SOC_RK2928 +#include "../../../sound/soc/codecs/rk2928_codec.h" +#endif + #if defined(CONFIG_GPS_RK) #include "../../../drivers/misc/gps/rk_gps/rk_gps.h" #endif @@ -685,6 +690,17 @@ static struct platform_device device_rfkill_rk = { #endif #ifdef CONFIG_SND_SOC_RK2928 +static int hpctl_io_init(void) +{ + int ret=0; + return ret; +} + +struct rk2928_codec_pdata rk2928_codec_pdata_info={ + .hpctl = INVALID_GPIO, + .hpctl_io_init = hpctl_io_init, +}; + static struct resource resources_acodec[] = { { .start = RK2928_ACODEC_PHYS, @@ -708,6 +724,9 @@ static struct platform_device device_acodec = { .id = -1, .num_resources = ARRAY_SIZE(resources_acodec), .resource = resources_acodec, + .dev = { + .platform_data = &rk2928_codec_pdata_info, + } }; #endif