From: Stelian Pop <stelian@popies.net>
To: Andrew Morton <akpm@osdl.org>
Cc: Mattia Dongili <malattia@linux.it>, Len Brown <lenb@kernel.org>,
Ismail Donmez <ismail@pardus.org.tr>,
Andrea Gelmini <gelma@gelma.net>,
linux-kernel@vger.kernel.org, linux-acpi@vger.kernel.org,
Cacy Rodney <cacy-rodney-cacy@tlen.pl>
Subject: Re: sonypc with Sony Vaio VGN-SZ1VP
Date: Fri, 05 Jan 2007 00:36:23 +0100 [thread overview]
Message-ID: <1167953784.4901.5.camel@localhost.localdomain> (raw)
In-Reply-To: <20070104125107.b82db604.akpm@osdl.org>
Le jeudi 04 janvier 2007 à 12:51 -0800, Andrew Morton a écrit :
> The place to start (please) is the patches in -mm:
>
> 2.6-sony_acpi4.patch
> sony_apci-resume.patch
> sony_apci-resume-fix.patch
> acpi-add-backlight-support-to-the-sony_acpi.patch
> acpi-add-backlight-support-to-the-sony_acpi-v2.patch
> video-sysfs-support-take-2-add-dev-argument-for-backlight_device_register-sony_acpi-fix.patch
In addition to those, I also have the attached patch in my local tree.
Stelian.
---
Added acpi_bus_generate event for forwarding Fn-keys pressed to acpi subsystem,
and made correspondent necessary changes for this to work.
Signed-off-by: Nilton Volpato <nilton.volpato@gmail.com>
---
drivers/acpi/sony_acpi.c | 55 ++++++++++++++++++++++++----------------------
1 files changed, 29 insertions(+), 26 deletions(-)
diff --git a/drivers/acpi/sony_acpi.c b/drivers/acpi/sony_acpi.c
index e23522a..0c9367f 100644
--- a/drivers/acpi/sony_acpi.c
+++ b/drivers/acpi/sony_acpi.c
@@ -33,7 +33,7 @@
#define ACPI_SNC_CLASS "sony"
#define ACPI_SNC_HID "SNY5001"
-#define ACPI_SNC_DRIVER_NAME "ACPI Sony Notebook Control Driver v0.2"
+#define ACPI_SNC_DRIVER_NAME "ACPI Sony Notebook Control Driver v0.3"
#define LOG_PFX KERN_WARNING "sony_acpi: "
@@ -61,6 +61,7 @@ static struct acpi_driver sony_acpi_driv
static acpi_handle sony_acpi_handle;
static struct proc_dir_entry *sony_acpi_dir;
+static struct acpi_device *sony_acpi_acpi_device = NULL;
static struct sony_acpi_value {
char *name; /* name of the entry */
@@ -245,7 +246,9 @@ static int sony_acpi_write(struct file *
static void sony_acpi_notify(acpi_handle handle, u32 event, void *data)
{
- printk(LOG_PFX "sony_acpi_notify\n");
+ if (debug)
+ printk(LOG_PFX "sony_acpi_notify, event: %d\n", event);
+ acpi_bus_generate_event(sony_acpi_acpi_device, 1, event);
}
static acpi_status sony_walk_callback(acpi_handle handle, u32 level,
@@ -269,6 +272,8 @@ static int sony_acpi_add(struct acpi_dev
int result;
struct sony_acpi_value *item;
+ sony_acpi_acpi_device = device;
+
sony_acpi_handle = device->handle;
acpi_driver_data(device) = NULL;
@@ -282,16 +287,16 @@ static int sony_acpi_add(struct acpi_dev
result = -ENODEV;
goto outwalk;
}
+ }
- status = acpi_install_notify_handler(sony_acpi_handle,
- ACPI_DEVICE_NOTIFY,
- sony_acpi_notify,
- NULL);
- if (ACPI_FAILURE(status)) {
- printk(LOG_PFX "unable to install notify handler\n");
- result = -ENODEV;
- goto outnotify;
- }
+ status = acpi_install_notify_handler(sony_acpi_handle,
+ ACPI_DEVICE_NOTIFY,
+ sony_acpi_notify,
+ NULL);
+ if (ACPI_FAILURE(status)) {
+ printk(LOG_PFX "unable to install notify handler\n");
+ result = -ENODEV;
+ goto outnotify;
}
for (item = sony_acpi_values; item->name; ++item) {
@@ -310,7 +315,7 @@ static int sony_acpi_add(struct acpi_dev
item->acpiset, &handle)))
continue;
- item->proc = create_proc_entry(item->name, 0600,
+ item->proc = create_proc_entry(item->name, 0666,
acpi_device_dir(device));
if (!item->proc) {
printk(LOG_PFX "unable to create proc entry\n");
@@ -329,13 +334,11 @@ static int sony_acpi_add(struct acpi_dev
return 0;
outproc:
- if (debug) {
- status = acpi_remove_notify_handler(sony_acpi_handle,
- ACPI_DEVICE_NOTIFY,
- sony_acpi_notify);
- if (ACPI_FAILURE(status))
- printk(LOG_PFX "unable to remove notify handler\n");
- }
+ status = acpi_remove_notify_handler(sony_acpi_handle,
+ ACPI_DEVICE_NOTIFY,
+ sony_acpi_notify);
+ if (ACPI_FAILURE(status))
+ printk(LOG_PFX "unable to remove notify handler\n");
outnotify:
for (item = sony_acpi_values; item->name; ++item)
if (item->proc)
@@ -350,13 +353,13 @@ static int sony_acpi_remove(struct acpi_
acpi_status status;
struct sony_acpi_value *item;
- if (debug) {
- status = acpi_remove_notify_handler(sony_acpi_handle,
- ACPI_DEVICE_NOTIFY,
- sony_acpi_notify);
- if (ACPI_FAILURE(status))
- printk(LOG_PFX "unable to remove notify handler\n");
- }
+ sony_acpi_acpi_device = NULL;
+
+ status = acpi_remove_notify_handler(sony_acpi_handle,
+ ACPI_DEVICE_NOTIFY,
+ sony_acpi_notify);
+ if (ACPI_FAILURE(status))
+ printk(LOG_PFX "unable to remove notify handler\n");
for (item = sony_acpi_values; item->name; ++item)
if (item->proc)
--
Stelian Pop <stelian@popies.net>
-
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
WARNING: multiple messages have this Message-ID (diff)
From: Stelian Pop <stelian@popies.net>
To: Andrew Morton <akpm@osdl.org>
Cc: Mattia Dongili <malattia@linux.it>, Len Brown <lenb@kernel.org>,
Ismail Donmez <ismail@pardus.org.tr>,
Andrea Gelmini <gelma@gelma.net>,
linux-kernel@vger.kernel.org, linux-acpi@vger.kernel.org,
Cacy Rodney <cacy-rodney-cacy@tlen.pl>
Subject: Re: sonypc with Sony Vaio VGN-SZ1VP
Date: Fri, 05 Jan 2007 00:36:23 +0100 [thread overview]
Message-ID: <1167953784.4901.5.camel@localhost.localdomain> (raw)
In-Reply-To: <20070104125107.b82db604.akpm@osdl.org>
Le jeudi 04 janvier 2007 à 12:51 -0800, Andrew Morton a écrit :
> The place to start (please) is the patches in -mm:
>
> 2.6-sony_acpi4.patch
> sony_apci-resume.patch
> sony_apci-resume-fix.patch
> acpi-add-backlight-support-to-the-sony_acpi.patch
> acpi-add-backlight-support-to-the-sony_acpi-v2.patch
> video-sysfs-support-take-2-add-dev-argument-for-backlight_device_register-sony_acpi-fix.patch
In addition to those, I also have the attached patch in my local tree.
Stelian.
---
Added acpi_bus_generate event for forwarding Fn-keys pressed to acpi subsystem,
and made correspondent necessary changes for this to work.
Signed-off-by: Nilton Volpato <nilton.volpato@gmail.com>
---
drivers/acpi/sony_acpi.c | 55 ++++++++++++++++++++++++----------------------
1 files changed, 29 insertions(+), 26 deletions(-)
diff --git a/drivers/acpi/sony_acpi.c b/drivers/acpi/sony_acpi.c
index e23522a..0c9367f 100644
--- a/drivers/acpi/sony_acpi.c
+++ b/drivers/acpi/sony_acpi.c
@@ -33,7 +33,7 @@
#define ACPI_SNC_CLASS "sony"
#define ACPI_SNC_HID "SNY5001"
-#define ACPI_SNC_DRIVER_NAME "ACPI Sony Notebook Control Driver v0.2"
+#define ACPI_SNC_DRIVER_NAME "ACPI Sony Notebook Control Driver v0.3"
#define LOG_PFX KERN_WARNING "sony_acpi: "
@@ -61,6 +61,7 @@ static struct acpi_driver sony_acpi_driv
static acpi_handle sony_acpi_handle;
static struct proc_dir_entry *sony_acpi_dir;
+static struct acpi_device *sony_acpi_acpi_device = NULL;
static struct sony_acpi_value {
char *name; /* name of the entry */
@@ -245,7 +246,9 @@ static int sony_acpi_write(struct file *
static void sony_acpi_notify(acpi_handle handle, u32 event, void *data)
{
- printk(LOG_PFX "sony_acpi_notify\n");
+ if (debug)
+ printk(LOG_PFX "sony_acpi_notify, event: %d\n", event);
+ acpi_bus_generate_event(sony_acpi_acpi_device, 1, event);
}
static acpi_status sony_walk_callback(acpi_handle handle, u32 level,
@@ -269,6 +272,8 @@ static int sony_acpi_add(struct acpi_dev
int result;
struct sony_acpi_value *item;
+ sony_acpi_acpi_device = device;
+
sony_acpi_handle = device->handle;
acpi_driver_data(device) = NULL;
@@ -282,16 +287,16 @@ static int sony_acpi_add(struct acpi_dev
result = -ENODEV;
goto outwalk;
}
+ }
- status = acpi_install_notify_handler(sony_acpi_handle,
- ACPI_DEVICE_NOTIFY,
- sony_acpi_notify,
- NULL);
- if (ACPI_FAILURE(status)) {
- printk(LOG_PFX "unable to install notify handler\n");
- result = -ENODEV;
- goto outnotify;
- }
+ status = acpi_install_notify_handler(sony_acpi_handle,
+ ACPI_DEVICE_NOTIFY,
+ sony_acpi_notify,
+ NULL);
+ if (ACPI_FAILURE(status)) {
+ printk(LOG_PFX "unable to install notify handler\n");
+ result = -ENODEV;
+ goto outnotify;
}
for (item = sony_acpi_values; item->name; ++item) {
@@ -310,7 +315,7 @@ static int sony_acpi_add(struct acpi_dev
item->acpiset, &handle)))
continue;
- item->proc = create_proc_entry(item->name, 0600,
+ item->proc = create_proc_entry(item->name, 0666,
acpi_device_dir(device));
if (!item->proc) {
printk(LOG_PFX "unable to create proc entry\n");
@@ -329,13 +334,11 @@ static int sony_acpi_add(struct acpi_dev
return 0;
outproc:
- if (debug) {
- status = acpi_remove_notify_handler(sony_acpi_handle,
- ACPI_DEVICE_NOTIFY,
- sony_acpi_notify);
- if (ACPI_FAILURE(status))
- printk(LOG_PFX "unable to remove notify handler\n");
- }
+ status = acpi_remove_notify_handler(sony_acpi_handle,
+ ACPI_DEVICE_NOTIFY,
+ sony_acpi_notify);
+ if (ACPI_FAILURE(status))
+ printk(LOG_PFX "unable to remove notify handler\n");
outnotify:
for (item = sony_acpi_values; item->name; ++item)
if (item->proc)
@@ -350,13 +353,13 @@ static int sony_acpi_remove(struct acpi_
acpi_status status;
struct sony_acpi_value *item;
- if (debug) {
- status = acpi_remove_notify_handler(sony_acpi_handle,
- ACPI_DEVICE_NOTIFY,
- sony_acpi_notify);
- if (ACPI_FAILURE(status))
- printk(LOG_PFX "unable to remove notify handler\n");
- }
+ sony_acpi_acpi_device = NULL;
+
+ status = acpi_remove_notify_handler(sony_acpi_handle,
+ ACPI_DEVICE_NOTIFY,
+ sony_acpi_notify);
+ if (ACPI_FAILURE(status))
+ printk(LOG_PFX "unable to remove notify handler\n");
for (item = sony_acpi_values; item->name; ++item)
if (item->proc)
--
Stelian Pop <stelian@popies.net>
next prev parent reply other threads:[~2007-01-04 23:36 UTC|newest]
Thread overview: 67+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-09-27 11:51 sonypc with Sony Vaio VGN-SZ1VP stelian
2006-09-28 16:27 ` Yu Luming
2007-01-04 5:24 ` Len Brown
2007-01-04 10:09 ` Stelian Pop
2007-01-04 10:09 ` Stelian Pop
2007-01-04 19:15 ` Mattia Dongili
2007-01-04 19:15 ` Mattia Dongili
2007-01-04 20:51 ` Andrew Morton
2007-01-04 21:18 ` Mattia Dongili
2007-01-04 21:28 ` Andrew Morton
2007-01-04 21:36 ` Timo Hoenig
2007-01-04 21:36 ` Richard Hughes
2007-01-04 21:58 ` Mattia Dongili
2007-01-05 17:02 ` Len Brown
2007-01-05 18:06 ` Mattia Dongili
2007-01-04 23:36 ` Stelian Pop [this message]
2007-01-04 23:36 ` Stelian Pop
2007-01-04 23:44 ` Andrew Morton
2007-01-04 23:54 ` Stelian Pop
2007-01-04 23:54 ` Stelian Pop
2007-01-05 4:16 ` Andrew Morton
2007-01-05 4:16 ` Andrew Morton
2007-01-05 9:58 ` Stelian Pop
2007-01-05 9:58 ` Stelian Pop
2007-01-05 2:20 ` MoRpHeUz
2007-01-05 17:11 ` Sony Vaio VGN-SZ340 (was Re: sonypc with Sony Vaio VGN-SZ1VP) Len Brown
2007-01-05 17:24 ` MoRpHeUz
2007-01-05 18:10 ` Len Brown
2007-01-06 4:09 ` Bjorn Helgaas
2007-01-11 19:52 ` Len Brown
2007-01-11 20:01 ` Alexey Starikovskiy
2007-01-05 0:11 ` sonypc with Sony Vaio VGN-SZ1VP Jan Engelhardt
2007-01-05 9:15 ` Mattia Dongili
2007-01-05 9:59 ` Stelian Pop
2007-01-05 9:59 ` Stelian Pop
2007-01-04 23:34 ` Stelian Pop
2007-01-04 23:34 ` Stelian Pop
2007-01-05 9:23 ` Neil Bird
2007-01-05 16:24 ` Mattia Dongili
2007-01-10 8:32 ` Neil Bird
2007-01-11 12:20 ` sonypc with Sony Vaio VGN-SZ1VP [repost] Neil Bird
2007-01-05 17:19 ` sonypc with Sony Vaio VGN-SZ1VP Len Brown
2007-01-10 8:36 ` Neil Bird
2007-01-11 12:20 ` sonypc with Sony Vaio VGN-SZ1VP [repost] Neil Bird
2007-01-05 10:02 ` sonypc with Sony Vaio VGN-SZ1VP Stelian Pop
2007-01-05 10:02 ` Stelian Pop
2007-01-05 12:13 ` Mattia Dongili
2007-01-05 12:13 ` Mattia Dongili
2007-01-05 14:23 ` Jan Engelhardt
2007-01-09 15:19 ` Luming Yu
-- strict thread matches above, loose matches on Subject: below --
2007-01-04 17:58 Cacy Rodney
2007-01-05 17:33 ` Len Brown
2007-01-05 19:10 ` Mattia Dongili
2006-09-26 13:56 Andrea Gelmini
2006-09-26 16:29 ` Stelian Pop
2006-09-26 17:56 ` Ismail Donmez
2006-09-27 5:14 ` Andrew Morton
2006-09-27 5:14 ` Andrew Morton
2006-09-27 5:59 ` Jan Engelhardt
2006-09-27 6:04 ` Len Brown
2006-09-27 6:04 ` Len Brown
2006-09-27 7:50 ` Ismail Donmez
2006-09-27 7:50 ` Ismail Donmez
2006-09-28 15:48 ` Yu Luming
2006-09-28 15:48 ` Yu Luming
2006-09-27 16:26 ` Andrea Gelmini
2006-09-26 21:38 ` Andrea Gelmini
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=1167953784.4901.5.camel@localhost.localdomain \
--to=stelian@popies.net \
--cc=akpm@osdl.org \
--cc=cacy-rodney-cacy@tlen.pl \
--cc=gelma@gelma.net \
--cc=ismail@pardus.org.tr \
--cc=lenb@kernel.org \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=malattia@linux.it \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.