Google
  Web www.spinics.net

Re: [PATCH 2/2] use symbolic names for spitz/pxa GPIOs (ported resend)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]


Mark Brown wrote:> On Wed, Jul 23, 2008 at 04:26:59PM +0200, Stanislav Brabec wrote:> > > Attached patch improves code readability by using symbolic names instead> > of numbers.> > This appears to miss at least sound/soc/pxa/pxa2xx-ac97.c, it'd be nice> to sweep that up too if this is going in.
Here is an addition to the previous patch (both should be applied).
sound/soc/pxa/pxa2xx-ac97.c and sound/arm/pxa2xx-ac97.c look verysimilar.
spitz-generic-names-2.patch
Signed-off-by: Stanislav Brabec <sbrabec@xxxxxxx>
diff --git a/sound/soc/pxa/pxa2xx-ac97.c b/sound/soc/pxa/pxa2xx-ac97.cindex 059af81..4ce9205 100644--- a/sound/soc/pxa/pxa2xx-ac97.c+++ b/sound/soc/pxa/pxa2xx-ac97.c@@ -142,10 +142,10 @@ static void pxa2xx_ac97_warm_reset(struct snd_ac97 *ac97) #ifdef CONFIG_PXA27x 	/* warm reset broken on Bulverde, 	   so manually keep AC97 reset high */-	pxa_gpio_mode(113 | GPIO_OUT | GPIO_DFLT_HIGH);+	pxa_gpio_mode(GPIO113_AC97_RESET_N | GPIO_OUT | GPIO_DFLT_HIGH); 	udelay(10); 	GCR |= GCR_WARM_RST;-	pxa_gpio_mode(113 | GPIO_ALT_FN_2_OUT);+	pxa_gpio_mode(GPIO113_AC97_RESET_N_MD); 	udelay(500); #elif defined(CONFIG_PXA3xx) 	/* Can't use interrupts */@@ -299,7 +299,7 @@ static int pxa2xx_ac97_resume(struct platform_device *pdev, 	pxa_gpio_mode(GPIO29_SDATA_IN_AC97_MD); #ifdef CONFIG_PXA27x 	/* Use GPIO 113 as AC97 Reset on Bulverde */-	pxa_gpio_mode(113 | GPIO_ALT_FN_2_OUT);+	pxa_gpio_mode(GPIO113_AC97_RESET_N_MD); #endif 	clk_enable(ac97_clk); 	return 0;@@ -325,7 +325,7 @@ static int pxa2xx_ac97_probe(struct platform_device *pdev, 	pxa_gpio_mode(GPIO29_SDATA_IN_AC97_MD); #ifdef CONFIG_PXA27x 	/* Use GPIO 113 as AC97 Reset on Bulverde */-	pxa_gpio_mode(113 | GPIO_ALT_FN_2_OUT);+	pxa_gpio_mode(GPIO113_AC97_RESET_N_MD);  	ac97conf_clk = clk_get(&pdev->dev, "AC97CONFCLK"); 	if (IS_ERR(ac97conf_clk)) {
-- Best Regards / S pozdravem,
Stanislav Brabecsoftware developer---------------------------------------------------------------------SUSE LINUX, s. r. o.                          e-mail: sbrabec@xxxxxxxxxxxxxxxxá 1060/12           tel: +420 284 028 966, +49 911 740538747190 00 Praha 9                                  fax: +420 284 028 951Czech Republic                                    http://www.suse.cz/

-------------------------------------------------------------------List admin: http://lists.arm.linux.org.uk/mailman/listinfo/linux-arm-kernelFAQ:        http://www.arm.linux.org.uk/mailinglists/faq.phpEtiquette:  http://www.arm.linux.org.uk/mailinglists/etiquette.php


[Site Home]     [Linux Arm]     [Fedora ARM]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [PDAs]     [Linux]     [Linux Book List]     [Linux MIPS]     [Yosemite Campsites]     [Photos]

Add to Google Google PageRank Checking tool