From: Matthew Garrett <mjg59@srcf.ucam.org>
To: Zhang Rui <rui.zhang@intel.com>
Cc: lenb@kernel.org, linux-acpi@vger.kernel.org,
linux-pm@lists.linux-foundation.org,
linux-kernel@vger.kernel.org, sujith.thomas@intel.com
Subject: Re: [PATCH 6/10] ACPI: register ACPI Video LCD as generic thermal cooling device
Date: Thu, 17 Jan 2008 12:24:31 +0000 [thread overview]
Message-ID: <20080117122431.GA32133@srcf.ucam.org> (raw)
In-Reply-To: <1200556282.2935.122.camel@acpi-sony.sh.intel.com>
On Thu, Jan 17, 2008 at 03:51:22PM +0800, Zhang Rui wrote:
> From: Zhang Rui <rui.zhang@intel.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@srcf.ucam.org
next prev parent reply other threads:[~2008-01-17 12:24 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-01-17 7:51 [PATCH 6/10] ACPI: register ACPI Video LCD as generic thermal cooling device Zhang Rui
2008-01-17 12:24 ` Matthew Garrett [this message]
2008-01-18 1:31 ` Zhang Rui
2008-01-18 1:42 ` Matthew Garrett
2008-01-22 8:01 ` Zhang Rui
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20080117122431.GA32133@srcf.ucam.org \
--to=mjg59@srcf.ucam.org \
--cc=lenb@kernel.org \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@lists.linux-foundation.org \
--cc=rui.zhang@intel.com \
--cc=sujith.thomas@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox