Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 71648
b: refs/heads/master
c: 4f86d3a
h: refs/heads/master
v: v3
  • Loading branch information
Len Brown committed Oct 10, 2007
1 parent df8799f commit 01ded91
Show file tree
Hide file tree
Showing 48 changed files with 4,119 additions and 2,339 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: 731aa5fd9971a5163845fbe55de63d686a11da0a
refs/heads/master: 4f86d3a8e297205780cca027e974fd5f81064780
25 changes: 6 additions & 19 deletions trunk/Documentation/thinkpad-acpi.txt
Original file line number Diff line number Diff line change
Expand Up @@ -105,15 +105,10 @@ The version of thinkpad-acpi's sysfs interface is exported by the driver
as a driver attribute (see below).

Sysfs driver attributes are on the driver's sysfs attribute space,
for 2.6.23 this is /sys/bus/platform/drivers/thinkpad_acpi/ and
/sys/bus/platform/drivers/thinkpad_hwmon/
for 2.6.20 this is /sys/bus/platform/drivers/thinkpad_acpi/.

Sysfs device attributes are on the thinkpad_acpi device sysfs attribute
space, for 2.6.23 this is /sys/devices/platform/thinkpad_acpi/.

Sysfs device attributes for the sensors and fan are on the
thinkpad_hwmon device's sysfs attribute space, but you should locate it
looking for a hwmon device with the name attribute of "thinkpad".
Sysfs device attributes are on the driver's sysfs attribute space,
for 2.6.20 this is /sys/devices/platform/thinkpad_acpi/.

Driver version
--------------
Expand Down Expand Up @@ -771,7 +766,7 @@ Temperature sensors
-------------------

procfs: /proc/acpi/ibm/thermal
sysfs device attributes: (hwmon "thinkpad") temp*_input
sysfs device attributes: (hwmon) temp*_input

Most ThinkPads include six or more separate temperature sensors but only
expose the CPU temperature through the standard ACPI methods. This
Expand Down Expand Up @@ -994,9 +989,7 @@ Fan control and monitoring: fan speed, fan enable/disable
---------------------------------------------------------

procfs: /proc/acpi/ibm/fan
sysfs device attributes: (hwmon "thinkpad") fan1_input, pwm1,
pwm1_enable
sysfs hwmon driver attributes: fan_watchdog
sysfs device attributes: (hwmon) fan_input, pwm1, pwm1_enable

NOTE NOTE NOTE: fan control operations are disabled by default for
safety reasons. To enable them, the module parameter "fan_control=1"
Expand Down Expand Up @@ -1138,7 +1131,7 @@ hwmon device attribute fan1_input:
which can take up to two minutes. May return rubbish on older
ThinkPads.

hwmon driver attribute fan_watchdog:
driver attribute fan_watchdog:
Fan safety watchdog timer interval, in seconds. Minimum is
1 second, maximum is 120 seconds. 0 disables the watchdog.

Expand Down Expand Up @@ -1240,9 +1233,3 @@ Sysfs interface changelog:
layer, the radio switch generates input event EV_RADIO,
and the driver enables hot key handling by default in
the firmware.

0x020000: ABI fix: added a separate hwmon platform device and
driver, which must be located by name (thinkpad)
and the hwmon class for libsensors4 (lm-sensors 3)
compatibility. Moved all hwmon attributes to this
new platform device.
2 changes: 2 additions & 0 deletions trunk/arch/i386/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -1069,6 +1069,8 @@ endif # APM

source "arch/i386/kernel/cpu/cpufreq/Kconfig"

source "drivers/cpuidle/Kconfig"

endmenu

menu "Bus options (PCI, PCMCIA, EISA, MCA, ISA)"
Expand Down
2 changes: 2 additions & 0 deletions trunk/arch/x86_64/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -706,6 +706,8 @@ source "drivers/acpi/Kconfig"

source "arch/x86_64/kernel/cpufreq/Kconfig"

source "drivers/cpuidle/Kconfig"

endmenu

menu "Bus options (PCI etc.)"
Expand Down
1 change: 1 addition & 0 deletions trunk/drivers/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ obj-$(CONFIG_MCA) += mca/
obj-$(CONFIG_EISA) += eisa/
obj-$(CONFIG_LGUEST_GUEST) += lguest/
obj-$(CONFIG_CPU_FREQ) += cpufreq/
obj-$(CONFIG_CPU_IDLE) += cpuidle/
obj-$(CONFIG_MMC) += mmc/
obj-$(CONFIG_NEW_LEDS) += leds/
obj-$(CONFIG_INFINIBAND) += infiniband/
Expand Down
14 changes: 7 additions & 7 deletions trunk/drivers/acpi/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ config ACPI_PROC_EVENT

