From: <bob...@us...> - 2006-09-29 08:32:34
|
Revision: 595 http://svn.sourceforge.net/hackndev/?rev=595&view=rev Author: bobofdoom Date: 2006-09-29 01:32:23 -0700 (Fri, 29 Sep 2006) Log Message: ----------- All: pxapwm: Fixed missing semicolons, corrected bl assignment and using safety-checked intensity value. Modified Paths: -------------- linux4palm/linux/trunk/drivers/video/backlight/pxapwm_bl.c Modified: linux4palm/linux/trunk/drivers/video/backlight/pxapwm_bl.c =================================================================== --- linux4palm/linux/trunk/drivers/video/backlight/pxapwm_bl.c 2006-09-29 08:23:46 UTC (rev 594) +++ linux4palm/linux/trunk/drivers/video/backlight/pxapwm_bl.c 2006-09-29 08:32:23 UTC (rev 595) @@ -73,16 +73,16 @@ static int stored_intensity; static int pxapwmbl_suspend(struct platform_device *pdev, pm_message_t state) { - struct pxapwmbl_platform_data *bl = class_get_devdata(&bd->class_dev); - stored_intensity = bl->props->brightness; - pxapwmbl_send_intensity(bl, 0) + struct pxapwmbl_platform_data *bl = pdev->dev.platform_data; + stored_intensity = bl->intensity; + pxapwmbl_send_intensity(bl, 0); return 0; } static int pxapwmbl_resume(struct platform_device *pdev) { - struct pxapwmbl_platform_data *bl = class_get_devdata(&bd->class_dev); - pxapwmbl_send_intensity(bl,stored_intensity) + struct pxapwmbl_platform_data *bl = pdev->dev.platform_data; + pxapwmbl_send_intensity(bl,stored_intensity); return 0; } #else @@ -99,6 +99,9 @@ if (intensity > pxapwmbl_data.max_brightness) intensity = pxapwmbl_data.max_brightness; + + if (intensity < 0) + intensity = 0; pxapwmbl_send_intensity(bl, intensity); bl->intensity=intensity; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <far...@us...> - 2006-10-18 07:30:40
|
Revision: 628 http://svn.sourceforge.net/hackndev/?rev=628&view=rev Author: farcaller Date: 2006-10-18 00:30:28 -0700 (Wed, 18 Oct 2006) Log Message: ----------- l4p: PXAPWM PM patch (turns CKEN on) Modified Paths: -------------- linux4palm/linux/trunk/drivers/video/backlight/pxapwm_bl.c Modified: linux4palm/linux/trunk/drivers/video/backlight/pxapwm_bl.c =================================================================== --- linux4palm/linux/trunk/drivers/video/backlight/pxapwm_bl.c 2006-10-18 07:29:08 UTC (rev 627) +++ linux4palm/linux/trunk/drivers/video/backlight/pxapwm_bl.c 2006-10-18 07:30:28 UTC (rev 628) @@ -148,6 +148,7 @@ return PTR_ERR (bl->dev); pxapwmbl_send_intensity(bl, bl->default_intensity); + CKEN = CKEN | (bl->pwm?CKEN1_PWM1:CKEN0_PWM0); bl->intensity = bl->default_intensity; pxapwmbl_limit_intensity(pdev, 0); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <bal...@us...> - 2007-02-27 23:28:54
|
Revision: 888 http://svn.sourceforge.net/hackndev/?rev=888&view=rev Author: balrog-kun Date: 2007-02-27 15:28:53 -0800 (Tue, 27 Feb 2007) Log Message: ----------- l4p: pxapwm-bl API update attempt. Modified Paths: -------------- linux4palm/linux/trunk/drivers/video/backlight/pxapwm_bl.c Modified: linux4palm/linux/trunk/drivers/video/backlight/pxapwm_bl.c =================================================================== --- linux4palm/linux/trunk/drivers/video/backlight/pxapwm_bl.c 2007-02-27 22:02:26 UTC (rev 887) +++ linux4palm/linux/trunk/drivers/video/backlight/pxapwm_bl.c 2007-02-27 23:28:53 UTC (rev 888) @@ -117,7 +117,7 @@ #define pxapwmbl_resume NULL #endif -static int pxapwmbl_set_intensity(struct backlight_device *bd) +static int pxapwmbl_update_status(struct backlight_device *bd) { int intensity; struct pxapwmbl_platform_data *bl = class_get_devdata(&bd->class_dev); @@ -157,8 +157,8 @@ static struct backlight_properties pxapwmbl_data = { .owner = THIS_MODULE, - .get_brightness = pxapwmbl_get_intensity, - .update_status = pxapwmbl_set_intensity, + .get_brightness = pxapwmbl_get_intensity, + .update_status = pxapwmbl_update_status, }; static int pxapwmbl_probe(struct platform_device *pdev) @@ -180,10 +180,12 @@ bl->off_threshold = 5; bl->dev = backlight_device_register ("pxapwm-bl", &pdev->dev, - NULL, &pxapwmbl_data); + bl, &pxapwmbl_data); if (IS_ERR (bl->dev)) return PTR_ERR (bl->dev); + platform_set_drvdata(pdev, bl->dev); + pxapwmbl_send_intensity(bl, bl->default_intensity); CKEN = CKEN | (bl->pwm?CKEN1_PWM1:CKEN0_PWM0); bl->intensity = bl->default_intensity; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |