Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 48777
b: refs/heads/master
c: 5fe8252
h: refs/heads/master
i:
  48775: 5f6a47e
v: v3
  • Loading branch information
Linus Torvalds committed Feb 19, 2007
1 parent 97144b0 commit 0a9513f
Show file tree
Hide file tree
Showing 113 changed files with 1,703 additions and 1,718 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: ef665c1a06be719ed9a6b0ad7967137258d9457a
refs/heads/master: 5fe8252fc3a21666cf19053fbd7ec7bd9664f5d9
38 changes: 0 additions & 38 deletions trunk/Documentation/acpi-hotkey.txt

This file was deleted.

23 changes: 0 additions & 23 deletions trunk/Documentation/feature-removal-schedule.txt
Original file line number Diff line number Diff line change
Expand Up @@ -253,29 +253,6 @@ Who: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>

---------------------------

<<<<<<< test:Documentation/feature-removal-schedule.txt
What: ACPI hotkey driver (CONFIG_ACPI_HOTKEY)
When: 2.6.21
Why: hotkey.c was an attempt to consolidate multiple drivers that use
ACPI to implement hotkeys. However, hotkeys are not documented
in the ACPI specification, so the drivers used undocumented
vendor-specific hooks and turned out to be more different than
the same.

Further, the keys and the features supplied by each platform
are different, so there will always be a need for
platform-specific drivers.

So the new plan is to delete hotkey.c and instead, work on the
platform specific drivers to try to make them look the same
to the user when they supply the same features.

hotkey.c has always depended on CONFIG_EXPERIMENTAL

Who: Len Brown <len.brown@intel.com>

---------------------------

What: /sys/firmware/acpi/namespace
When: 2.6.21
Why: The ACPI namespace is effectively the symbol list for
Expand Down
106 changes: 106 additions & 0 deletions trunk/Documentation/sony-laptop.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
Sony Notebook Control Driver (SNC) Readme
-----------------------------------------
Copyright (C) 2004- 2005 Stelian Pop <stelian@popies.net>
Copyright (C) 2007 Mattia Dongili <malattia@linux.it>

This mini-driver drives the SNC device present in the ACPI BIOS of
the Sony Vaio laptops.

It gives access to some extra laptop functionalities. In its current
form, this driver let the user set or query the screen brightness
through the backlight subsystem and remove/apply power to some devices.

Backlight control:
------------------
If your laptop model supports it, you will find sysfs files in the
/sys/class/backlight/sony/
directory. You will be able to query and set the current screen
brightness:
brightness get/set screen brightness (an iteger
between 0 and 7)
actual_brightness reading from this file will query the HW
to get real brightness value
max_brightness the maximum brightness value


Platform specific:
------------------
Loading the sony-laptop module will create a
/sys/devices/platform/sony-laptop/
directory populated with some files.

You then read/write integer values from/to those files by using
standard UNIX tools.

The files are:
brightness_default screen brightness which will be set
when the laptop will be rebooted
cdpower power on/off the internal CD drive
audiopower power on/off the internal sound card
lanpower power on/off the internal ethernet card
(only in debug mode)

Note that some files may be missing if they are not supported
by your particular laptop model.

Example usage:
# echo "1" > /sys/devices/platform/sony-laptop/brightness_default
sets the lowest screen brightness for the next and later reboots,
# echo "8" > /sys/devices/platform/sony-laptop/brightness_default
sets the highest screen brightness for the next and later reboots,
# cat /sys/devices/platform/sony-laptop/brightness_default
retrieves the value.

# echo "0" > /sys/devices/platform/sony-laptop/audiopower
powers off the sound card,
# echo "1" > /sys/devices/platform/sony-laptop/audiopower
powers on the sound card.

Development:
------------

If you want to help with the development of this driver (and
you are not afraid of any side effects doing strange things with
your ACPI BIOS could have on your laptop), load the driver and
pass the option 'debug=1'.

