From: David Bronaugh <dbronaugh-Jp3n8lUXroSX6QiC4yPwbg@public.gmane.org>
To: Hiroshi Miura <miura-yiisDzvROlQdnm+yROfE0A@public.gmane.org>
Cc: acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org,
letsnote-tech-eXqGM+LsbTTAqL8d+zIrHngSJqDPrsil@public.gmane.org
Subject: Re: [PATCH]Panasonic Hotkey Driver
Date: Sun, 22 Aug 2004 01:27:28 -0700 [thread overview]
Message-ID: <412858F0.8050406@linuxboxen.org> (raw)
In-Reply-To: <41284119.1060504-Jp3n8lUXroSX6QiC4yPwbg@public.gmane.org>
[-- Attachment #1: Type: text/plain, Size: 2924 bytes --]
David Bronaugh wrote:
> Hiroshi Miura wrote:
>
>> At Sat, 21 Aug 2004 01:44:03 -0700,
>> David Bronaugh wrote:
>>
>>
>>> OK, this all makes sense now. It seems like the best way to do
>>> screen brightness setting would be to read fields 2 and 3 from SINF
>>> into internal fields (pcc_max_bright and pcc_min_bright?) to check
>>> user input and make sure it is not outside these bounds.
>>>
>>
>>
>> these are ok?
>>
>> pcc_ac_max_bright
>> pcc_ac_min_bright
>> pcc_dc_max_bright
>> pcc_dc_min_bright
>>
>>
> In my patch, I took off the "pcc" prefix -- I felt it was unnecessary
> because the name the driver uses in /proc/acpi is "pcc".
>
> I also modified the names slightly; if you don't like them, you can
> change them.
>
>>> I don't think it is necessary to adjust (or read) fields 5 6 and 7
>>> -- could you confirm on your R3 that these are not necessary (try
>>> the things I tried on my R1N)? If you can confirm this, we can
>>> simplify the driver to only expose 1 field for the 'brightness'
>>> control.
>>>
>>
>>
>> I think it is necessary to adjuct field 5 6 and 7.
>> This sinf is kept through hibernate/power off and on.
>> BIOS show this field when boot or resume and set brightness according
>> as power state.
>>
>>
>>
>>
> Yes, I noticed that the SINF does persist over reboots.
>
> The attached patch is against Hiroshi's v0.5 code, and does the
> following:
> - gives access (via a simple interface) to all the fields in SINF that
> are available on the person's laptop
> - cleans up the coding style to bring it closer to
> Documentation/CodingStyle guidelines
> - cleans up a few messy spots in the code
> - corrects typographic errors
> - documents some of the stranger SINF fields in the code
> - makes an attempt at cleaning up error messages
> - centralizes data structure definitions at the top of the file
> - removes the global 'sinf' variable (I left the 'num_sifr' variable
> alone)
> - moves the call to acpi_pcc_proc_init to avoid a possible use of
> uninitialized data via the /proc interface
>
> I didn't decide to put code in the driver to make the R1N look like
> all the others; this could be a TODO (though I like having access to
> all 235 brightness levels).
>
> I also haven't really cleaned up the error messages enough --
> hopefully this can happen later. Nor have I unified all the naming
> conventions -- the driver still has an identity crisis (it isn't sure
> if it's ACPI_PCC, pcc_acpi, or HOTKEY).
>
> Someone should run scripts/Lintain on the code, too, to clean up
> inconsistencies.
>
> I have also attached a separate patch which cleans up the in-kernel
> help. Later today (or maybe tomorrow; I'm getting tired) I'll send
> scripts which handle all the hotkey events properly; then these can be
> put up on the website.
>
> David Bronaugh
Gah, I goofed and inverted a check.
Attached is a patch that fixes it.
David Bronaugh
[-- Attachment #2: pcc-0.6.1.patch --]
[-- Type: text/x-patch, Size: 957 bytes --]
--- la-2.6.8.1/drivers/acpi/pcc_acpi.c 2004-08-22 01:21:03.000000000 -0700
+++ linux-2.6.8.1/drivers/acpi/pcc_acpi.c 2004-08-22 01:23:41.000000000 -0700
@@ -20,6 +20,8 @@
*---------------------------------------------------------------------------
*
* ChangeLog:
+ * Aug.21, 2004 David Bronaugh
+ * - v0.6.1 Fix a silly error with status checking
* Aug.20, 2004 David Bronaugh
* - v0.6 Correct brightness controls to reflect reality
* based on information gleaned by Hiroshi Miura
@@ -44,7 +46,7 @@
*
*/
-#define ACPI_PCC_VERSION "0.6"
+#define ACPI_PCC_VERSION "0.6.1"
#include <linux/kernel.h>
#include <linux/module.h>
@@ -427,7 +429,7 @@
int status;
status = read_acpi_int(hotkey->handle, METHOD_HKEY_QUERY, &result);
- if (status > 0) {
+ if (status < 0) {
printk(KERN_INFO LOGPREFIX "error getting hotkey status\n");
} else {
hotkey->status = result;
next prev parent reply other threads:[~2004-08-22 8:27 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-08-19 6:00 [PATCH]Panasonic Hotkey Driver David Bronaugh
[not found] ` <41244219.1090603-Jp3n8lUXroSX6QiC4yPwbg@public.gmane.org>
2004-08-20 2:51 ` Hiroshi Miura
[not found] ` <871xi2s555.wl%miura@da-cha.org>
[not found] ` <871xi2s555.wl%miura-yiisDzvROlQdnm+yROfE0A@public.gmane.org>
2004-08-20 6:25 ` [PATCH]Panasonic Hotkey Driver v0.5 [1/2] Hiroshi Miura
[not found] ` <87vffeqqaq.wl%miura-yiisDzvROlQdnm+yROfE0A@public.gmane.org>
2004-08-20 17:11 ` Len Brown
2004-08-21 1:30 ` [letsnote-tech:00074] " Hiroshi Miura
[not found] ` <87acwqserw.wl%miura-yiisDzvROlQdnm+yROfE0A@public.gmane.org>
2004-08-20 6:25 ` [PATCH]Panasonic Hotkey Driver v0.5 [2/2] Hiroshi Miura
[not found] ` <87u0uyqqa7.wl%miura-yiisDzvROlQdnm+yROfE0A@public.gmane.org>
2004-08-20 7:44 ` David Bronaugh
[not found] ` <4125ABEF.9090106-Jp3n8lUXroSX6QiC4yPwbg@public.gmane.org>
2004-08-20 8:43 ` Hiroshi Miura
[not found] ` <87pt5mqjxj.wl%miura-yiisDzvROlQdnm+yROfE0A@public.gmane.org>
2004-08-20 12:46 ` Stefan Seyfried
2004-08-20 17:14 ` David Bronaugh
[not found] ` <41263192.7010300-Jp3n8lUXroSX6QiC4yPwbg@public.gmane.org>
2004-08-20 17:43 ` Nate Lawson
[not found] ` <41263840.1010003-Y6VGUYTwhu0@public.gmane.org>
2004-08-21 0:46 ` Hiroshi Miura
2004-08-21 5:39 ` Hiroshi Miura
2004-08-21 1:30 ` Hiroshi Miura
2004-08-24 23:00 ` John Belmonte
2004-08-21 1:42 ` [PATCH]Panasonic Hotkey Driver Hiroshi Miura
[not found] ` <87zn4pl116.wl%miura-yiisDzvROlQdnm+yROfE0A@public.gmane.org>
2004-08-21 5:33 ` Hiroshi Miura
[not found] ` <87n00pkqc5.wl%miura-yiisDzvROlQdnm+yROfE0A@public.gmane.org>
2004-08-21 8:44 ` David Bronaugh
[not found] ` <41270B53.3060903-Jp3n8lUXroSX6QiC4yPwbg@public.gmane.org>
2004-08-21 10:34 ` Hiroshi Miura
[not found] ` <87d61klqzh.wl%miura-yiisDzvROlQdnm+yROfE0A@public.gmane.org>
2004-08-21 11:50 ` vgod spam
2004-08-22 6:45 ` David Bronaugh
[not found] ` <41284119.1060504-Jp3n8lUXroSX6QiC4yPwbg@public.gmane.org>
2004-08-22 8:27 ` David Bronaugh [this message]
[not found] ` <412858F0.8050406-Jp3n8lUXroSX6QiC4yPwbg@public.gmane.org>
2004-08-23 5:07 ` David Bronaugh
[not found] ` <41297BA7.3050503-Jp3n8lUXroSX6QiC4yPwbg@public.gmane.org>
2004-08-26 8:45 ` [PATCH]Panasonic Hotkey Driver v0.6.3 Hiroshi Miura
[not found] ` <87pt5e5lu3.wl%miura-yiisDzvROlQdnm+yROfE0A@public.gmane.org>
2004-09-15 0:42 ` [PATCH]Panasonic Hotkey Driver v0.7 Hiroshi Miura
-- strict thread matches above, loose matches on Subject: below --
2004-07-31 14:17 [PATCH]Panasonic Hotkey Driver Hiroshi Miura
2004-08-18 5:04 ` [PATCH][ACPI] Panasonic " Len Brown
2004-08-18 14:52 ` [PATCH]Panasonic " John Belmonte
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=412858F0.8050406@linuxboxen.org \
--to=dbronaugh-jp3n8luxrosx6qic4ypwbg@public.gmane.org \
--cc=acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org \
--cc=letsnote-tech-eXqGM+LsbTTAqL8d+zIrHngSJqDPrsil@public.gmane.org \
--cc=miura-yiisDzvROlQdnm+yROfE0A@public.gmane.org \
/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