fix emenlow i2c_transfer error
cover fix emenlow i2c_transfer error
From: Tom Zanussi <[email protected]>
This fixes [YOCTO #310].
Please pull into linux-yocto-3.2.
Thanks,
Tom
The following changes since commit 3ab8e8d9f0e9c2c44b6dbf8df84c0c2b03c4167c:
Tom Zanussi (1):
bsp/emenlow: give up drm_global_mutex on contention in drm_lock()
are available in the git repository at:
git://git.yoctoproject.org/linux-yocto-2.6.37-contrib.git tzanussi/emenlow-i2c-transfer-fix
http://git.yoctoproject.org/cgit.cgi//log/?h=tzanussi/emenlow-i2c-transfer-fix
Tom Zanussi (1):
bsp/emenlow: initialize lvds backlight only if lvds enabled
drivers/gpu/drm-psb/intel_lvds.c | 51 ++++++++++++++++++++----------------- 1 files changed, 28 insertions(+), 23 deletions(-)
PATCH 1/1 bsp/emenlow: initialize lvds backlight only if lvds enabled
From: Tom Zanussi <[email protected]>
intel_lvds_init() initializes the lvds backlight even if the lvds init failed. That doesn't make sense, and causes unnecessary error messages in the kernel log.
Put the backlight init code into a separat function and only call it if the lvds panel was successfully initialized.
--- drivers/gpu/drm-psb/intel_lvds.c | 51 ++++++++++++++++++++----------------- 1 files changed, 28 insertions(+), 23 deletions(-)
drivers/gpu/drm-psb/intel_lvds.c +28 -23
@@ -611,6 +611,33 @@ int intel_get_acpi_dod(char *method)kfree (buffer.pointer);return found; } + +static void intel_lvds_backlight_init (struct drm_device *dev) +{ +if ((blc_type ==BLC_I2C_TYPE ) || (blc_type ==BLC_PWM_TYPE )){ +struct backlight_properties props; +memset (&props,0 ,sizeof (struct backlight_properties )); + props.type =BACKLIGHT_RAW ; +/* add /sys/class/backlight interface as standard */ + psbbl_device =backlight_device_register ("psblvds" , &dev->pdev->dev, dev, &psbbl_ops, &props); +if (psbbl_device){ +#if LINUX_VERSION_CODE <=KERNEL_VERSION (2 ,6 ,20 ) +down (&psbbl_device->sem); + psbbl_device->props->max_brightness =BRIGHTNESS_MAX_LEVEL ; + psbbl_device->props->brightness = lvds_backlight; + psbbl_device->props->power =FB_BLANK_UNBLANK ; + psbbl_device->props->update_status (psbbl_device); +up (&psbbl_device->sem); +#else + psbbl_device->props.max_brightness =BRIGHTNESS_MAX_LEVEL ; + psbbl_device->props.brightness = lvds_backlight; + psbbl_device->props.power =FB_BLANK_UNBLANK ; +backlight_update_status (psbbl_device); +#endif + } + } +} +/** * intel_lvds_init - setup LVDS outputs on this device * @dev: drm device
@@ -802,29 +829,6 @@ void intel_lvds_init(struct drm_device *dev) } } -if ((blc_type ==BLC_I2C_TYPE ) || (blc_type ==BLC_PWM_TYPE )){ -struct backlight_properties props; -memset (&props,0 ,sizeof (struct backlight_properties )); - props.type =BACKLIGHT_RAW ; -/* add /sys/class/backlight interface as standard */ - psbbl_device =backlight_device_register ("psblvds" , &dev->pdev->dev, dev, &psbbl_ops, &props); -if (psbbl_device){ -#if LINUX_VERSION_CODE <=KERNEL_VERSION (2 ,6 ,20 ) -down (&psbbl_device->sem); - psbbl_device->props->max_brightness =BRIGHTNESS_MAX_LEVEL ; - psbbl_device->props->brightness = lvds_backlight; - psbbl_device->props->power =FB_BLANK_UNBLANK ; - psbbl_device->props->update_status (psbbl_device); -up (&psbbl_device->sem); -#else - psbbl_device->props.max_brightness =BRIGHTNESS_MAX_LEVEL ; - psbbl_device->props.brightness = lvds_backlight; - psbbl_device->props.power =FB_BLANK_UNBLANK ; -backlight_update_status (psbbl_device); -#endif - } - } - blc_out:/* Set up the DDC bus. */
@@ -939,6 +943,7 @@ blc_out:#endif out: +intel_lvds_backlight_init (dev);return ; failed:
Signature · 1 line
1.7.0.4
Quoted 5 lines · On 12-04-26 02:48 PM, [email protected] wrote:
From: Tom Zanussi<[email protected]>
This fixes [YOCTO #310].
Please pull into linux-yocto-3.2.
merging. Will push a batch of kernel updates out later today.
Cheers,
Bruce
Quoted 20 lines
Thanks,
Tom
The following changes since commit
3ab8e8d9f0e9c2c44b6dbf8df84c0c2b03c4167c:
Tom Zanussi (1):
bsp/emenlow: give updrm_global_mutexon contention indrm_lock()are available in the git repository at:
git://git.yoctoproject.org/linux-yocto-2.6.37-contrib.gittzanussi/emenlow-i2c-transfer-fix
http://git.yoctoproject.org/cgit.cgi//log/?h=tzanussi/emenlow-i2c-transfer-fixTom Zanussi (1):
bsp/emenlow: initialize lvds backlight only if lvds enableddrivers/gpu/drm-psb/intel_lvds.c | 51 ++++++++++++++++++++----------------- 1 files changed, 28 insertions(+), 23 deletions(-)