config ACPI_AC
tristate "AC Adapter"
depends on X86 && POWER_SUPPLY
depends on X86
default y
help
This driver adds support for the AC Adapter object, which indicates
Expand All @@ -97,7 +97,7 @@ config ACPI_AC

config ACPI_BATTERY
tristate "Battery"
depends on X86 && POWER_SUPPLY
depends on X86
default y
help
This driver adds support for battery information through
Expand All @@ -117,7 +117,6 @@ config ACPI_BUTTON
config ACPI_VIDEO
tristate "Video"
depends on X86 && BACKLIGHT_CLASS_DEVICE && VIDEO_OUTPUT_CONTROL
depends on INPUT
help
This driver implement the ACPI Extensions For Display Adapters
for integrated graphics devices on motherboard, as specified in
Expand Down Expand Up @@ -350,11 +349,12 @@ config ACPI_HOTPLUG_MEMORY
$>modprobe acpi_memhotplug

config ACPI_SBS
tristate "Smart Battery System"
tristate "Smart Battery System (EXPERIMENTAL)"
depends on X86
depends on POWER_SUPPLY
depends on EXPERIMENTAL
help
This driver adds support for the Smart Battery System, another
type of access to battery information, found on some laptops.
This driver adds support for the Smart Battery System.
A "Smart Battery" is quite old and quite rare compared
to today's ACPI "Control Method" battery.

endif # ACPI
1 change: 0 additions & 1 deletion trunk/drivers/acpi/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -60,4 +60,3 @@ obj-$(CONFIG_ACPI_TOSHIBA) += toshiba_acpi.o
obj-$(CONFIG_ACPI_HOTPLUG_MEMORY) += acpi_memhotplug.o
obj-y += cm_sbs.o
obj-$(CONFIG_ACPI_SBS) += sbs.o
obj-$(CONFIG_ACPI_SBS) += sbshc.o
33 changes: 2 additions & 31 deletions trunk/drivers/acpi/ac.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
#include <linux/types.h>
#include <linux/proc_fs.h>
#include <linux/seq_file.h>
#include <linux/power_supply.h>
#include <acpi/acpi_bus.h>
#include <acpi/acpi_drivers.h>

Expand Down Expand Up @@ -73,37 +72,16 @@ static struct acpi_driver acpi_ac_driver = {
};

struct acpi_ac {
struct power_supply charger;
struct acpi_device * device;
unsigned long state;
};

#define to_acpi_ac(x) container_of(x, struct acpi_ac, charger);

static const struct file_operations acpi_ac_fops = {
.open = acpi_ac_open_fs,
.read = seq_read,
.llseek = seq_lseek,
.release = single_release,
};
static int get_ac_property(struct power_supply *psy,
enum power_supply_property psp,
union power_supply_propval *val)
{
struct acpi_ac *ac = to_acpi_ac(psy);
switch (psp) {
case POWER_SUPPLY_PROP_ONLINE:
val->intval = ac->state;
break;
default:
return -EINVAL;
}
return 0;
}

static enum power_supply_property ac_props[] = {
POWER_SUPPLY_PROP_ONLINE,
};

/* --------------------------------------------------------------------------
AC Adapter Management
Expand Down Expand Up @@ -230,7 +208,6 @@ static void acpi_ac_notify(acpi_handle handle, u32 event, void *data)
acpi_bus_generate_netlink_event(device->pnp.device_class,
device->dev.bus_id, event,
(u32) ac->state);
kobject_uevent(&ac->charger.dev->kobj, KOBJ_CHANGE);
break;
default:
ACPI_DEBUG_PRINT((ACPI_DB_INFO,
Expand Down Expand Up @@ -267,12 +244,7 @@ static int acpi_ac_add(struct acpi_device *device)
result = acpi_ac_add_fs(device);
if (result)
goto end;
ac->charger.name = acpi_device_bid(device);
ac->charger.type = POWER_SUPPLY_TYPE_MAINS;
ac->charger.properties = ac_props;
ac->charger.num_properties = ARRAY_SIZE(ac_props);
ac->charger.get_property = get_ac_property;
power_supply_register(&ac->device->dev, &ac->charger);

status = acpi_install_notify_handler(device->handle,
ACPI_ALL_NOTIFY, acpi_ac_notify,
ac);
Expand Down Expand Up @@ -307,8 +279,7 @@ static int acpi_ac_remove(struct acpi_device *device, int type)

status = acpi_remove_notify_handler(device->handle,
ACPI_ALL_NOTIFY, acpi_ac_notify);
if (ac->charger.dev)
power_supply_unregister(&ac->charger);

acpi_ac_remove_fs(device);

kfree(ac);
Expand Down
Loading

0 comments on commit 01ded91

Please sign in to comment.