REPEAT: DON'T DO THIS IF YOU DON'T LIKE RISKY BUSINESS.

In your kernel logs you will find the list of all ACPI methods
the SNC device has on your laptop. You can see the GCDP/GCDP methods
used to pwer on/off the CD drive, but there are others.

I HAVE NO IDEA WHAT THOSE METHODS DO.

The sony-laptop driver creates, for some of those methods (the most
current ones found on several Vaio models), an entry under
/sys/devices/platform/sony-laptop, just like the 'cdpower' one.
You can create other entries corresponding to your own laptop methods by
further editing the source (see the 'sony_acpi_values' table, and add a new
entry to this table with your get/set method names using the
HANDLE_NAMES macro).

Your mission, should you accept it, is to try finding out what
those entries are for, by reading/writing random values from/to those
files and find out what is the impact on your laptop.

Should you find anything interesting, please report it back to me,
I will not disavow all knowledge of your actions :)

Bugs/Limitations:
-----------------

* This driver is not based on official documentation from Sony
(because there is none), so there is no guarantee this driver
will work at all, or do the right thing. Although this hasn't
happened to me, this driver could do very bad things to your
laptop, including permanent damage.

* The sony-laptop and sonypi drivers do not interact at all. In the
future, sonypi could use sony-laptop to do (part of) its business.

* spicctrl, which is the userspace tool used to communicate with the
sonypi driver (through /dev/sonypi) does not try to use the
sony-laptop driver. In the future, spicctrl could try sonypi first,
and if it isn't present, try sony-laptop instead.

9 changes: 9 additions & 0 deletions trunk/MAINTAINERS
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,13 @@ L: linux-acpi@vger.kernel.org
W: http://acpi.sourceforge.net/
S: Supported

ACPI VIDEO DRIVER
P: Luming Yu
M: luming.yu@intel.com
L: linux-acpi@vger.kernel.org
W: http://acpi.sourceforge.net/
S: Supported

AD1816 SOUND DRIVER
P: Thorsten Knabe
M: Thorsten Knabe <linux@thorsten-knabe.de>
Expand Down Expand Up @@ -3061,6 +3068,8 @@ S: Maintained
SONY VAIO CONTROL DEVICE DRIVER
P: Stelian Pop
M: stelian@popies.net
P: Mattia Dongili
M: malattia@linux.it
W: http://popies.net/sonypi/
S: Maintained

Expand Down
5 changes: 2 additions & 3 deletions trunk/arch/i386/kernel/acpi/boot.c
Original file line number Diff line number Diff line change
Expand Up @@ -850,10 +850,9 @@ static inline int acpi_parse_madt_ioapic_entries(void)
static void __init acpi_process_madt(void)
{
#ifdef CONFIG_X86_LOCAL_APIC
int count, error;
int error;

count = acpi_table_parse(ACPI_SIG_MADT, acpi_parse_madt);
if (count >= 1) {
if (!acpi_table_parse(ACPI_SIG_MADT, acpi_parse_madt)) {

/*
* Parse MADT LAPIC entries
Expand Down
4 changes: 2 additions & 2 deletions trunk/arch/ia64/kernel/acpi.c
Original file line number Diff line number Diff line change
Expand Up @@ -651,7 +651,7 @@ int __init acpi_boot_init(void)
* information -- the successor to MPS tables.
*/

if (acpi_table_parse(ACPI_SIG_MADT, acpi_parse_madt) < 1) {
if (acpi_table_parse(ACPI_SIG_MADT, acpi_parse_madt)) {
printk(KERN_ERR PREFIX "Can't find MADT\n");
goto skip_madt;
}
Expand Down Expand Up @@ -702,7 +702,7 @@ int __init acpi_boot_init(void)
* gets interrupts such as power and sleep buttons. If it's not
* on a Legacy interrupt, it needs to be setup.
*/
if (acpi_table_parse(ACPI_SIG_FADT, acpi_parse_fadt) < 1)
if (acpi_table_parse(ACPI_SIG_FADT, acpi_parse_fadt))
printk(KERN_ERR PREFIX "Can't find FADT\n");

#ifdef CONFIG_SMP
Expand Down
4 changes: 3 additions & 1 deletion trunk/arch/x86_64/kernel/early-quirks.c
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,9 @@ static void nvidia_bugs(void)
return;

nvidia_hpet_detected = 0;
acpi_table_parse(ACPI_SIG_HPET, nvidia_hpet_check);
if (acpi_table_parse(ACPI_SIG_HPET, nvidia_hpet_check))
return;

if (nvidia_hpet_detected == 0) {
acpi_skip_timer_override = 1;
printk(KERN_INFO "Nvidia board "
Expand Down
10 changes: 1 addition & 9 deletions trunk/drivers/acpi/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ config ACPI
depends on IA64 || X86
depends on PCI
depends on PM
select PNP
default y
---help---
Advanced Configuration and Power Interface (ACPI) support for
Expand Down Expand Up @@ -132,15 +133,6 @@ config ACPI_VIDEO
Note that this is an ref. implementation only. It may or may not work
for your integrated video device.

config ACPI_HOTKEY
tristate "Generic Hotkey (EXPERIMENTAL)"
depends on EXPERIMENTAL
depends on X86
default n
help
Experimental consolidated hotkey driver.
If you are unsure, say N.

config ACPI_FAN
tristate "Fan"
default y
Expand Down
1 change: 0 additions & 1 deletion trunk/drivers/acpi/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ obj-$(CONFIG_ACPI_FAN) += fan.o
obj-$(CONFIG_ACPI_DOCK) += dock.o
obj-$(CONFIG_ACPI_BAY) += bay.o
obj-$(CONFIG_ACPI_VIDEO) += video.o
obj-$(CONFIG_ACPI_HOTKEY) += hotkey.o
obj-y += pci_root.o pci_link.o pci_irq.o pci_bind.o
obj-$(CONFIG_ACPI_POWER) += power.o
obj-$(CONFIG_ACPI_PROCESSOR) += processor.o
Expand Down
9 changes: 4 additions & 5 deletions trunk/drivers/acpi/ac.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@
#define ACPI_AC_COMPONENT 0x00020000
#define ACPI_AC_CLASS "ac_adapter"
#define ACPI_AC_HID "ACPI0003"
#define ACPI_AC_DRIVER_NAME "ACPI AC Adapter Driver"
#define ACPI_AC_DEVICE_NAME "AC Adapter"
#define ACPI_AC_FILE_STATE "state"
#define ACPI_AC_NOTIFY_STATUS 0x80
Expand All @@ -44,10 +43,10 @@
#define ACPI_AC_STATUS_UNKNOWN 0xFF

#define _COMPONENT ACPI_AC_COMPONENT
ACPI_MODULE_NAME("acpi_ac")
ACPI_MODULE_NAME("ac");

MODULE_AUTHOR("Paul Diefenbaugh");
MODULE_DESCRIPTION(ACPI_AC_DRIVER_NAME);
MODULE_AUTHOR("Paul Diefenbaugh");
MODULE_DESCRIPTION("ACPI AC Adapter Driver");
MODULE_LICENSE("GPL");

extern struct proc_dir_entry *acpi_lock_ac_dir(void);
Expand All @@ -58,7 +57,7 @@ static int acpi_ac_remove(struct acpi_device *device, int type);
static int acpi_ac_open_fs(struct inode *inode, struct file *file);

static struct acpi_driver acpi_ac_driver = {
.name = ACPI_AC_DRIVER_NAME,
.name = "ac",
.class = ACPI_AC_CLASS,
.ids = ACPI_AC_HID,
.ops = {
Expand Down
9 changes: 4 additions & 5 deletions trunk/drivers/acpi/acpi_memhotplug.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,13 @@
#define ACPI_MEMORY_DEVICE_COMPONENT 0x08000000UL
#define ACPI_MEMORY_DEVICE_CLASS "memory"
#define ACPI_MEMORY_DEVICE_HID "PNP0C80"
#define ACPI_MEMORY_DEVICE_DRIVER_NAME "Hotplug Mem Driver"
#define ACPI_MEMORY_DEVICE_NAME "Hotplug Mem Device"

#define _COMPONENT ACPI_MEMORY_DEVICE_COMPONENT

ACPI_MODULE_NAME("acpi_memory")
MODULE_AUTHOR("Naveen B S <naveen.b.s@intel.com>");
MODULE_DESCRIPTION(ACPI_MEMORY_DEVICE_DRIVER_NAME);
ACPI_MODULE_NAME("acpi_memhotplug");
MODULE_AUTHOR("Naveen B S <naveen.b.s@intel.com>");
MODULE_DESCRIPTION("Hotplug Mem Driver");
MODULE_LICENSE("GPL");

/* ACPI _STA method values */
Expand All @@ -60,7 +59,7 @@ static int acpi_memory_device_remove(struct acpi_device *device, int type);
static int acpi_memory_device_start(struct acpi_device *device);

static struct acpi_driver acpi_memory_device_driver = {
.name = ACPI_MEMORY_DEVICE_DRIVER_NAME,
.name = "acpi_memhotplug",
.class = ACPI_MEMORY_DEVICE_CLASS,
.ids = ACPI_MEMORY_DEVICE_HID,
.ops = {
Expand Down
20 changes: 14 additions & 6 deletions trunk/drivers/acpi/asus_acpi.c
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,7 @@ struct asus_hotk {
W5A, //W5A
W3V, //W3030V
xxN, //M2400N, M3700N, M5200N, M6800N, S1300N, S5200N
A4S, //Z81sp
//(Centrino)
END_MODEL
} model; //Models currently supported
Expand Down Expand Up @@ -397,7 +398,16 @@ static struct model_data model_conf[END_MODEL] = {
.brightness_set = "SPLV",
.brightness_get = "GPLV",
.display_set = "SDSP",
.display_get = "\\ADVG"}
.display_get = "\\ADVG"},

{
.name = "A4S",
.brightness_set = "SPLV",
.brightness_get = "GPLV",
.mt_bt_switch = "BLED",
.mt_wled = "WLED"
}

};

/* procdir we use */
Expand All @@ -421,7 +431,7 @@ static struct asus_hotk *hotk;
static int asus_hotk_add(struct acpi_device *device);
static int asus_hotk_remove(struct acpi_device *device, int type);
static struct acpi_driver asus_hotk_driver = {
.name = ACPI_HOTK_NAME,
.name = "asus_acpi",
.class = ACPI_HOTK_CLASS,
.ids = ACPI_HOTK_HID,
.ops = {
Expand Down Expand Up @@ -1117,6 +1127,8 @@ static int asus_model_match(char *model)
return W3V;
else if (strncmp(model, "W5A", 3) == 0)
return W5A;
else if (strncmp(model, "A4S", 3) == 0)
return A4S;
else
return END_MODEL;
}
Expand Down Expand Up @@ -1365,10 +1377,6 @@ static int __init asus_acpi_init(void)
if (acpi_disabled)
return -ENODEV;

if (!acpi_specific_hotkey_enabled) {
printk(KERN_ERR "Using generic hotkey driver\n");
return -ENODEV;
}
asus_proc_dir = proc_mkdir(PROC_ASUS, acpi_root_dir);
if (!asus_proc_dir) {
printk(KERN_ERR "Asus ACPI: Unable to create /proc entry\n");
Expand Down
Loading

0 comments on commit 0a9513f

Please sign in to comment.