linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] backlight: pandora_bl: Change TWL4030_MODULE_PWM0 to TWL_MODULE_PWM
@ 2012-11-14 11:16 Peter Ujfalusi
  2012-11-15  0:46 ` Jingoo Han
  0 siblings, 1 reply; 2+ messages in thread
From: Peter Ujfalusi @ 2012-11-14 11:16 UTC (permalink / raw)
  To: Richard Purdie, Florian Tobias Schandinat
  Cc: linux-fbdev, linux-kernel, Grazvydas Ignotas

TWL_MODULE_PWM is defined as:
#define TWL_MODULE_PWM		TWL4030_MODULE_PWM0

Use the common module ID define here which will facilitate the upcoming
twl-core cleanup.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
---
 drivers/video/backlight/pandora_bl.c | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/drivers/video/backlight/pandora_bl.c b/drivers/video/backlight/pandora_bl.c
index 4ec3074..633b0a2 100644
--- a/drivers/video/backlight/pandora_bl.c
+++ b/drivers/video/backlight/pandora_bl.c
@@ -71,8 +71,7 @@ static int pandora_backlight_update_status(struct backlight_device *bl)
 		 * set PWM duty cycle to max. TPS61161 seems to use this
 		 * to calibrate it's PWM sensitivity when it starts.
 		 */
-		twl_i2c_write_u8(TWL4030_MODULE_PWM0, MAX_VALUE,
-					TWL_PWM0_OFF);
+		twl_i2c_write_u8(TWL_MODULE_PWM, MAX_VALUE, TWL_PWM0_OFF);
 
 		/* first enable clock, then PWM0 out */
 		twl_i2c_read_u8(TWL4030_MODULE_INTBR, &r, TWL_INTBR_GPBR1);
@@ -90,8 +89,7 @@ static int pandora_backlight_update_status(struct backlight_device *bl)
 		usleep_range(2000, 10000);
 	}
 
-	twl_i2c_write_u8(TWL4030_MODULE_PWM0, MIN_VALUE + brightness,
-				TWL_PWM0_OFF);
+	twl_i2c_write_u8(TWL_MODULE_PWM, MIN_VALUE + brightness, TWL_PWM0_OFF);
 
 done:
 	if (brightness != 0)
@@ -132,7 +130,7 @@ static int pandora_backlight_probe(struct platform_device *pdev)
 	platform_set_drvdata(pdev, bl);
 
 	/* 64 cycle period, ON position 0 */
-	twl_i2c_write_u8(TWL4030_MODULE_PWM0, 0x80, TWL_PWM0_ON);
+	twl_i2c_write_u8(TWL_MODULE_PWM, 0x80, TWL_PWM0_ON);
 
 	bl->props.state |= PANDORABL_WAS_OFF;
 	bl->props.brightness = MAX_USER_VALUE;
-- 
1.8.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* RE: [PATCH] backlight: pandora_bl: Change TWL4030_MODULE_PWM0 to TWL_MODULE_PWM
  2012-11-14 11:16 [PATCH] backlight: pandora_bl: Change TWL4030_MODULE_PWM0 to TWL_MODULE_PWM Peter Ujfalusi
@ 2012-11-15  0:46 ` Jingoo Han
  0 siblings, 0 replies; 2+ messages in thread
From: Jingoo Han @ 2012-11-15  0:46 UTC (permalink / raw)
  To: 'Peter Ujfalusi', 'Andrew Morton'
  Cc: 'Richard Purdie', 'Florian Tobias Schandinat',
	linux-fbdev, linux-kernel, 'Grazvydas Ignotas'

On Wednesday, November 14, 2012 8:16 PM Peter Ujfalusi wrote
> 
> TWL_MODULE_PWM is defined as:
> #define TWL_MODULE_PWM		TWL4030_MODULE_PWM0
> 
> Use the common module ID define here which will facilitate the upcoming
> twl-core cleanup.
> 
> Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>

CC'ed Andrew Morton

It looks good.

Acked-by: Jingoo Han <jg1.han@samsung.com>


> ---
>  drivers/video/backlight/pandora_bl.c | 8 +++-----
>  1 file changed, 3 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/video/backlight/pandora_bl.c b/drivers/video/backlight/pandora_bl.c
> index 4ec3074..633b0a2 100644
> --- a/drivers/video/backlight/pandora_bl.c
> +++ b/drivers/video/backlight/pandora_bl.c
> @@ -71,8 +71,7 @@ static int pandora_backlight_update_status(struct backlight_device *bl)
>  		 * set PWM duty cycle to max. TPS61161 seems to use this
>  		 * to calibrate it's PWM sensitivity when it starts.
>  		 */
> -		twl_i2c_write_u8(TWL4030_MODULE_PWM0, MAX_VALUE,
> -					TWL_PWM0_OFF);
> +		twl_i2c_write_u8(TWL_MODULE_PWM, MAX_VALUE, TWL_PWM0_OFF);
> 
>  		/* first enable clock, then PWM0 out */
>  		twl_i2c_read_u8(TWL4030_MODULE_INTBR, &r, TWL_INTBR_GPBR1);
> @@ -90,8 +89,7 @@ static int pandora_backlight_update_status(struct backlight_device *bl)
>  		usleep_range(2000, 10000);
>  	}
> 
> -	twl_i2c_write_u8(TWL4030_MODULE_PWM0, MIN_VALUE + brightness,
> -				TWL_PWM0_OFF);
> +	twl_i2c_write_u8(TWL_MODULE_PWM, MIN_VALUE + brightness, TWL_PWM0_OFF);
> 
>  done:
>  	if (brightness != 0)
> @@ -132,7 +130,7 @@ static int pandora_backlight_probe(struct platform_device *pdev)
>  	platform_set_drvdata(pdev, bl);
> 
>  	/* 64 cycle period, ON position 0 */
> -	twl_i2c_write_u8(TWL4030_MODULE_PWM0, 0x80, TWL_PWM0_ON);
> +	twl_i2c_write_u8(TWL_MODULE_PWM, 0x80, TWL_PWM0_ON);
> 
>  	bl->props.state |= PANDORABL_WAS_OFF;
>  	bl->props.brightness = MAX_USER_VALUE;
> --
> 1.8.0
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-fbdev" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-11-15  0:46 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-11-14 11:16 [PATCH] backlight: pandora_bl: Change TWL4030_MODULE_PWM0 to TWL_MODULE_PWM Peter Ujfalusi
2012-11-15  0:46 ` Jingoo Han

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).