linux-acpi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Matthew Garrett <mjg59@srcf.ucam.org>
To: Harald Welte <laforge@gnumonks.org>
Cc: linux-acpi@vger.kernel.org, Hiroshi Miura <miura@da-cha.org>,
	hadi@cyberus.ca
Subject: Re: [PATCH] Panasonic Let's Note laptop extras driver
Date: Wed, 2 Jul 2008 11:19:19 +0100	[thread overview]
Message-ID: <20080702101919.GB699@srcf.ucam.org> (raw)
In-Reply-To: <20080702090044.GB12272@prithivi.gnumonks.org>

On Wed, Jul 02, 2008 at 05:00:44PM +0800, Harald Welte wrote:

> * in order to fully support the backlight interface and get rid of the
>   clumsy separation of 'ac' (with power supply) and 'dc' (battery only) 
>   brightness settings, the driver would need to receive a notification
>   whenever the ACPI power supply status changes.  I know how to get to
>   that notification in userspace, but in kernelspace I'm not so sure.
>   Is there a notifier chain to which I can attach?

I don't think so, but it ought to be easy enough to glue into the 
power_supply class. The easiest thing for the moment is probably just to 
write values to both the ac and dc classes and let userspace handle the 
transition. If they're both in sync, it doesn't matter which you read 
back from.

> +/* This is transitional definition */
> +#ifndef KEY_BATT
> +# define KEY_BATT 227
> +#endif

Shouldn't be needed in-tree.

> +	const int key_map[] = {
> +		/*  0 */ -1,
> +		/*  1 */ KEY_BRIGHTNESSDOWN,
> +		/*  2 */ KEY_BRIGHTNESSUP,
> +		/*  3 */ KEY_DISPLAYTOGGLE,
> +		/*  4 */ KEY_MUTE,
> +		/*  5 */ KEY_VOLUMEDOWN,
> +		/*  6 */ KEY_VOLUMEUP,
> +		/*  7 */ KEY_SLEEP,
> +		/*  8 */ -1, /* Change CPU boost: do nothing */
> +		/*  9 */ KEY_BATT,
> +		/* 10 */ KEY_SUSPEND,
> +	};

Hm. Does this mean that the keymap isn't changable at runtime?

> +		if (acpi_pcc_hotkey_get_key(hotkey)) {
> +			/* generate event like '"pcc HKEY 00000080 00000084"'
> +			 * when Fn+F4 pressed */

Probably better not to add further events to /proc now - we'd like to 
deprecate the interface.

> +struct _proc_item {
> +	const char *name;
> +	struct file_operations fops;
> +	mode_t flag;
> +};

And shouldn't be adding any new files to /proc. Anything that can't be 
expressed via the existing generic sysfs classes should be an attribute 
on a sysfs platform device.

-- 
Matthew Garrett | mjg59@srcf.ucam.org

  reply	other threads:[~2008-07-02 10:19 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-07-02  9:00 [PATCH] Panasonic Let's Note laptop extras driver Harald Welte
2008-07-02 10:19 ` Matthew Garrett [this message]
2008-07-02 13:03   ` Harald Welte
2008-07-02 13:17     ` Matthew Garrett
2008-07-03 16:52   ` Harald Welte
2008-07-03 17:08     ` Matthew Garrett
2008-07-04  3:14       ` Henrique de Moraes Holschuh
2008-07-04  4:43         ` Harald Welte
2008-07-04 11:55           ` Henrique de Moraes Holschuh
2008-07-03 17:35 ` [PATCH] Panasonic Let's Note laptop extras driver v0.93 Harald Welte
2008-07-03 19:23   ` Matthew Garrett
2008-07-04  1:31     ` Harald Welte
2008-07-04  3:44 ` [PATCH] Panasonic Let's Note laptop extras driver v0.94 Harald Welte
2008-07-04  9:10   ` Matthew Garrett
2008-07-04 12:07     ` Henrique de Moraes Holschuh
2008-07-04 12:11       ` Matthew Garrett
2008-07-04 12:22         ` Henrique de Moraes Holschuh
2008-07-04 12:33           ` Matthew Garrett
2008-07-04 20:18             ` Henrique de Moraes Holschuh
2008-07-12 10:36     ` Harald Welte
2008-07-12 10:56       ` Matthew Garrett
2008-09-22 22:38   ` Len Brown
2008-09-23 15:46     ` Harald Welte
2008-09-24  8:09       ` Len Brown
2008-09-25  4:45       ` SPS 三浦 広志(IT人材戦略)
2008-09-25 16:44         ` Len Brown
2008-09-26  2:17           ` Hiroshi Miura

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=20080702101919.GB699@srcf.ucam.org \
    --to=mjg59@srcf.ucam.org \
    --cc=hadi@cyberus.ca \
    --cc=laforge@gnumonks.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=miura@da-cha.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;
as well as URLs for NNTP newsgroup(s).