ARM: SAMSUNG: Additional code with standby mode
Subsystems (3)
PATCH 1/1 ARM: SAMSUNG: Additional code with standby mode
From: Dongsoo Ha <[email protected]>
ADC device support standby mode that is activated when TSSEL by '0' and STANBY by '1' bits are set in TSADCCON0 register. ADC operations are halt itself and hold TSDATXn(Yn) values. It has been having power saving effect since it works.
Signed-off-by Dongsoo Ha <[email protected]>
Signed-off-by Huisung Kang <[email protected]>
--- arch/arm/plat-samsung/adc.c | 7 +++++++ 1 files changed, 7 insertions(+), 0 deletions(-)
arch/arm/plat-samsung/adc.c +7 -0
@@ -104,6 +104,7 @@ static inline void s3c_adc_select(struct adc_device *adc, con &= ~S3C2410_ADCCON_MUXMASK ; con &= ~S3C2410_ADCCON_STDBM ; con &= ~S3C2410_ADCCON_STARTMASK ; + con |=S3C2410_ADCCON_PRSCEN ;if (!client->is_ts) {if (cpu ==TYPE_ADCV3 )
@@ -129,6 +130,7 @@ static void s3c_adc_dbgshow(struct adc_device *adc)static void s3c_adc_try (struct adc_device *adc) {struct s3c_adc_client *next = adc->ts_pend; +unsigned int con =readl (adc->regs +S3C2410_ADCCON );if (!next && !list_empty (&adc_pending)) { next = list_first_entry(&adc_pending,
@@ -143,6 +145,10 @@ static void s3c_adc_try(struct adc_device *adc)s3c_adc_select (adc, next);s3c_adc_convert (adc);s3c_adc_dbgshow (adc); + }else { + con &= ~S3C2410_ADCCON_PRSCEN ; + con |=S3C2410_ADCCON_STDBM ; +writel (con, adc->regs +S3C2410_ADCCON ); } }
@@ -409,6 +415,7 @@ static int s3c_adc_probe(struct platform_device *pdev)if (cpu ==TYPE_ADCV2 || cpu ==TYPE_ADCV3 ) tmp |=S3C64XX_ADCCON_RESSEL ; + tmp |=S3C2410_ADCCON_STDBM ;writel (tmp, adc->regs +S3C2410_ADCCON );dev_info (dev,"attached adc driver\n" );
Signature · 1 line
1.7.1