[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20080117122431.GA32133@srcf.ucam.org>
Date: Thu, 17 Jan 2008 12:24:31 +0000
From: Matthew Garrett <mjg59@...f.ucam.org>
To: Zhang Rui <rui.zhang@...el.com>
Cc: lenb@...nel.org, linux-acpi@...r.kernel.org,
linux-pm@...ts.linux-foundation.org, linux-kernel@...r.kernel.org,
sujith.thomas@...el.com
Subject: Re: [PATCH 6/10] ACPI: register ACPI Video LCD as generic thermal cooling device
On Thu, Jan 17, 2008 at 03:51:22PM +0800, Zhang Rui wrote:
> From: Zhang Rui <rui.zhang@...el.com>
>
> Register ACPI video device as thermal cooling devices as they may be listed
> in _TZD method and the backlight control can be used for throttling.
I'm worried to some extent about how ungeneric this is. A thermal zone
may cover any devices, not just processor and video ones. Perhaps this
should be added to the acpi_device struct instead, and then let
individual drivers implement whatever callbacks are appropriate?
> +static int
> +video_set_cur_state(struct thermal_cooling_device *cdev, unsigned int state)
> +{
> + struct acpi_device *device = cdev->devdata;
> + struct acpi_video_device *video = acpi_driver_data(device);
> + int level;
> +
> + if ( state >= video->brightness->count - 2)
> + return -EINVAL;
> +
> + state = video->brightness->count - state;
> + level = video->brightness->levels[state -1];
> + return acpi_video_device_lcd_set_level(video, level);
This all seems like duplication of the backlight interface?
(Speaking of which - Len, what's happening with my patches to the video
driver? Some feedback would be nice)
--
Matthew Garrett | mjg59@...f.ucam.org
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists