From b2ca78717cea921151baf4af5ac9322eacf872c6 Mon Sep 17 00:00:00 2001 From: Kukjin Kim Date: Wed, 2 Jan 2013 09:57:59 -0800 Subject: ARM: S3C24XX: make gta02.h local The header can be local in mach-s3c24xx/ and sort out inclusions. Accordingly, the GTA02_ macro in driver can be replaced. Cc: Sangbeom Kim Cc: Mark Brown Signed-off-by: Kukjin Kim --- sound/soc/samsung/neo1973_wm8753.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'sound') diff --git a/sound/soc/samsung/neo1973_wm8753.c b/sound/soc/samsung/neo1973_wm8753.c index c7e965f80d2e..a301d8cfaa34 100644 --- a/sound/soc/samsung/neo1973_wm8753.c +++ b/sound/soc/samsung/neo1973_wm8753.c @@ -237,7 +237,7 @@ static int lm4853_set_spk(struct snd_kcontrol *kcontrol, { gta02_speaker_enabled = ucontrol->value.integer.value[0]; - gpio_set_value(GTA02_GPIO_HP_IN, !gta02_speaker_enabled); + gpio_set_value(S3C2410_GPJ(2), !gta02_speaker_enabled); return 0; } @@ -252,7 +252,7 @@ static int lm4853_get_spk(struct snd_kcontrol *kcontrol, static int lm4853_event(struct snd_soc_dapm_widget *w, struct snd_kcontrol *k, int event) { - gpio_set_value(GTA02_GPIO_AMP_SHUT, SND_SOC_DAPM_EVENT_OFF(event)); + gpio_set_value(S3C2410_GPJ(1), SND_SOC_DAPM_EVENT_OFF(event)); return 0; } @@ -396,8 +396,8 @@ static struct snd_soc_codec_conf neo1973_codec_conf[] = { }; static const struct gpio neo1973_gta02_gpios[] = { - { GTA02_GPIO_HP_IN, GPIOF_OUT_INIT_HIGH, "GTA02_HP_IN" }, - { GTA02_GPIO_AMP_SHUT, GPIOF_OUT_INIT_HIGH, "GTA02_AMP_SHUT" }, + { S3C2410_GPJ(2), GPIOF_OUT_INIT_HIGH, "GTA02_HP_IN" }, + { S3C2410_GPJ(1), GPIOF_OUT_INIT_HIGH, "GTA02_AMP_SHUT" }, }; static struct snd_soc_card neo1973 = { -- cgit v1.2.3-59-g8ed1b From 232910d6bf8d9565a20824aea0d4393b5772e985 Mon Sep 17 00:00:00 2001 From: Kukjin Kim Date: Wed, 2 Jan 2013 10:18:58 -0800 Subject: ARM: S3C24XX: make h1940.h and h1940-latch.h local The headers can be local in mach-s3c24xx/. Signed-off-by: Kukjin Kim --- arch/arm/mach-s3c24xx/h1940-bluetooth.c | 6 +-- arch/arm/mach-s3c24xx/h1940.h | 53 ++++++++++++++++++++++++ arch/arm/mach-s3c24xx/include/mach/h1940-latch.h | 43 ------------------- arch/arm/mach-s3c24xx/include/mach/h1940.h | 24 ----------- arch/arm/mach-s3c24xx/mach-h1940.c | 35 +++++++--------- arch/arm/mach-s3c24xx/mach-rx1950.c | 32 +++++++------- arch/arm/mach-s3c24xx/mach-rx3715.c | 16 +++---- arch/arm/mach-s3c24xx/pm-s3c2410.c | 6 +-- sound/soc/samsung/h1940_uda1380.c | 13 +++--- 9 files changed, 105 insertions(+), 123 deletions(-) create mode 100644 arch/arm/mach-s3c24xx/h1940.h delete mode 100644 arch/arm/mach-s3c24xx/include/mach/h1940-latch.h delete mode 100644 arch/arm/mach-s3c24xx/include/mach/h1940.h (limited to 'sound') diff --git a/arch/arm/mach-s3c24xx/h1940-bluetooth.c b/arch/arm/mach-s3c24xx/h1940-bluetooth.c index 57aee916bdb1..93bdb927df1b 100644 --- a/arch/arm/mach-s3c24xx/h1940-bluetooth.c +++ b/arch/arm/mach-s3c24xx/h1940-bluetooth.c @@ -19,10 +19,10 @@ #include #include -#include #include -#include -#include +#include + +#include "h1940.h" #define DRV_NAME "h1940-bt" diff --git a/arch/arm/mach-s3c24xx/h1940.h b/arch/arm/mach-s3c24xx/h1940.h new file mode 100644 index 000000000000..2950cc466840 --- /dev/null +++ b/arch/arm/mach-s3c24xx/h1940.h @@ -0,0 +1,53 @@ +/* + * Copyright 2006 Ben Dooks + * + * Copyright (c) 2005 Simtec Electronics + * http://armlinux.simtec.co.uk/ + * Ben Dooks + * + * iPAQ H1940 series definitions + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. +*/ + +#ifndef __MACH_S3C24XX_H1940_H +#define __MACH_S3C24XX_H1940_H __FILE__ + +#define H1940_SUSPEND_CHECKSUM (0x30003ff8) +#define H1940_SUSPEND_RESUMEAT (0x30081000) +#define H1940_SUSPEND_CHECK (0x30080000) + +extern void h1940_pm_return(void); +extern int h1940_led_blink_set(unsigned gpio, int state, + unsigned long *delay_on, + unsigned long *delay_off); + +#include + +#define H1940_LATCH_GPIO(x) (S3C_GPIO_END + (x)) + +/* SD layer latch */ + +#define H1940_LATCH_LCD_P0 H1940_LATCH_GPIO(0) +#define H1940_LATCH_LCD_P1 H1940_LATCH_GPIO(1) +#define H1940_LATCH_LCD_P2 H1940_LATCH_GPIO(2) +#define H1940_LATCH_LCD_P3 H1940_LATCH_GPIO(3) +#define H1940_LATCH_MAX1698_nSHUTDOWN H1940_LATCH_GPIO(4) +#define H1940_LATCH_LED_RED H1940_LATCH_GPIO(5) +#define H1940_LATCH_SDQ7 H1940_LATCH_GPIO(6) +#define H1940_LATCH_USB_DP H1940_LATCH_GPIO(7) + +/* CPU layer latch */ + +#define H1940_LATCH_UDA_POWER H1940_LATCH_GPIO(8) +#define H1940_LATCH_AUDIO_POWER H1940_LATCH_GPIO(9) +#define H1940_LATCH_SM803_ENABLE H1940_LATCH_GPIO(10) +#define H1940_LATCH_LCD_P4 H1940_LATCH_GPIO(11) +#define H1940_LATCH_SD_POWER H1940_LATCH_GPIO(12) +#define H1940_LATCH_BLUETOOTH_POWER H1940_LATCH_GPIO(13) +#define H1940_LATCH_LED_GREEN H1940_LATCH_GPIO(14) +#define H1940_LATCH_LED_FLASH H1940_LATCH_GPIO(15) + +#endif /* __MACH_S3C24XX_H1940_H */ diff --git a/arch/arm/mach-s3c24xx/include/mach/h1940-latch.h b/arch/arm/mach-s3c24xx/include/mach/h1940-latch.h deleted file mode 100644 index fc897d3a056c..000000000000 --- a/arch/arm/mach-s3c24xx/include/mach/h1940-latch.h +++ /dev/null @@ -1,43 +0,0 @@ -/* arch/arm/mach-s3c2410/include/mach/h1940-latch.h - * - * Copyright (c) 2005 Simtec Electronics - * http://armlinux.simtec.co.uk/ - * Ben Dooks - * - * iPAQ H1940 series - latch definitions - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as - * published by the Free Software Foundation. -*/ - -#ifndef __ASM_ARCH_H1940_LATCH_H -#define __ASM_ARCH_H1940_LATCH_H - -#include - -#define H1940_LATCH_GPIO(x) (S3C_GPIO_END + (x)) - -/* SD layer latch */ - -#define H1940_LATCH_LCD_P0 H1940_LATCH_GPIO(0) -#define H1940_LATCH_LCD_P1 H1940_LATCH_GPIO(1) -#define H1940_LATCH_LCD_P2 H1940_LATCH_GPIO(2) -#define H1940_LATCH_LCD_P3 H1940_LATCH_GPIO(3) -#define H1940_LATCH_MAX1698_nSHUTDOWN H1940_LATCH_GPIO(4) -#define H1940_LATCH_LED_RED H1940_LATCH_GPIO(5) -#define H1940_LATCH_SDQ7 H1940_LATCH_GPIO(6) -#define H1940_LATCH_USB_DP H1940_LATCH_GPIO(7) - -/* CPU layer latch */ - -#define H1940_LATCH_UDA_POWER H1940_LATCH_GPIO(8) -#define H1940_LATCH_AUDIO_POWER H1940_LATCH_GPIO(9) -#define H1940_LATCH_SM803_ENABLE H1940_LATCH_GPIO(10) -#define H1940_LATCH_LCD_P4 H1940_LATCH_GPIO(11) -#define H1940_LATCH_SD_POWER H1940_LATCH_GPIO(12) -#define H1940_LATCH_BLUETOOTH_POWER H1940_LATCH_GPIO(13) -#define H1940_LATCH_LED_GREEN H1940_LATCH_GPIO(14) -#define H1940_LATCH_LED_FLASH H1940_LATCH_GPIO(15) - -#endif /* __ASM_ARCH_H1940_LATCH_H */ diff --git a/arch/arm/mach-s3c24xx/include/mach/h1940.h b/arch/arm/mach-s3c24xx/include/mach/h1940.h deleted file mode 100644 index 2aa683c8d3d6..000000000000 --- a/arch/arm/mach-s3c24xx/include/mach/h1940.h +++ /dev/null @@ -1,24 +0,0 @@ -/* arch/arm/mach-s3c2410/include/mach/h1940.h - * - * Copyright 2006 Ben Dooks - * - * H1940 definitions - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as - * published by the Free Software Foundation. -*/ - -#ifndef __ASM_ARCH_H1940_H -#define __ASM_ARCH_H1940_H - -#define H1940_SUSPEND_CHECKSUM (0x30003ff8) -#define H1940_SUSPEND_RESUMEAT (0x30081000) -#define H1940_SUSPEND_CHECK (0x30080000) - -extern void h1940_pm_return(void); -extern int h1940_led_blink_set(unsigned gpio, int state, - unsigned long *delay_on, unsigned long *delay_off); - - -#endif /* __ASM_ARCH_H1940_H */ diff --git a/arch/arm/mach-s3c24xx/mach-h1940.c b/arch/arm/mach-s3c24xx/mach-h1940.c index e208dda3c759..afc05a7c24a1 100644 --- a/arch/arm/mach-s3c24xx/mach-h1940.c +++ b/arch/arm/mach-s3c24xx/mach-h1940.c @@ -1,5 +1,4 @@ -/* linux/arch/arm/mach-s3c2410/mach-h1940.c - * +/* * Copyright (c) 2003-2005 Simtec Electronics * Ben Dooks * @@ -37,38 +36,36 @@ #include #include +#include +#include #include #include #include -#include -#include -#include - -#include -#include -#include +#include +#include +#include +#include -#include +#include -#include -#include #include -#include -#include +#include +#include +#include +#include -#include #include -#include #include +#include +#include #include #include -#include -#include +#include -#include #include "common.h" +#include "h1940.h" #define H1940_LATCH ((void __force __iomem *)0xF8000000) diff --git a/arch/arm/mach-s3c24xx/mach-rx1950.c b/arch/arm/mach-s3c24xx/mach-rx1950.c index 0606f2faaa5c..bdcfb8bb6811 100644 --- a/arch/arm/mach-s3c24xx/mach-rx1950.c +++ b/arch/arm/mach-s3c24xx/mach-rx1950.c @@ -1,5 +1,4 @@ -/* linux/arch/arm/mach-s3c2440/mach-rx1950.c - * +/* * Copyright (c) 2006-2009 Victor Chukhantsev, Denis Grigoriev, * Copyright (c) 2007-2010 Vasily Khoruzhick * @@ -37,31 +36,32 @@ #include +#include #include #include -#include +#include +#include +#include +#include +#include + +#include + +#include #include #include -#include -#include #include -#include -#include -#include -#include -#include -#include -#include #include -#include +#include #include -#include - -#include +#include +#include +#include #include "common.h" +#include "h1940.h" #define LCD_PWM_PERIOD 192960 #define LCD_PWM_DUTY 127353 diff --git a/arch/arm/mach-s3c24xx/mach-rx3715.c b/arch/arm/mach-s3c24xx/mach-rx3715.c index dacbb9a2122a..b261dd3efd5c 100644 --- a/arch/arm/mach-s3c24xx/mach-rx3715.c +++ b/arch/arm/mach-s3c24xx/mach-rx3715.c @@ -31,27 +31,27 @@ #include #include -#include #include +#include + +#include -#include #include #include -#include +#include +#include #include #include -#include -#include -#include - #include -#include #include +#include #include +#include #include "common.h" +#include "h1940.h" static struct map_desc rx3715_iodesc[] __initdata = { /* dump ISA space somewhere unused */ diff --git a/arch/arm/mach-s3c24xx/pm-s3c2410.c b/arch/arm/mach-s3c24xx/pm-s3c2410.c index 949ae05e07c5..2d82c4f116cd 100644 --- a/arch/arm/mach-s3c24xx/pm-s3c2410.c +++ b/arch/arm/mach-s3c24xx/pm-s3c2410.c @@ -29,16 +29,16 @@ #include #include -#include - #include +#include #include -#include #include #include +#include "h1940.h" + static void s3c2410_pm_prepare(void) { /* ensure at least GSTATUS3 has the resume address */ diff --git a/sound/soc/samsung/h1940_uda1380.c b/sound/soc/samsung/h1940_uda1380.c index 3870e9678b5d..15a3817aa5c8 100644 --- a/sound/soc/samsung/h1940_uda1380.c +++ b/sound/soc/samsung/h1940_uda1380.c @@ -21,7 +21,6 @@ #include #include -#include #include #include "s3c24xx-i2s.h" @@ -147,9 +146,9 @@ static int h1940_spk_power(struct snd_soc_dapm_widget *w, struct snd_kcontrol *kcontrol, int event) { if (SND_SOC_DAPM_EVENT_ON(event)) - gpio_set_value(H1940_LATCH_AUDIO_POWER, 1); + gpio_set_value(S3C_GPIO_END + 9, 1); else - gpio_set_value(H1940_LATCH_AUDIO_POWER, 0); + gpio_set_value(S3C_GPIO_END + 9, 0); return 0; } @@ -233,11 +232,11 @@ static int __init h1940_init(void) return -ENODEV; /* configure some gpios */ - ret = gpio_request(H1940_LATCH_AUDIO_POWER, "speaker-power"); + ret = gpio_request(S3C_GPIO_END + 9, "speaker-power"); if (ret) goto err_out; - ret = gpio_direction_output(H1940_LATCH_AUDIO_POWER, 0); + ret = gpio_direction_output(S3C_GPIO_END + 9, 0); if (ret) goto err_gpio; @@ -258,7 +257,7 @@ static int __init h1940_init(void) err_plat: platform_device_put(s3c24xx_snd_device); err_gpio: - gpio_free(H1940_LATCH_AUDIO_POWER); + gpio_free(S3C_GPIO_END + 9); err_out: return ret; @@ -269,7 +268,7 @@ static void __exit h1940_exit(void) platform_device_unregister(s3c24xx_snd_device); snd_soc_jack_free_gpios(&hp_jack, ARRAY_SIZE(hp_jack_gpios), hp_jack_gpios); - gpio_free(H1940_LATCH_AUDIO_POWER); + gpio_free(S3C_GPIO_END + 9); } module_init(h1940_init); -- cgit v1.2.3-59-g8ed1b