Commit 6b06d2cc authored by Linus Torvalds's avatar Linus Torvalds

Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6

* 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6: (105 commits)
  sonypi: use mutex instead of semaphore
  sony-laptop: remove user visible camera controls as platform attributes
  meye: make meye use sony-laptop instead of sonypi
  sony-laptop: add a meye-usable include file for camera ops
  sony-laptop: complete the motion eye camera support in sony-laptop
  sonypi: try to detect if sony-laptop has already taken one of the known ioports
  sonypi: suggest sonypi users to try sony-laptop instead
  sony-laptop: add edge modem support (also called WWAN)
  sony-laptop: add locking on accesses to the ioport and global vars
  sony-laptop: add camera enable/disable parameter, better handle possible infinite loop
  thinkpad-acpi: make drivers/misc/thinkpad_acpi:fan_mutex static
  ACPI: thinkpad-acpi: add sysfs support to wan and bluetooth subdrivers
  ACPI: thinkpad-acpi: add sysfs support to hotkey subdriver
  ACPI: thinkpad-acpi: improve dock subdriver initialization
  ACPI: thinkpad-acpi: improve debugging for acpi helpers
  ACPI: thinkpad-acpi: improve fan control documentation
  ACPI: thinkpad-acpi: map ENXIO to EINVAL for fan sysfs
  ACPI: thinkpad-acpi: fix a fan watchdog invocation
  ACPI: thinkpad-acpi: do not arm fan watchdog if it would not work
  ACPI: thinkpad-acpi: add a fan-control feature master toggle
  ...
