[PATCH] s3c2440-resume.patch

Arnaud Patard (Rtp) arnaud.patard at rtp-net.org
Wed May 23 09:49:50 CEST 2007


matt_hsu <matt_hsu at openmoko.org> writes:

> Hi all,

Hi,

>
> I thought the simplest correction is to set GPG[15:13] as input during
> s3c2410_ts suspending. 
>
> And I do the patch and test it. Suspend/resume procedure is OK. TS
> module worked quite fine after suspend/resume cycle. 
>
> Like Harald said, I can't sure whether this is an elegant approach.
> Let me know your opinion.


imho should be a runtime check not a compile time. A generic kernel for
samsung SoCs should work on all SoCs, the  difference being done thanks
to the machine number.

Arnaud

>
> Cheers,
>
> Matt
>
> Index: linux-2.6.21/drivers/input/touchscreen/s3c2410_ts.c
> ===================================================================
> --- linux-2.6.21.orig/drivers/input/touchscreen/s3c2410_ts.c	2007-05-23 14:13:53.000000000 +0800
> +++ linux-2.6.21/drivers/input/touchscreen/s3c2410_ts.c	2007-05-23 14:19:18.000000000 +0800
> @@ -333,6 +333,14 @@
>  
>  	clk_disable(adc_clock);
>  
> +#if defined(CONFIG_CPU_S3C2440)
> +
> +	/* GPG[15:13] must be set as input for starting up after wakeup from sleep mode. */
> +	s3c2410_gpio_cfgpin(S3C2410_GPG13, S3C2410_GPG13_INP);
> +	s3c2410_gpio_cfgpin(S3C2410_GPG14, S3C2410_GPG14_INP);
> +	s3c2410_gpio_cfgpin(S3C2410_GPG15, S3C2410_GPG15_INP);
> +
> +#endif
>  	return 0;
>  }
>  
> @@ -359,6 +367,13 @@
>  
>  	writel(WAIT4INT(0), base_addr+S3C2410_ADCTSC);
>  
> +#if defined(CONFIG_CPU_S3C2440)
> +
> +	s3c2410_gpio_cfgpin(S3C2410_GPG13, S3C2410_GPG13_nXPON);
> +	s3c2410_gpio_cfgpin(S3C2410_GPG14, S3C2410_GPG14_YMON);
> +	s3c2410_gpio_cfgpin(S3C2410_GPG15, S3C2410_GPG15_nYPON);
> +
> +#endif
>  	return 0;
>  }
>  





More information about the openmoko-kernel mailing list