parents b9099ff6 aac60c11
...@@ -181,19 +181,41 @@ and is between 256 and 4096 characters. It is defined in the file ...@@ -181,19 +181,41 @@ and is between 256 and 4096 characters. It is defined in the file
that require a timer override, but don't have that require a timer override, but don't have
HPET HPET
acpi_dbg_layer= [HW,ACPI] acpi.debug_layer= [HW,ACPI]
Format: <int> Format: <int>
Each bit of the <int> indicates an ACPI debug layer, Each bit of the <int> indicates an ACPI debug layer,
1: enable, 0: disable. It is useful for boot time 1: enable, 0: disable. It is useful for boot time
debugging. After system has booted up, it can be set debugging. After system has booted up, it can be set
via /proc/acpi/debug_layer. via /sys/module/acpi/parameters/debug_layer.
CONFIG_ACPI_DEBUG must be enabled for this to produce any output.
acpi_dbg_level= [HW,ACPI] Available bits (add the numbers together) to enable debug output
for specific parts of the ACPI subsystem:
0x01 utilities 0x02 hardware 0x04 events 0x08 tables
0x10 namespace 0x20 parser 0x40 dispatcher
0x80 executer 0x100 resources 0x200 acpica debugger
0x400 os services 0x800 acpica disassembler.
The number can be in decimal or prefixed with 0x in hex.
Warning: Many of these options can produce a lot of
output and make your system unusable. Be very careful.
acpi.debug_level= [HW,ACPI]
Format: <int> Format: <int>
Each bit of the <int> indicates an ACPI debug level, Each bit of the <int> indicates an ACPI debug level,
1: enable, 0: disable. It is useful for boot time 1: enable, 0: disable. It is useful for boot time
debugging. After system has booted up, it can be set debugging. After system has booted up, it can be set
via /proc/acpi/debug_level. via /sys/module/acpi/parameters/debug_level.
CONFIG_ACPI_DEBUG must be enabled for this to produce any output.
Available bits (add the numbers together) to enable different
debug output levels of the ACPI subsystem:
0x01 error 0x02 warn 0x04 init 0x08 debug object
0x10 info 0x20 init names 0x40 parse 0x80 load
0x100 dispatch 0x200 execute 0x400 names 0x800 operation region
0x1000 bfield 0x2000 tables 0x4000 values 0x8000 objects
0x10000 resources 0x20000 user requests 0x40000 package.
The number can be in decimal or prefixed with 0x in hex.
Warning: Many of these options can produce a lot of
output and make your system unusable. Be very careful.
acpi_fake_ecdt [HW,ACPI] Workaround failure due to BIOS lacking ECDT acpi_fake_ecdt [HW,ACPI] Workaround failure due to BIOS lacking ECDT
......
...@@ -3,12 +3,18 @@ Sony Notebook Control Driver (SNC) Readme ...@@ -3,12 +3,18 @@ Sony Notebook Control Driver (SNC) Readme
Copyright (C) 2004- 2005 Stelian Pop <stelian@popies.net> Copyright (C) 2004- 2005 Stelian Pop <stelian@popies.net>
Copyright (C) 2007 Mattia Dongili <malattia@linux.it> Copyright (C) 2007 Mattia Dongili <malattia@linux.it>
This mini-driver drives the SNC device present in the ACPI BIOS of This mini-driver drives the SNC and SPIC device present in the ACPI BIOS of the
the Sony Vaio laptops. Sony Vaio laptops. This driver mixes both devices functions under the same
(hopefully consistent) interface. This also means that the sonypi driver is
obsoleted by sony-laptop now.
It gives access to some extra laptop functionalities. In its current Fn keys (hotkeys):
form, this driver let the user set or query the screen brightness ------------------
through the backlight subsystem and remove/apply power to some devices. Some models report hotkeys through the SNC or SPIC devices, such events are
reported both through the ACPI subsystem as acpi events and through the INPUT
subsystem. See the logs of acpid or /proc/acpi/event and
/proc/bus/input/devices to find out what those events are and which input
devices are created by the driver.
Backlight control: Backlight control:
------------------ ------------------
...@@ -39,6 +45,8 @@ The files are: ...@@ -39,6 +45,8 @@ The files are:
audiopower power on/off the internal sound card audiopower power on/off the internal sound card
lanpower power on/off the internal ethernet card lanpower power on/off the internal ethernet card
(only in debug mode) (only in debug mode)
bluetoothpower power on/off the internal bluetooth device
fanspeed get/set the fan speed
Note that some files may be missing if they are not supported Note that some files may be missing if they are not supported
by your particular laptop model. by your particular laptop model.
...@@ -76,9 +84,9 @@ The sony-laptop driver creates, for some of those methods (the most ...@@ -76,9 +84,9 @@ The sony-laptop driver creates, for some of those methods (the most
current ones found on several Vaio models), an entry under current ones found on several Vaio models), an entry under
/sys/devices/platform/sony-laptop, just like the 'cdpower' one. /sys/devices/platform/sony-laptop, just like the 'cdpower' one.
You can create other entries corresponding to your own laptop methods by 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 further editing the source (see the 'sony_nc_values' table, and add a new
entry to this table with your get/set method names using the entry to this table with your get/set method names using the
HANDLE_NAMES macro). SNC_HANDLE_NAMES macro).
Your mission, should you accept it, is to try finding out what Your mission, should you accept it, is to try finding out what
those entries are for, by reading/writing random values from/to those those entries are for, by reading/writing random values from/to those
...@@ -87,6 +95,9 @@ files and find out what is the impact on your laptop. ...@@ -87,6 +95,9 @@ files and find out what is the impact on your laptop.
Should you find anything interesting, please report it back to me, Should you find anything interesting, please report it back to me,
I will not disavow all knowledge of your actions :) I will not disavow all knowledge of your actions :)
See also http://www.linux.it/~malattia/wiki/index.php/Sony_drivers for other
useful info.
Bugs/Limitations: Bugs/Limitations:
----------------- -----------------
......
...@@ -5,10 +5,9 @@ Vaio Picturebook Motion Eye Camera Driver Readme ...@@ -5,10 +5,9 @@ Vaio Picturebook Motion Eye Camera Driver Readme
Copyright (C) 2000 Andrew Tridgell <tridge@samba.org> Copyright (C) 2000 Andrew Tridgell <tridge@samba.org>
This driver enable the use of video4linux compatible applications with the This driver enable the use of video4linux compatible applications with the
Motion Eye camera. This driver requires the "Sony Vaio Programmable I/O Motion Eye camera. This driver requires the "Sony Laptop Extras" driver (which
Control Device" driver (which can be found in the "Character drivers" can be found in the "Misc devices" section of the kernel configuration utility)
section of the kernel configuration utility) to be compiled and installed to be compiled and installed (using its "camera=1" parameter).
(using its "camera=1" parameter).
It can do at maximum 30 fps @ 320x240 or 15 fps @ 640x480. It can do at maximum 30 fps @ 320x240 or 15 fps @ 640x480.
......
...@@ -1658,15 +1658,6 @@ W: http://www.ia64-linux.org/ ...@@ -1658,15 +1658,6 @@ W: http://www.ia64-linux.org/
T: git kernel.org:/pub/scm/linux/kernel/git/aegl/linux-2.6.git T: git kernel.org:/pub/scm/linux/kernel/git/aegl/linux-2.6.git
S: Maintained S: Maintained
IBM ACPI EXTRAS DRIVER
P: Henrique de Moraes Holschuh
M: ibm-acpi@hmh.eng.br
L: ibm-acpi-devel@lists.sourceforge.net
W: http://ibm-acpi.sourceforge.net
W: http://thinkwiki.org/wiki/Ibm-acpi
T: git repo.or.cz/linux-2.6/linux-acpi-2.6/ibm-acpi-2.6.git
S: Maintained
SN-IA64 (Itanium) SUB-PLATFORM SN-IA64 (Itanium) SUB-PLATFORM
P: Jes Sorensen P: Jes Sorensen
M: jes@sgi.com M: jes@sgi.com
...@@ -3166,6 +3157,15 @@ P: Chris Zankel ...@@ -3166,6 +3157,15 @@ P: Chris Zankel
M: chris@zankel.net M: chris@zankel.net
S: Maintained S: Maintained
THINKPAD ACPI EXTRAS DRIVER
P: Henrique de Moraes Holschuh
M: ibm-acpi@hmh.eng.br
L: ibm-acpi-devel@lists.sourceforge.net
W: http://ibm-acpi.sourceforge.net
W: http://thinkwiki.org/wiki/Ibm-acpi
T: git repo.or.cz/linux-2.6/linux-acpi-2.6/ibm-acpi-2.6.git
S: Maintained
UltraSPARC (sparc64): UltraSPARC (sparc64):
P: David S. Miller P: David S. Miller
M: davem@davemloft.net M: davem@davemloft.net
......
...@@ -23,10 +23,13 @@ static int __init nvidia_hpet_check(struct acpi_table_header *header) ...@@ -23,10 +23,13 @@ static int __init nvidia_hpet_check(struct acpi_table_header *header)
static int __init check_bridge(int vendor, int device) static int __init check_bridge(int vendor, int device)
{ {
#ifdef CONFIG_ACPI #ifdef CONFIG_ACPI
static int warned;
/* According to Nvidia all timer overrides are bogus unless HPET /* According to Nvidia all timer overrides are bogus unless HPET
is enabled. */ is enabled. */
if (!acpi_use_timer_override && vendor == PCI_VENDOR_ID_NVIDIA) { if (!acpi_use_timer_override && vendor == PCI_VENDOR_ID_NVIDIA) {
if (acpi_table_parse(ACPI_SIG_HPET, nvidia_hpet_check)) { if (!warned && acpi_table_parse(ACPI_SIG_HPET,
nvidia_hpet_check)) {
warned = 1;
acpi_skip_timer_override = 1; acpi_skip_timer_override = 1;
printk(KERN_INFO "Nvidia board " printk(KERN_INFO "Nvidia board "
"detected. Ignoring ACPI " "detected. Ignoring ACPI "
......
...@@ -85,8 +85,8 @@ config ACPI_PROCFS ...@@ -85,8 +85,8 @@ config ACPI_PROCFS
depends on ACPI depends on ACPI
default y default y
---help--- ---help---
Procfs interface for ACPI is made optional for back-compatible. The Procfs interface for ACPI is made optional for backward compatibility.
As the same functions are duplicated in sysfs interface As the same functions are duplicated in the sysfs interface
and this proc interface will be removed some time later, and this proc interface will be removed some time later,
it's marked as deprecated. it's marked as deprecated.
( /proc/acpi/debug_layer && debug_level are deprecated by ( /proc/acpi/debug_layer && debug_level are deprecated by
...@@ -218,43 +218,6 @@ config ACPI_ASUS ...@@ -218,43 +218,6 @@ config ACPI_ASUS
NOTE: This driver is deprecated and will probably be removed soon, NOTE: This driver is deprecated and will probably be removed soon,
use asus-laptop instead. use asus-laptop instead.
config ACPI_IBM
tristate "IBM ThinkPad Laptop Extras"
depends on X86
select BACKLIGHT_CLASS_DEVICE
---help---
This is a Linux ACPI driver for the IBM ThinkPad laptops. It adds
support for Fn-Fx key combinations, Bluetooth control, video
output switching, ThinkLight control, UltraBay eject and more.
For more information about this driver see <file:Documentation/ibm-acpi.txt>
and <http://ibm-acpi.sf.net/> .
If you have an IBM ThinkPad laptop, say Y or M here.
config ACPI_IBM_DOCK
bool "Legacy Docking Station Support"
depends on ACPI_IBM
depends on ACPI_DOCK=n
default n
---help---
Allows the ibm_acpi driver to handle docking station events.
This support is obsoleted by CONFIG_HOTPLUG_PCI_ACPI. It will
allow locking and removing the laptop from the docking station,
but will not properly connect PCI devices.
If you are not sure, say N here.
config ACPI_IBM_BAY
bool "Legacy Removable Bay Support"
depends on ACPI_IBM
default y
---help---
Allows the ibm_acpi driver to handle removable bays. It will allow
disabling the device in the bay, and also generate notifications when
the bay lever is ejected or inserted.
If you are not sure, say Y here.
config ACPI_TOSHIBA config ACPI_TOSHIBA
tristate "Toshiba Laptop Extras" tristate "Toshiba Laptop Extras"
depends on X86 depends on X86
...@@ -388,11 +351,10 @@ config ACPI_HOTPLUG_MEMORY ...@@ -388,11 +351,10 @@ config ACPI_HOTPLUG_MEMORY
config ACPI_SBS config ACPI_SBS
tristate "Smart Battery System (EXPERIMENTAL)" tristate "Smart Battery System (EXPERIMENTAL)"
depends on X86 && I2C depends on X86
depends on EXPERIMENTAL depends on EXPERIMENTAL
help help
This driver adds support for the Smart Battery System. This driver adds support for the Smart Battery System.
Depends on I2C (Device Drivers ---> I2C support)
A "Smart Battery" is quite old and quite rare compared A "Smart Battery" is quite old and quite rare compared
to today's ACPI "Control Method" battery. to today's ACPI "Control Method" battery.
......
# #
# Makefile for the Linux ACPI interpreter # Makefile for the Linux ACPI interpreter
# #
export ACPI_CFLAGS export ACPI_CFLAGS
...@@ -32,16 +32,17 @@ obj-y += osl.o utils.o \ ...@@ -32,16 +32,17 @@ obj-y += osl.o utils.o \
processor-objs += processor_core.o processor_throttling.o \ processor-objs += processor_core.o processor_throttling.o \
processor_idle.o processor_thermal.o processor_idle.o processor_thermal.o
ifdef CONFIG_CPU_FREQ ifdef CONFIG_CPU_FREQ
processor-objs += processor_perflib.o processor-objs += processor_perflib.o
endif endif
obj-y += sleep/ obj-y += sleep/
obj-y += bus.o glue.o obj-y += bus.o glue.o
obj-y += scan.o obj-y += scan.o
# Keep EC driver first. Initialization of others depend on it.
obj-$(CONFIG_ACPI_EC) += ec.o
obj-$(CONFIG_ACPI_AC) += ac.o obj-$(CONFIG_ACPI_AC) += ac.o
obj-$(CONFIG_ACPI_BATTERY) += battery.o obj-$(CONFIG_ACPI_BATTERY) += battery.o
obj-$(CONFIG_ACPI_BUTTON) += button.o obj-$(CONFIG_ACPI_BUTTON) += button.o
obj-$(CONFIG_ACPI_EC) += ec.o
obj-$(CONFIG_ACPI_FAN) += fan.o obj-$(CONFIG_ACPI_FAN) += fan.o
obj-$(CONFIG_ACPI_DOCK) += dock.o obj-$(CONFIG_ACPI_DOCK) += dock.o
obj-$(CONFIG_ACPI_BAY) += bay.o obj-$(CONFIG_ACPI_BAY) += bay.o
...@@ -55,8 +56,7 @@ obj-$(CONFIG_ACPI_SYSTEM) += system.o event.o ...@@ -55,8 +56,7 @@ obj-$(CONFIG_ACPI_SYSTEM) += system.o event.o
obj-$(CONFIG_ACPI_DEBUG) += debug.o obj-$(CONFIG_ACPI_DEBUG) += debug.o
obj-$(CONFIG_ACPI_NUMA) += numa.o obj-$(CONFIG_ACPI_NUMA) += numa.o
obj-$(CONFIG_ACPI_ASUS) += asus_acpi.o obj-$(CONFIG_ACPI_ASUS) += asus_acpi.o
obj-$(CONFIG_ACPI_IBM) += ibm_acpi.o
obj-$(CONFIG_ACPI_TOSHIBA) += toshiba_acpi.o obj-$(CONFIG_ACPI_TOSHIBA) += toshiba_acpi.o
obj-$(CONFIG_ACPI_HOTPLUG_MEMORY) += acpi_memhotplug.o obj-$(CONFIG_ACPI_HOTPLUG_MEMORY) += acpi_memhotplug.o
obj-y += cm_sbs.o obj-y += cm_sbs.o
obj-$(CONFIG_ACPI_SBS) += i2c_ec.o sbs.o obj-$(CONFIG_ACPI_SBS) += sbs.o
...@@ -44,11 +44,6 @@ MODULE_AUTHOR("Naveen B S <naveen.b.s@intel.com>"); ...@@ -44,11 +44,6 @@ MODULE_AUTHOR("Naveen B S <naveen.b.s@intel.com>");
MODULE_DESCRIPTION("Hotplug Mem Driver"); MODULE_DESCRIPTION("Hotplug Mem Driver");
MODULE_LICENSE("GPL"); MODULE_LICENSE("GPL");
/* ACPI _STA method values */
#define ACPI_MEMORY_STA_PRESENT (0x00000001UL)
#define ACPI_MEMORY_STA_ENABLED (0x00000002UL)
#define ACPI_MEMORY_STA_FUNCTIONAL (0x00000008UL)
/* Memory Device States */ /* Memory Device States */
#define MEMORY_INVALID_STATE 0 #define MEMORY_INVALID_STATE 0
#define MEMORY_POWER_ON_STATE 1 #define MEMORY_POWER_ON_STATE 1
...@@ -204,9 +199,9 @@ static int acpi_memory_check_device(struct acpi_memory_device *mem_device) ...@@ -204,9 +199,9 @@ static int acpi_memory_check_device(struct acpi_memory_device *mem_device)
* Check for device status. Device should be * Check for device status. Device should be
* present/enabled/functioning. * present/enabled/functioning.
*/ */
if (!((current_status & ACPI_MEMORY_STA_PRESENT) if (!((current_status & ACPI_STA_DEVICE_PRESENT)
&& (current_status & ACPI_MEMORY_STA_ENABLED) && (current_status & ACPI_STA_DEVICE_ENABLED)
&& (current_status & ACPI_MEMORY_STA_FUNCTIONAL))) && (current_status & ACPI_STA_DEVICE_FUNCTIONING)))
return -ENODEV; return -ENODEV;
return 0; return 0;
...@@ -286,7 +281,7 @@ static int acpi_memory_powerdown_device(struct acpi_memory_device *mem_device) ...@@ -286,7 +281,7 @@ static int acpi_memory_powerdown_device(struct acpi_memory_device *mem_device)
return -ENODEV; return -ENODEV;
/* Check for device status. Device should be disabled */ /* Check for device status. Device should be disabled */
if (current_status & ACPI_MEMORY_STA_ENABLED) if (current_status & ACPI_STA_DEVICE_ENABLED)
return -EINVAL; return -EINVAL;
return 0; return 0;
......
...@@ -103,7 +103,9 @@ int acpi_bus_get_status(struct acpi_device *device) ...@@ -103,7 +103,9 @@ int acpi_bus_get_status(struct acpi_device *device)
else if (device->parent) else if (device->parent)
device->status = device->parent->status; device->status = device->parent->status;
else else
STRUCT_TO_INT(device->status) = 0x0F; STRUCT_TO_INT(device->status) =
ACPI_STA_DEVICE_PRESENT | ACPI_STA_DEVICE_ENABLED |
ACPI_STA_DEVICE_UI | ACPI_STA_DEVICE_FUNCTIONING;
if (device->status.functional && !device->status.present) { if (device->status.functional && !device->status.present) {
printk(KERN_WARNING PREFIX "Device [%s] status [%08x]: " printk(KERN_WARNING PREFIX "Device [%s] status [%08x]: "
......
...@@ -49,8 +49,6 @@ MODULE_AUTHOR("Anil S Keshavamurthy"); ...@@ -49,8 +49,6 @@ MODULE_AUTHOR("Anil S Keshavamurthy");
MODULE_DESCRIPTION("ACPI container driver"); MODULE_DESCRIPTION("ACPI container driver");
MODULE_LICENSE("GPL"); MODULE_LICENSE("GPL");
#define ACPI_STA_PRESENT (0x00000001)
static int acpi_container_add(struct acpi_device *device); static int acpi_container_add(struct acpi_device *device);
static int acpi_container_remove(struct acpi_device *device, int type); static int acpi_container_remove(struct acpi_device *device, int type);
...@@ -75,13 +73,13 @@ static int is_device_present(acpi_handle handle) ...@@ -75,13 +73,13 @@ static int is_device_present(acpi_handle handle)
status = acpi_get_handle(handle, "_STA", &temp); status = acpi_get_handle(handle, "_STA", &temp);
if (ACPI_FAILURE(status)) if (ACPI_FAILURE(status))
return 1; /* _STA not found, assmue device present */ return 1; /* _STA not found, assume device present */
status = acpi_evaluate_integer(handle, "_STA", NULL, &sta); status = acpi_evaluate_integer(handle, "_STA", NULL, &sta);
if (ACPI_FAILURE(status)) if (ACPI_FAILURE(status))
return 0; /* Firmware error */ return 0; /* Firmware error */
return ((sta & ACPI_STA_PRESENT) == ACPI_STA_PRESENT); return ((sta & ACPI_STA_DEVICE_PRESENT) == ACPI_STA_DEVICE_PRESENT);
} }
/*******************************************************************/ /*******************************************************************/
......
...@@ -29,6 +29,7 @@ ...@@ -29,6 +29,7 @@
#include <linux/notifier.h> #include <linux/notifier.h>
#include <linux/platform_device.h> #include <linux/platform_device.h>
#include <linux/jiffies.h> #include <linux/jiffies.h>
#include <linux/stddef.h>
#include <acpi/acpi_bus.h> #include <acpi/acpi_bus.h>
#include <acpi/acpi_drivers.h> #include <acpi/acpi_drivers.h>
...@@ -667,6 +668,23 @@ static ssize_t write_undock(struct device *dev, struct device_attribute *attr, ...@@ -667,6 +668,23 @@ static ssize_t write_undock(struct device *dev, struct device_attribute *attr,
} }
DEVICE_ATTR(undock, S_IWUSR, NULL, write_undock); DEVICE_ATTR(undock, S_IWUSR, NULL, write_undock);
/*
* show_dock_uid - read method for "uid" file in sysfs
*/
static ssize_t show_dock_uid(struct device *dev,
struct device_attribute *attr, char *buf)
{
unsigned long lbuf;
acpi_status status = acpi_evaluate_integer(dock_station->handle, "_UID", NULL, &lbuf);
if(ACPI_FAILURE(status)) {
return 0;
}
return snprintf(buf, PAGE_SIZE, "%lx\n", lbuf);
}
DEVICE_ATTR(uid, S_IRUGO, show_dock_uid, NULL);
/** /**
* dock_add - add a new dock station * dock_add - add a new dock station
* @handle: the dock station handle * @handle: the dock station handle
...@@ -715,6 +733,13 @@ static int dock_add(acpi_handle handle) ...@@ -715,6 +733,13 @@ static int dock_add(acpi_handle handle)
kfree(dock_station); kfree(dock_station);
return ret; return ret;
} }
ret = device_create_file(&dock_device.dev, &dev_attr_uid);
if (ret) {
printk("Error %d adding sysfs file\n", ret);
platform_device_unregister(&dock_device);
kfree(dock_station);
return ret;
}
/* Find dependent devices */ /* Find dependent devices */
acpi_walk_namespace(ACPI_TYPE_DEVICE, ACPI_ROOT_OBJECT, acpi_walk_namespace(ACPI_TYPE_DEVICE, ACPI_ROOT_OBJECT,
......
This diff is collapsed.
This diff is collapsed.
/*
* SMBus driver for ACPI Embedded Controller ($Revision: 1.2 $)
*
* Copyright (c) 2002, 2005 Ducrot Bruno
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation version 2.
*/
struct acpi_ec_smbus {
struct i2c_adapter adapter;
union acpi_ec *ec;
int base;
int alert;
};
struct acpi_ec_hc {
acpi_handle handle;
struct acpi_ec_smbus *smbus;
};
struct acpi_ec_hc *acpi_get_ec_hc(struct acpi_device *device);
...@@ -70,8 +70,6 @@ ...@@ -70,8 +70,6 @@
#define ACPI_PROCESSOR_LIMIT_USER 0 #define ACPI_PROCESSOR_LIMIT_USER 0
#define ACPI_PROCESSOR_LIMIT_THERMAL 1 #define ACPI_PROCESSOR_LIMIT_THERMAL 1
#define ACPI_STA_PRESENT 0x00000001
#define _COMPONENT ACPI_PROCESSOR_COMPONENT #define _COMPONENT ACPI_PROCESSOR_COMPONENT
ACPI_MODULE_NAME("processor_core"); ACPI_MODULE_NAME("processor_core");
...@@ -779,7 +777,7 @@ static int is_processor_present(acpi_handle handle) ...@@ -779,7 +777,7 @@ static int is_processor_present(acpi_handle handle)
status = acpi_evaluate_integer(handle, "_STA", NULL, &sta); status = acpi_evaluate_integer(handle, "_STA", NULL, &sta);
if (ACPI_FAILURE(status) || !(sta & ACPI_STA_PRESENT)) { if (ACPI_FAILURE(status) || !(sta & ACPI_STA_DEVICE_PRESENT)) {
ACPI_EXCEPTION((AE_INFO, status, "Processor Device is not present")); ACPI_EXCEPTION((AE_INFO, status, "Processor Device is not present"));
return 0; return 0;
} }
......
...@@ -51,14 +51,6 @@ ...@@ -51,14 +51,6 @@
#include <asm/apic.h> #include <asm/apic.h>
#endif #endif
/*
* Include the apic definitions for x86 to have the APIC timer related defines
* available also for UP (on SMP it gets magically included via linux/smp.h).
*/
#ifdef CONFIG_X86
#include <asm/apic.h>
#endif
#include <asm/io.h> #include <asm/io.h>
#include <asm/uaccess.h> #include <asm/uaccess.h>
......
This diff is collapsed.
...@@ -1068,7 +1068,9 @@ acpi_add_single_object(struct acpi_device **child, ...@@ -1068,7 +1068,9 @@ acpi_add_single_object(struct acpi_device **child,
} }
break; break;
default: default:
STRUCT_TO_INT(device->status) = 0x0F; STRUCT_TO_INT(device->status) =
ACPI_STA_DEVICE_PRESENT | ACPI_STA_DEVICE_ENABLED |
ACPI_STA_DEVICE_UI | ACPI_STA_DEVICE_FUNCTIONING;
break; break;
} }
......
...@@ -350,21 +350,31 @@ acpi_system_wakeup_device_seq_show(struct seq_file *seq, void *offset) ...@@ -350,21 +350,31 @@ acpi_system_wakeup_device_seq_show(struct seq_file *seq, void *offset)
{ {
struct list_head *node, *next; struct list_head *node, *next;
seq_printf(seq, "Device Sleep state Status\n"); seq_printf(seq, "Device\tS-state\t Status Sysfs node\n");
spin_lock(&acpi_device_lock); spin_lock(&acpi_device_lock);
list_for_each_safe(node, next, &acpi_wakeup_device_list) { list_for_each_safe(node, next, &acpi_wakeup_device_list) {
struct acpi_device *dev = struct acpi_device *dev =
container_of(node, struct acpi_device, wakeup_list); container_of(node, struct acpi_device, wakeup_list);
struct device *ldev;
if (!dev->wakeup.flags.valid) if (!dev->wakeup.flags.valid)
continue; continue;
spin_unlock(&acpi_device_lock); spin_unlock(&acpi_device_lock);
seq_printf(seq, "%4s %4d %s%8s\n",
ldev = acpi_get_physical_device(dev->handle);
seq_printf(seq, "%s\t S%d\t%c%-8s ",
dev->pnp.bus_id, dev->pnp.bus_id,
(u32) dev->wakeup.sleep_state, (u32) dev->wakeup.sleep_state,
dev->wakeup.flags.run_wake ? "*" : "", dev->wakeup.flags.run_wake ? '*' : ' ',
dev->wakeup.state.enabled ? "enabled" : "disabled"); dev->wakeup.state.enabled ? "enabled" : "disabled");
if (ldev)
seq_printf(seq, "%s:%s",
ldev->bus ? ldev->bus->name : "no-bus",
ldev->bus_id);
seq_printf(seq, "\n");
put_device(ldev);
spin_lock(&acpi_device_lock); spin_lock(&acpi_device_lock);
} }
spin_unlock(&acpi_device_lock); spin_unlock(&acpi_device_lock);
......
...@@ -347,6 +347,18 @@ static void acpi_tb_convert_fadt(void) ...@@ -347,6 +347,18 @@ static void acpi_tb_convert_fadt(void)
acpi_gbl_xpm1b_enable.space_id = acpi_gbl_FADT.xpm1a_event_block.space_id; acpi_gbl_xpm1b_enable.space_id = acpi_gbl_FADT.xpm1a_event_block.space_id;
} }
/*
* For ACPI 1.0 FADTs, ensure that reserved fields (which should be zero)
* are indeed zero. This will workaround BIOSs that inadvertently placed
* values in these fields.
*/
if (acpi_gbl_FADT.header.revision < 3) {
acpi_gbl_FADT.preferred_profile = 0;
acpi_gbl_FADT.pstate_control = 0;
acpi_gbl_FADT.cst_control = 0;
acpi_gbl_FADT.boot_flags = 0;
}
} }
/****************************************************************************** /******************************************************************************
......
/* /*
* Sony Programmable I/O Control Device driver for VAIO * Sony Programmable I/O Control Device driver for VAIO
* *
* Copyright (C) 2007 Mattia Dongili <malattia@linux.it>
*
* Copyright (C) 2001-2005 Stelian Pop <stelian@popies.net> * Copyright (C) 2001-2005 Stelian Pop <stelian@popies.net>
* *
* Copyright (C) 2005 Narayanan R S <nars@kadamba.org> * Copyright (C) 2005 Narayanan R S <nars@kadamba.org>
...@@ -95,6 +97,11 @@ module_param(useinput, int, 0444); ...@@ -95,6 +97,11 @@ module_param(useinput, int, 0444);
MODULE_PARM_DESC(useinput, MODULE_PARM_DESC(useinput,
"set this if you would like sonypi to feed events to the input subsystem"); "set this if you would like sonypi to feed events to the input subsystem");
static int check_ioport = 1;
module_param(check_ioport, int, 0444);
MODULE_PARM_DESC(check_ioport,
"set this to 0 if you think the automatic ioport check for sony-laptop is wrong");
#define SONYPI_DEVICE_MODEL_TYPE1 1 #define SONYPI_DEVICE_MODEL_TYPE1 1
#define SONYPI_DEVICE_MODEL_TYPE2 2 #define SONYPI_DEVICE_MODEL_TYPE2 2
#define SONYPI_DEVICE_MODEL_TYPE3 3 #define SONYPI_DEVICE_MODEL_TYPE3 3
...@@ -477,7 +484,7 @@ static struct sonypi_device { ...@@ -477,7 +484,7 @@ static struct sonypi_device {
u16 evtype_offset; u16 evtype_offset;
int camera_power; int camera_power;
int bluetooth_power; int bluetooth_power;
struct semaphore lock; struct mutex lock;
struct kfifo *fifo; struct kfifo *fifo;
spinlock_t fifo_lock; spinlock_t fifo_lock;
wait_queue_head_t fifo_proc_list; wait_queue_head_t fifo_proc_list;
...@@ -884,7 +891,7 @@ int sonypi_camera_command(int command, u8 value) ...@@ -884,7 +891,7 @@ int sonypi_camera_command(int command, u8 value)
if (!camera) if (!camera)
return -EIO; return -EIO;
down(&sonypi_device.lock); mutex_lock(&sonypi_device.lock);
switch (command) { switch (command) {
case SONYPI_COMMAND_SETCAMERA: case SONYPI_COMMAND_SETCAMERA:
...@@ -919,7 +926,7 @@ int sonypi_camera_command(int command, u8 value) ...@@ -919,7 +926,7 @@ int sonypi_camera_command(int command, u8 value)
command); command);
break; break;
} }
up(&sonypi_device.lock); mutex_unlock(&sonypi_device.lock);
return 0; return 0;
} }
...@@ -938,20 +945,20 @@ static int sonypi_misc_fasync(int fd, struct file *filp, int on) ...@@ -938,20 +945,20 @@ static int sonypi_misc_fasync(int fd, struct file *filp, int on)
static int sonypi_misc_release(struct inode *inode, struct file *file) static int sonypi_misc_release(struct inode *inode, struct file *file)
{ {
sonypi_misc_fasync(-1, file, 0); sonypi_misc_fasync(-1, file, 0);
down(&sonypi_device.lock); mutex_lock(&sonypi_device.lock);
sonypi_device.open_count--; sonypi_device.open_count--;
up(&sonypi_device.lock); mutex_unlock(&sonypi_device.lock);
return 0; return 0;
} }
static int sonypi_misc_open(struct inode *inode, struct file *file) static int sonypi_misc_open(struct inode *inode, struct file *file)
{ {
down(&sonypi_device.lock); mutex_lock(&sonypi_device.lock);
/* Flush input queue on first open */ /* Flush input queue on first open */
if (!sonypi_device.open_count) if (!sonypi_device.open_count)
kfifo_reset(sonypi_device.fifo); kfifo_reset(sonypi_device.fifo);
sonypi_device.open_count++; sonypi_device.open_count++;
up(&sonypi_device.lock); mutex_unlock(&sonypi_device.lock);
return 0; return 0;
} }
...@@ -1001,7 +1008,7 @@ static int sonypi_misc_ioctl(struct inode *ip, struct file *fp, ...@@ -1001,7 +1008,7 @@ static int sonypi_misc_ioctl(struct inode *ip, struct file *fp,
u8 val8; u8 val8;
u16 val16; u16 val16;
down(&sonypi_device.lock); mutex_lock(&sonypi_device.lock);
switch (cmd) { switch (cmd) {
case SONYPI_IOCGBRT: case SONYPI_IOCGBRT:
if (sonypi_ec_read(SONYPI_LCD_LIGHT, &val8)) { if (sonypi_ec_read(SONYPI_LCD_LIGHT, &val8)) {
...@@ -1101,7 +1108,7 @@ static int sonypi_misc_ioctl(struct inode *ip, struct file *fp, ...@@ -1101,7 +1108,7 @@ static int sonypi_misc_ioctl(struct inode *ip, struct file *fp,
default: default:
ret = -EINVAL; ret = -EINVAL;
} }
up(&sonypi_device.lock); mutex_unlock(&sonypi_device.lock);
return ret; return ret;
} }
...@@ -1260,6 +1267,28 @@ static int __devinit sonypi_create_input_devices(void) ...@@ -1260,6 +1267,28 @@ static int __devinit sonypi_create_input_devices(void)
static int __devinit sonypi_setup_ioports(struct sonypi_device *dev, static int __devinit sonypi_setup_ioports(struct sonypi_device *dev,
const struct sonypi_ioport_list *ioport_list) const struct sonypi_ioport_list *ioport_list)
{ {
/* try to detect if sony-laptop is being used and thus
* has already requested one of the known ioports.
* As in the deprecated check_region this is racy has we have
* multiple ioports available and one of them can be requested
* between this check and the subsequent request. Anyway, as an
* attempt to be some more user-friendly as we currently are,
* this is enough.
*/
const struct sonypi_ioport_list *check = ioport_list;
while (check_ioport && check->port1) {
if (!request_region(check->port1,
sonypi_device.region_size,
"Sony Programable I/O Device Check")) {
printk(KERN_ERR "sonypi: ioport 0x%.4x busy, using sony-laptop? "
"if not use check_ioport=0\n",
check->port1);
return -EBUSY;
}
release_region(check->port1, sonypi_device.region_size);
check++;
}
while (ioport_list->port1) { while (ioport_list->port1) {
if (request_region(ioport_list->port1, if (request_region(ioport_list->port1,
...@@ -1321,6 +1350,10 @@ static int __devinit sonypi_probe(struct platform_device *dev) ...@@ -1321,6 +1350,10 @@ static int __devinit sonypi_probe(struct platform_device *dev)
struct pci_dev *pcidev; struct pci_dev *pcidev;
int error; int error;
printk(KERN_WARNING "sonypi: please try the sony-laptop module instead "
"and report failures, see also "
"http://www.linux.it/~malattia/wiki/index.php/Sony_drivers\n");
spin_lock_init(&sonypi_device.fifo_lock); spin_lock_init(&sonypi_device.fifo_lock);
sonypi_device.fifo = kfifo_alloc(SONYPI_BUF_SIZE, GFP_KERNEL, sonypi_device.fifo = kfifo_alloc(SONYPI_BUF_SIZE, GFP_KERNEL,
&sonypi_device.fifo_lock); &sonypi_device.fifo_lock);
...@@ -1330,7 +1363,7 @@ static int __devinit sonypi_probe(struct platform_device *dev) ...@@ -1330,7 +1363,7 @@ static int __devinit sonypi_probe(struct platform_device *dev)
} }
init_waitqueue_head(&sonypi_device.fifo_proc_list); init_waitqueue_head(&sonypi_device.fifo_proc_list);
init_MUTEX(&sonypi_device.lock); mutex_init(&sonypi_device.lock);
sonypi_device.bluetooth_power = -1; sonypi_device.bluetooth_power = -1;
if ((pcidev = pci_get_device(PCI_VENDOR_ID_INTEL, if ((pcidev = pci_get_device(PCI_VENDOR_ID_INTEL,
......
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
/* /*
* The I/O port the PMTMR resides at. * The I/O port the PMTMR resides at.
* The location is detected during setup_arch(), * The location is detected during setup_arch(),
* in arch/i386/acpi/boot.c * in arch/i386/kernel/acpi/boot.c
*/ */
u32 pmtmr_ioport __read_mostly; u32 pmtmr_ioport __read_mostly;
......
...@@ -577,14 +577,14 @@ config VIDEO_ZORAN_AVS6EYES ...@@ -577,14 +577,14 @@ config VIDEO_ZORAN_AVS6EYES
config VIDEO_MEYE config VIDEO_MEYE
tristate "Sony Vaio Picturebook Motion Eye Video For Linux" tristate "Sony Vaio Picturebook Motion Eye Video For Linux"
depends on PCI && SONYPI && VIDEO_V4L1 depends on PCI && SONY_LAPTOP && VIDEO_V4L1
---help--- ---help---
This is the video4linux driver for the Motion Eye camera found This is the video4linux driver for the Motion Eye camera found
in the Vaio Picturebook laptops. Please read the material in in the Vaio Picturebook laptops. Please read the material in
<file:Documentation/video4linux/meye.txt> for more information. <file:Documentation/video4linux/meye.txt> for more information.
If you say Y or M here, you need to say Y or M to "Sony Programmable If you say Y or M here, you need to say Y or M to "Sony Laptop
I/O Control Device" in the character device section. Extras" in the misc device section.
To compile this driver as a module, choose M here: the To compile this driver as a module, choose M here: the
module will be called meye. module will be called meye.
......
...@@ -925,13 +925,13 @@ static int meye_do_ioctl(struct inode *inode, struct file *file, ...@@ -925,13 +925,13 @@ static int meye_do_ioctl(struct inode *inode, struct file *file,
if (p->palette != VIDEO_PALETTE_YUV422 && p->palette != VIDEO_PALETTE_YUYV) if (p->palette != VIDEO_PALETTE_YUV422 && p->palette != VIDEO_PALETTE_YUYV)
return -EINVAL; return -EINVAL;
mutex_lock(&meye.lock); mutex_lock(&meye.lock);
sonypi_camera_command(SONYPI_COMMAND_SETCAMERABRIGHTNESS, sony_pic_camera_command(SONY_PIC_COMMAND_SETCAMERABRIGHTNESS,
p->brightness >> 10); p->brightness >> 10);
sonypi_camera_command(SONYPI_COMMAND_SETCAMERAHUE, sony_pic_camera_command(SONY_PIC_COMMAND_SETCAMERAHUE,
p->hue >> 10); p->hue >> 10);
sonypi_camera_command(SONYPI_COMMAND_SETCAMERACOLOR, sony_pic_camera_command(SONY_PIC_COMMAND_SETCAMERACOLOR,
p->colour >> 10); p->colour >> 10);
sonypi_camera_command(SONYPI_COMMAND_SETCAMERACONTRAST, sony_pic_camera_command(SONY_PIC_COMMAND_SETCAMERACONTRAST,
p->contrast >> 10); p->contrast >> 10);
meye.picture = *p; meye.picture = *p;
mutex_unlock(&meye.lock); mutex_unlock(&meye.lock);
...@@ -1043,11 +1043,11 @@ static int meye_do_ioctl(struct inode *inode, struct file *file, ...@@ -1043,11 +1043,11 @@ static int meye_do_ioctl(struct inode *inode, struct file *file,
meye.params.quality != jp->quality) meye.params.quality != jp->quality)
mchip_hic_stop(); /* need restart */ mchip_hic_stop(); /* need restart */
meye.params = *jp; meye.params = *jp;
sonypi_camera_command(SONYPI_COMMAND_SETCAMERASHARPNESS, sony_pic_camera_command(SONY_PIC_COMMAND_SETCAMERASHARPNESS,
meye.params.sharpness); meye.params.sharpness);
sonypi_camera_command(SONYPI_COMMAND_SETCAMERAAGC, sony_pic_camera_command(SONY_PIC_COMMAND_SETCAMERAAGC,
meye.params.agc); meye.params.agc);
sonypi_camera_command(SONYPI_COMMAND_SETCAMERAPICTURE, sony_pic_camera_command(SONY_PIC_COMMAND_SETCAMERAPICTURE,
meye.params.picture); meye.params.picture);
mutex_unlock(&meye.lock); mutex_unlock(&meye.lock);
break; break;
...@@ -1287,38 +1287,38 @@ static int meye_do_ioctl(struct inode *inode, struct file *file, ...@@ -1287,38 +1287,38 @@ static int meye_do_ioctl(struct inode *inode, struct file *file,
mutex_lock(&meye.lock); mutex_lock(&meye.lock);
switch (c->id) { switch (c->id) {
case V4L2_CID_BRIGHTNESS: case V4L2_CID_BRIGHTNESS:
sonypi_camera_command( sony_pic_camera_command(
SONYPI_COMMAND_SETCAMERABRIGHTNESS, c->value); SONY_PIC_COMMAND_SETCAMERABRIGHTNESS, c->value);
meye.picture.brightness = c->value << 10; meye.picture.brightness = c->value << 10;
break; break;
case V4L2_CID_HUE: case V4L2_CID_HUE:
sonypi_camera_command( sony_pic_camera_command(
SONYPI_COMMAND_SETCAMERAHUE, c->value); SONY_PIC_COMMAND_SETCAMERAHUE, c->value);
meye.picture.hue = c->value << 10; meye.picture.hue = c->value << 10;
break; break;
case V4L2_CID_CONTRAST: case V4L2_CID_CONTRAST:
sonypi_camera_command( sony_pic_camera_command(
SONYPI_COMMAND_SETCAMERACONTRAST, c->value); SONY_PIC_COMMAND_SETCAMERACONTRAST, c->value);
meye.picture.contrast = c->value << 10; meye.picture.contrast = c->value << 10;
break; break;
case V4L2_CID_SATURATION: case V4L2_CID_SATURATION:
sonypi_camera_command( sony_pic_camera_command(
SONYPI_COMMAND_SETCAMERACOLOR, c->value); SONY_PIC_COMMAND_SETCAMERACOLOR, c->value);
meye.picture.colour = c->value << 10; meye.picture.colour = c->value << 10;
break; break;
case V4L2_CID_AGC: case V4L2_CID_AGC:
sonypi_camera_command( sony_pic_camera_command(
SONYPI_COMMAND_SETCAMERAAGC, c->value); SONY_PIC_COMMAND_SETCAMERAAGC, c->value);
meye.params.agc = c->value; meye.params.agc = c->value;
break; break;
case V4L2_CID_SHARPNESS: case V4L2_CID_SHARPNESS:
sonypi_camera_command( sony_pic_camera_command(
SONYPI_COMMAND_SETCAMERASHARPNESS, c->value); SONY_PIC_COMMAND_SETCAMERASHARPNESS, c->value);
meye.params.sharpness = c->value; meye.params.sharpness = c->value;
break; break;
case V4L2_CID_PICTURE: case V4L2_CID_PICTURE:
sonypi_camera_command( sony_pic_camera_command(
SONYPI_COMMAND_SETCAMERAPICTURE, c->value); SONY_PIC_COMMAND_SETCAMERAPICTURE, c->value);
meye.params.picture = c->value; meye.params.picture = c->value;
break; break;
case V4L2_CID_JPEGQUAL: case V4L2_CID_JPEGQUAL:
...@@ -1848,7 +1848,7 @@ static int __devinit meye_probe(struct pci_dev *pcidev, ...@@ -1848,7 +1848,7 @@ static int __devinit meye_probe(struct pci_dev *pcidev,
memcpy(meye.video_dev, &meye_template, sizeof(meye_template)); memcpy(meye.video_dev, &meye_template, sizeof(meye_template));
meye.video_dev->dev = &meye.mchip_dev->dev; meye.video_dev->dev = &meye.mchip_dev->dev;
if ((ret = sonypi_camera_command(SONYPI_COMMAND_SETCAMERA, 1))) { if ((ret = sony_pic_camera_command(SONY_PIC_COMMAND_SETCAMERA, 1))) {
printk(KERN_ERR "meye: unable to power on the camera\n"); printk(KERN_ERR "meye: unable to power on the camera\n");
printk(KERN_ERR "meye: did you enable the camera in " printk(KERN_ERR "meye: did you enable the camera in "
"sonypi using the module options ?\n"); "sonypi using the module options ?\n");
...@@ -1928,13 +1928,13 @@ static int __devinit meye_probe(struct pci_dev *pcidev, ...@@ -1928,13 +1928,13 @@ static int __devinit meye_probe(struct pci_dev *pcidev,
meye.params.picture = 0; meye.params.picture = 0;
meye.params.framerate = 0; meye.params.framerate = 0;
sonypi_camera_command(SONYPI_COMMAND_SETCAMERABRIGHTNESS, 32); sony_pic_camera_command(SONY_PIC_COMMAND_SETCAMERABRIGHTNESS, 32);
sonypi_camera_command(SONYPI_COMMAND_SETCAMERAHUE, 32); sony_pic_camera_command(SONY_PIC_COMMAND_SETCAMERAHUE, 32);
sonypi_camera_command(SONYPI_COMMAND_SETCAMERACOLOR, 32); sony_pic_camera_command(SONY_PIC_COMMAND_SETCAMERACOLOR, 32);
sonypi_camera_command(SONYPI_COMMAND_SETCAMERACONTRAST, 32); sony_pic_camera_command(SONY_PIC_COMMAND_SETCAMERACONTRAST, 32);
sonypi_camera_command(SONYPI_COMMAND_SETCAMERASHARPNESS, 32); sony_pic_camera_command(SONY_PIC_COMMAND_SETCAMERASHARPNESS, 32);
sonypi_camera_command(SONYPI_COMMAND_SETCAMERAPICTURE, 0); sony_pic_camera_command(SONY_PIC_COMMAND_SETCAMERAPICTURE, 0);
sonypi_camera_command(SONYPI_COMMAND_SETCAMERAAGC, 48); sony_pic_camera_command(SONY_PIC_COMMAND_SETCAMERAAGC, 48);
printk(KERN_INFO "meye: Motion Eye Camera Driver v%s.\n", printk(KERN_INFO "meye: Motion Eye Camera Driver v%s.\n",
MEYE_DRIVER_VERSION); MEYE_DRIVER_VERSION);
...@@ -1953,7 +1953,7 @@ static int __devinit meye_probe(struct pci_dev *pcidev, ...@@ -1953,7 +1953,7 @@ static int __devinit meye_probe(struct pci_dev *pcidev,
outregions: outregions:
pci_disable_device(meye.mchip_dev); pci_disable_device(meye.mchip_dev);
outenabledev: outenabledev:
sonypi_camera_command(SONYPI_COMMAND_SETCAMERA, 0); sony_pic_camera_command(SONY_PIC_COMMAND_SETCAMERA, 0);
outsonypienable: outsonypienable:
kfifo_free(meye.doneq); kfifo_free(meye.doneq);
outkfifoalloc2: outkfifoalloc2:
...@@ -1986,7 +1986,7 @@ static void __devexit meye_remove(struct pci_dev *pcidev) ...@@ -1986,7 +1986,7 @@ static void __devexit meye_remove(struct pci_dev *pcidev)
pci_disable_device(meye.mchip_dev); pci_disable_device(meye.mchip_dev);
sonypi_camera_command(SONYPI_COMMAND_SETCAMERA, 0); sony_pic_camera_command(SONY_PIC_COMMAND_SETCAMERA, 0);
kfifo_free(meye.doneq); kfifo_free(meye.doneq);
kfifo_free(meye.grabq); kfifo_free(meye.grabq);
......
...@@ -255,7 +255,7 @@ ...@@ -255,7 +255,7 @@
/****************************************************************************/ /****************************************************************************/
/* Sony Programmable I/O Controller for accessing the camera commands */ /* Sony Programmable I/O Controller for accessing the camera commands */
#include <linux/sonypi.h> #include <linux/sony-laptop.h>
/* private API definitions */ /* private API definitions */
#include <linux/meye.h> #include <linux/meye.h>
......
...@@ -112,14 +112,70 @@ config SONY_LAPTOP ...@@ -112,14 +112,70 @@ config SONY_LAPTOP
depends on X86 && ACPI depends on X86 && ACPI
select BACKLIGHT_CLASS_DEVICE select BACKLIGHT_CLASS_DEVICE
---help--- ---help---
This mini-driver drives the SNC device present in the ACPI BIOS of This mini-driver drives the SNC and SPIC devices present in the ACPI
the Sony Vaio laptops. BIOS of the Sony Vaio laptops.
It gives access to some extra laptop functionalities. In its current It gives access to some extra laptop functionalities like Bluetooth,
form, this driver let the user set or query the screen brightness screen brightness control, Fn keys and allows powering on/off some
through the backlight subsystem and remove/apply power to some
devices. devices.
Read <file:Documentation/sony-laptop.txt> for more information. Read <file:Documentation/sony-laptop.txt> for more information.
config SONY_LAPTOP_OLD
bool "Sonypi compatibility"
depends on SONY_LAPTOP
---help---
Build the sonypi driver compatibility code into the sony-laptop driver.
config THINKPAD_ACPI
tristate "ThinkPad ACPI Laptop Extras"
depends on X86 && ACPI
select BACKLIGHT_CLASS_DEVICE
select HWMON
---help---
This is a driver for the IBM and Lenovo ThinkPad laptops. It adds
support for Fn-Fx key combinations, Bluetooth control, video
output switching, ThinkLight control, UltraBay eject and more.
For more information about this driver see
<file:Documentation/thinkpad-acpi.txt> and <http://ibm-acpi.sf.net/> .
This driver was formely known as ibm-acpi.
If you have an IBM or Lenovo ThinkPad laptop, say Y or M here.
config THINKPAD_ACPI_DEBUG
bool "Verbose debug mode"
depends on THINKPAD_ACPI
default n
---help---
Enables extra debugging information, at the expense of a slightly
increase in driver size.
If you are not sure, say N here.
config THINKPAD_ACPI_DOCK
bool "Legacy Docking Station Support"
depends on THINKPAD_ACPI
depends on ACPI_DOCK=n
default n
---help---
Allows the thinkpad_acpi driver to handle docking station events.
This support was made obsolete by the generic ACPI docking station
support (CONFIG_ACPI_DOCK). It will allow locking and removing the
laptop from the docking station, but will not properly connect PCI
devices.
If you are not sure, say N here.
config THINKPAD_ACPI_BAY
bool "Legacy Removable Bay Support"
depends on THINKPAD_ACPI
default y
---help---
Allows the thinkpad_acpi driver to handle removable bays. It will
eletrically disable the device in the bay, and also generate
notifications when the bay lever is ejected or inserted.
If you are not sure, say Y here.
endmenu endmenu
...@@ -12,3 +12,4 @@ obj-$(CONFIG_TIFM_CORE) += tifm_core.o ...@@ -12,3 +12,4 @@ obj-$(CONFIG_TIFM_CORE) += tifm_core.o
obj-$(CONFIG_TIFM_7XX1) += tifm_7xx1.o obj-$(CONFIG_TIFM_7XX1) += tifm_7xx1.o
obj-$(CONFIG_SGI_IOC4) += ioc4.o obj-$(CONFIG_SGI_IOC4) += ioc4.o
obj-$(CONFIG_SONY_LAPTOP) += sony-laptop.o obj-$(CONFIG_SONY_LAPTOP) += sony-laptop.o
obj-$(CONFIG_THINKPAD_ACPI) += thinkpad_acpi.o
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
...@@ -317,6 +317,10 @@ static int __init acpi_pci_init(void) ...@@ -317,6 +317,10 @@ static int __init acpi_pci_init(void)
{ {
int ret; int ret;
if (acpi_gbl_FADT.boot_flags & BAF_MSI_NOT_SUPPORTED) {
printk(KERN_INFO"ACPI FADT declares the system doesn't support MSI, so disable it\n");
pci_no_msi();
}
ret = register_acpi_bus_type(&acpi_pci_bus); ret = register_acpi_bus_type(&acpi_pci_bus);
if (ret) if (ret)
return 0; return 0;
......
...@@ -276,6 +276,7 @@ enum acpi_prefered_pm_profiles { ...@@ -276,6 +276,7 @@ enum acpi_prefered_pm_profiles {
#define BAF_LEGACY_DEVICES 0x0001 #define BAF_LEGACY_DEVICES 0x0001
#define BAF_8042_KEYBOARD_CONTROLLER 0x0002 #define BAF_8042_KEYBOARD_CONTROLLER 0x0002
#define BAF_MSI_NOT_SUPPORTED 0x0008
#define FADT2_REVISION_ID 3 #define FADT2_REVISION_ID 3
#define FADT2_MINUS_REVISION_ID 2 #define FADT2_MINUS_REVISION_ID 2
......
#ifndef _SONYLAPTOP_H_
#define _SONYLAPTOP_H_
#include <linux/types.h>
#ifdef __KERNEL__
/* used only for communication between v4l and sony-laptop */
#define SONY_PIC_COMMAND_GETCAMERA 1 /* obsolete */
#define SONY_PIC_COMMAND_SETCAMERA 2
#define SONY_PIC_COMMAND_GETCAMERABRIGHTNESS 3 /* obsolete */
#define SONY_PIC_COMMAND_SETCAMERABRIGHTNESS 4
#define SONY_PIC_COMMAND_GETCAMERACONTRAST 5 /* obsolete */
#define SONY_PIC_COMMAND_SETCAMERACONTRAST 6
#define SONY_PIC_COMMAND_GETCAMERAHUE 7 /* obsolete */
#define SONY_PIC_COMMAND_SETCAMERAHUE 8
#define SONY_PIC_COMMAND_GETCAMERACOLOR 9 /* obsolete */
#define SONY_PIC_COMMAND_SETCAMERACOLOR 10
#define SONY_PIC_COMMAND_GETCAMERASHARPNESS 11 /* obsolete */
#define SONY_PIC_COMMAND_SETCAMERASHARPNESS 12
#define SONY_PIC_COMMAND_GETCAMERAPICTURE 13 /* obsolete */
#define SONY_PIC_COMMAND_SETCAMERAPICTURE 14
#define SONY_PIC_COMMAND_GETCAMERAAGC 15 /* obsolete */
#define SONY_PIC_COMMAND_SETCAMERAAGC 16
#define SONY_PIC_COMMAND_GETCAMERADIRECTION 17 /* obsolete */
#define SONY_PIC_COMMAND_GETCAMERAROMVERSION 18 /* obsolete */
#define SONY_PIC_COMMAND_GETCAMERAREVISION 19 /* obsolete */
int sony_pic_camera_command(int command, u8 value);
#endif /* __KERNEL__ */
#endif /* _SONYLAPTOP_H_ */
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment