From: Len Brown <len.brown@intel.com>
To: linux-acpi@vger.kernel.org
Cc: Vladimir Lebedev <vladimir.p.lebedev@intel.com>,
Len Brown <len.brown@intel.com>
Subject: [PATCH 022/105] ACPI: sbs: Common interface with CM battery
Date: Sun, 29 Apr 2007 00:50:22 -0400 [thread overview]
Message-ID: <1177822324973-git-send-email-len.brown@intel.com> (raw)
Message-ID: <722062334b972c31a3b83dbf7e9b5a58bb2707dd.1177822058.git.len.brown@intel.com> (raw)
In-Reply-To: <11778223233885-git-send-email-len.brown@intel.com>
In-Reply-To: <ac122bb64b0d51f0512185d3522a75f3f3a80bc9.1177822058.git.len.brown@intel.com>
From: Vladimir Lebedev <vladimir.p.lebedev@intel.com>
The SBS driver has tne features as CM battery:
SBS update_time variable has tne same definition as CM battery 'update_time' variable.
Signed-off-by: Vladimir Lebedev <vladimir.p.lebedev@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
---
drivers/acpi/sbs.c | 577 +++++++++++++++++++++++++++++-----------------------
1 files changed, 319 insertions(+), 258 deletions(-)
diff --git a/drivers/acpi/sbs.c b/drivers/acpi/sbs.c
index 3956645..c1bae10 100644
--- a/drivers/acpi/sbs.c
+++ b/drivers/acpi/sbs.c
@@ -31,6 +31,7 @@
#include <asm/uaccess.h>
#include <linux/acpi.h>
#include <linux/timer.h>
+#include <linux/jiffies.h>
#include <linux/delay.h>
#define ACPI_SBS_COMPONENT 0x00080000
@@ -109,29 +110,19 @@ extern void acpi_unlock_battery_dir(struct proc_dir_entry *acpi_battery_dir);
#define ACPI_SBS_WORD_DATA 1
#define ACPI_SBS_BLOCK_DATA 2
-static struct semaphore sbs_sem;
+#define UPDATE_DELAY 10
-#define UPDATE_MODE QUEUE_UPDATE_MODE
-/* REQUEST_UPDATE_MODE QUEUE_UPDATE_MODE */
-#define UPDATE_INFO_MODE 0
-#define UPDATE_TIME 60
-#define UPDATE_TIME2 0
+/* 0 - every time, > 0 - by update_time */
+static unsigned int update_time = 120;
-static int capacity_mode = CAPACITY_UNIT;
-static int update_mode = UPDATE_MODE;
-static int update_info_mode = UPDATE_INFO_MODE;
-static int update_time = UPDATE_TIME;
-static int update_time2 = UPDATE_TIME2;
+static unsigned int capacity_mode = CAPACITY_UNIT;
-module_param(capacity_mode, int, 0);
-module_param(update_mode, int, 0);
-module_param(update_info_mode, int, 0);
-module_param(update_time, int, 0);
-module_param(update_time2, int, 0);
+module_param(update_time, uint, 0644);
+module_param(capacity_mode, uint, 0444);
static int acpi_sbs_add(struct acpi_device *device);
static int acpi_sbs_remove(struct acpi_device *device, int type);
-static void acpi_sbs_update_queue(void *data);
+static int acpi_sbs_resume(struct acpi_device *device);
static struct acpi_driver acpi_sbs_driver = {
.name = "sbs",
@@ -140,9 +131,14 @@ static struct acpi_driver acpi_sbs_driver = {
.ops = {
.add = acpi_sbs_add,
.remove = acpi_sbs_remove,
+ .resume = acpi_sbs_resume,
},
};
+struct acpi_ac {
+ int ac_present;
+};
+
struct acpi_battery_info {
int capacity_mode;
s16 full_charge_capacity;
@@ -160,9 +156,7 @@ struct acpi_battery_state {
s16 voltage;
s16 amperage;
s16 remaining_capacity;
- s16 average_time_to_empty;
- s16 average_time_to_full;
- s16 battery_status;
+ s16 battery_state;
};
struct acpi_battery_alarm {
@@ -171,9 +165,9 @@ struct acpi_battery_alarm {
struct acpi_battery {
int alive;
- int battery_present;
int id;
int init_state;
+ int battery_present;
struct acpi_sbs *sbs;
struct acpi_battery_info info;
struct acpi_battery_state state;
@@ -185,18 +179,22 @@ struct acpi_sbs {
acpi_handle handle;
int base;
struct acpi_device *device;
+ struct acpi_ec_smbus *smbus;
+ struct mutex mutex;
int sbsm_present;
int sbsm_batteries_supported;
- int ac_present;
struct proc_dir_entry *ac_entry;
+ struct acpi_ac ac;
struct acpi_battery battery[MAX_SBS_BAT];
- int update_info_mode;
int zombie;
- int update_time;
- int update_time2;
struct timer_list update_timer;
+ int run_cnt;
+ int update_proc_flg;
};
+static int acpi_sbs_update_run(struct acpi_sbs *sbs, int id, int data_type);
+static void acpi_sbs_update_time(void *data);
+
union sbs_rw_data {
u16 word;
u8 block[ACPI_SBS_BLOCK_MAX + 2];
@@ -205,8 +203,6 @@ union sbs_rw_data {
static int acpi_ec_sbs_access(struct acpi_sbs *sbs, u16 addr,
char read_write, u8 command, int size,
union sbs_rw_data *data);
-static void acpi_update_delay(struct acpi_sbs *sbs);
-static int acpi_sbs_update_run(struct acpi_sbs *sbs, int data_type);
/* --------------------------------------------------------------------------
SMBus Communication
@@ -383,11 +379,49 @@ acpi_sbs_write_word(struct acpi_sbs *sbs, int addr, int func, int word)
return result;
}
+static int sbs_zombie(struct acpi_sbs *sbs)
+{
+ return (sbs->zombie);
+}
+
+static int sbs_mutex_lock(struct acpi_sbs *sbs)
+{
+ if (sbs_zombie(sbs)) {
+ return -ENODEV;
+ }
+ mutex_lock(&sbs->mutex);
+ return 0;
+}
+
+static void sbs_mutex_unlock(struct acpi_sbs *sbs)
+{
+ mutex_unlock(&sbs->mutex);
+}
+
/* --------------------------------------------------------------------------
Smart Battery System Management
-------------------------------------------------------------------------- */
-/* Smart Battery */
+static int acpi_check_update_proc(struct acpi_sbs *sbs)
+{
+ acpi_status status = AE_OK;
+
+ if (update_time == 0) {
+ sbs->update_proc_flg = 0;
+ return 0;
+ }
+ if (sbs->update_proc_flg == 0) {
+ status = acpi_os_execute(OSL_GPE_HANDLER,
+ acpi_sbs_update_time, sbs);
+ if (status != AE_OK) {
+ ACPI_EXCEPTION((AE_INFO, status,
+ "acpi_os_execute() failed"));
+ return 1;
+ }
+ sbs->update_proc_flg = 1;
+ }
+ return 0;
+}
static int acpi_sbs_generate_event(struct acpi_device *device,
int event, int state, char *bid, char *class)
@@ -430,16 +464,6 @@ static int acpi_battery_get_present(struct acpi_battery *battery)
return result;
}
-static int acpi_battery_is_present(struct acpi_battery *battery)
-{
- return (battery->battery_present);
-}
-
-static int acpi_ac_is_present(struct acpi_sbs *sbs)
-{
- return (sbs->ac_present);
-}
-
static int acpi_battery_select(struct acpi_battery *battery)
{
struct acpi_sbs *sbs = battery->sbs;
@@ -447,7 +471,7 @@ static int acpi_battery_select(struct acpi_battery *battery)
s16 state;
int foo;
- if (battery->sbs->sbsm_present) {
+ if (sbs->sbsm_present) {
/* Take special care not to knobble other nibbles of
* state (aka selector_state), since
@@ -523,6 +547,8 @@ static int acpi_battery_get_info(struct acpi_battery *battery)
&battery->info.design_capacity);
if (result) {
+ ACPI_EXCEPTION((AE_INFO, AE_ERROR,
+ "acpi_sbs_read_word() failed"));
goto end;
}
@@ -573,6 +599,8 @@ static int acpi_battery_get_info(struct acpi_battery *battery)
result = acpi_sbs_read_word(sbs, ACPI_SB_SMBUS_ADDR, 0x1c,
&battery->info.serial_number);
if (result) {
+ ACPI_EXCEPTION((AE_INFO, AE_ERROR,
+ "acpi_sbs_read_word() failed"));
goto end;
}
@@ -604,22 +632,11 @@ static int acpi_battery_get_info(struct acpi_battery *battery)
return result;
}
-static void acpi_update_delay(struct acpi_sbs *sbs)
-{
- if (sbs->zombie) {
- return;
- }
- if (sbs->update_time2 > 0) {
- msleep(sbs->update_time2 * 1000);
- }
-}
-
static int acpi_battery_get_state(struct acpi_battery *battery)
{
struct acpi_sbs *sbs = battery->sbs;
int result = 0;
- acpi_update_delay(battery->sbs);
result = acpi_sbs_read_word(sbs, ACPI_SB_SMBUS_ADDR, 0x09,
&battery->state.voltage);
if (result) {
@@ -628,7 +645,6 @@ static int acpi_battery_get_state(struct acpi_battery *battery)
goto end;
}
- acpi_update_delay(battery->sbs);
result = acpi_sbs_read_word(sbs, ACPI_SB_SMBUS_ADDR, 0x0a,
&battery->state.amperage);
if (result) {
@@ -637,7 +653,6 @@ static int acpi_battery_get_state(struct acpi_battery *battery)
goto end;
}
- acpi_update_delay(battery->sbs);
result = acpi_sbs_read_word(sbs, ACPI_SB_SMBUS_ADDR, 0x0f,
&battery->state.remaining_capacity);
if (result) {
@@ -646,35 +661,14 @@ static int acpi_battery_get_state(struct acpi_battery *battery)
goto end;
}
- acpi_update_delay(battery->sbs);
- result = acpi_sbs_read_word(sbs, ACPI_SB_SMBUS_ADDR, 0x12,
- &battery->state.average_time_to_empty);
- if (result) {
- ACPI_EXCEPTION((AE_INFO, AE_ERROR,
- "acpi_sbs_read_word() failed"));
- goto end;
- }
-
- acpi_update_delay(battery->sbs);
- result = acpi_sbs_read_word(sbs, ACPI_SB_SMBUS_ADDR, 0x13,
- &battery->state.average_time_to_full);
- if (result) {
- ACPI_EXCEPTION((AE_INFO, AE_ERROR,
- "acpi_sbs_read_word() failed"));
- goto end;
- }
-
- acpi_update_delay(battery->sbs);
result = acpi_sbs_read_word(sbs, ACPI_SB_SMBUS_ADDR, 0x16,
- &battery->state.battery_status);
+ &battery->state.battery_state);
if (result) {
ACPI_EXCEPTION((AE_INFO, AE_ERROR,
"acpi_sbs_read_word() failed"));
goto end;
}
- acpi_update_delay(battery->sbs);
-
end:
return result;
}
@@ -692,8 +686,6 @@ static int acpi_battery_get_alarm(struct acpi_battery *battery)
goto end;
}
- acpi_update_delay(battery->sbs);
-
end:
return result;
@@ -751,6 +743,7 @@ static int acpi_battery_set_alarm(struct acpi_battery *battery,
static int acpi_battery_set_mode(struct acpi_battery *battery)
{
+ struct acpi_sbs *sbs = battery->sbs;
int result = 0;
s16 battery_mode;
@@ -758,7 +751,7 @@ static int acpi_battery_set_mode(struct acpi_battery *battery)
goto end;
}
- result = acpi_sbs_read_word(battery->sbs,
+ result = acpi_sbs_read_word(sbs,
ACPI_SB_SMBUS_ADDR, 0x03, &battery_mode);
if (result) {
ACPI_EXCEPTION((AE_INFO, AE_ERROR,
@@ -771,7 +764,7 @@ static int acpi_battery_set_mode(struct acpi_battery *battery)
} else {
battery_mode |= 0x8000;
}
- result = acpi_sbs_write_word(battery->sbs,
+ result = acpi_sbs_write_word(sbs,
ACPI_SB_SMBUS_ADDR, 0x03, battery_mode);
if (result) {
ACPI_EXCEPTION((AE_INFO, AE_ERROR,
@@ -779,7 +772,7 @@ static int acpi_battery_set_mode(struct acpi_battery *battery)
goto end;
}
- result = acpi_sbs_read_word(battery->sbs,
+ result = acpi_sbs_read_word(sbs,
ACPI_SB_SMBUS_ADDR, 0x03, &battery_mode);
if (result) {
ACPI_EXCEPTION((AE_INFO, AE_ERROR,
@@ -798,7 +791,7 @@ static int acpi_battery_init(struct acpi_battery *battery)
result = acpi_battery_select(battery);
if (result) {
ACPI_EXCEPTION((AE_INFO, AE_ERROR,
- "acpi_battery_init() failed"));
+ "acpi_battery_select() failed"));
goto end;
}
@@ -848,7 +841,7 @@ static int acpi_ac_get_present(struct acpi_sbs *sbs)
goto end;
}
- sbs->ac_present = (charger_status & 0x8000) >> 15;
+ sbs->ac.ac_present = (charger_status & 0x8000) >> 15;
end:
@@ -945,24 +938,27 @@ static struct proc_dir_entry *acpi_battery_dir = NULL;
static int acpi_battery_read_info(struct seq_file *seq, void *offset)
{
struct acpi_battery *battery = seq->private;
+ struct acpi_sbs *sbs = battery->sbs;
int cscale;
int result = 0;
- if (battery->sbs->zombie) {
+ if (sbs_mutex_lock(sbs)) {
return -ENODEV;
}
- down(&sbs_sem);
+ result = acpi_check_update_proc(sbs);
+ if (result)
+ goto end;
- if (update_mode == REQUEST_UPDATE_MODE) {
- result = acpi_sbs_update_run(battery->sbs, DATA_TYPE_INFO);
+ if (update_time == 0) {
+ result = acpi_sbs_update_run(sbs, battery->id, DATA_TYPE_INFO);
if (result) {
ACPI_EXCEPTION((AE_INFO, AE_ERROR,
"acpi_sbs_update_run() failed"));
}
}
- if (acpi_battery_is_present(battery)) {
+ if (battery->battery_present) {
seq_printf(seq, "present: yes\n");
} else {
seq_printf(seq, "present: no\n");
@@ -974,13 +970,13 @@ static int acpi_battery_read_info(struct seq_file *seq, void *offset)
} else {
cscale = battery->info.ipscale;
}
- seq_printf(seq, "design capacity: %i%s",
+ seq_printf(seq, "design capacity: %i%s\n",
battery->info.design_capacity * cscale,
- battery->info.capacity_mode ? "0 mWh\n" : " mAh\n");
+ battery->info.capacity_mode ? "0 mWh" : " mAh");
- seq_printf(seq, "last full capacity: %i%s",
+ seq_printf(seq, "last full capacity: %i%s\n",
battery->info.full_charge_capacity * cscale,
- battery->info.capacity_mode ? "0 mWh\n" : " mAh\n");
+ battery->info.capacity_mode ? "0 mWh" : " mAh");
seq_printf(seq, "battery technology: rechargeable\n");
@@ -1006,7 +1002,7 @@ static int acpi_battery_read_info(struct seq_file *seq, void *offset)
end:
- up(&sbs_sem);
+ sbs_mutex_unlock(sbs);
return result;
}
@@ -1018,26 +1014,29 @@ static int acpi_battery_info_open_fs(struct inode *inode, struct file *file)
static int acpi_battery_read_state(struct seq_file *seq, void *offset)
{
- struct acpi_battery *battery = (struct acpi_battery *)seq->private;
+ struct acpi_battery *battery = seq->private;
+ struct acpi_sbs *sbs = battery->sbs;
int result = 0;
int cscale;
int foo;
- if (battery->sbs->zombie) {
+ if (sbs_mutex_lock(sbs)) {
return -ENODEV;
}
- down(&sbs_sem);
+ result = acpi_check_update_proc(sbs);
+ if (result)
+ goto end;
- if (update_mode == REQUEST_UPDATE_MODE) {
- result = acpi_sbs_update_run(battery->sbs, DATA_TYPE_STATE);
+ if (update_time == 0) {
+ result = acpi_sbs_update_run(sbs, battery->id, DATA_TYPE_STATE);
if (result) {
ACPI_EXCEPTION((AE_INFO, AE_ERROR,
"acpi_sbs_update_run() failed"));
}
}
- if (acpi_battery_is_present(battery)) {
+ if (battery->battery_present) {
seq_printf(seq, "present: yes\n");
} else {
seq_printf(seq, "present: no\n");
@@ -1050,7 +1049,7 @@ static int acpi_battery_read_state(struct seq_file *seq, void *offset)
cscale = battery->info.ipscale;
}
- if (battery->state.battery_status & 0x0010) {
+ if (battery->state.battery_state & 0x0010) {
seq_printf(seq, "capacity state: critical\n");
} else {
seq_printf(seq, "capacity state: ok\n");
@@ -1074,16 +1073,16 @@ static int acpi_battery_read_state(struct seq_file *seq, void *offset)
battery->info.capacity_mode ? "mW" : "mA");
}
- seq_printf(seq, "remaining capacity: %i%s",
+ seq_printf(seq, "remaining capacity: %i%s\n",
battery->state.remaining_capacity * cscale,
- battery->info.capacity_mode ? "0 mWh\n" : " mAh\n");
+ battery->info.capacity_mode ? "0 mWh" : " mAh");
seq_printf(seq, "present voltage: %i mV\n",
battery->state.voltage * battery->info.vscale);
end:
- up(&sbs_sem);
+ sbs_mutex_unlock(sbs);
return result;
}
@@ -1096,24 +1095,27 @@ static int acpi_battery_state_open_fs(struct inode *inode, struct file *file)
static int acpi_battery_read_alarm(struct seq_file *seq, void *offset)
{
struct acpi_battery *battery = seq->private;
+ struct acpi_sbs *sbs = battery->sbs;
int result = 0;
int cscale;
- if (battery->sbs->zombie) {
+ if (sbs_mutex_lock(sbs)) {
return -ENODEV;
}
- down(&sbs_sem);
+ result = acpi_check_update_proc(sbs);
+ if (result)
+ goto end;
- if (update_mode == REQUEST_UPDATE_MODE) {
- result = acpi_sbs_update_run(battery->sbs, DATA_TYPE_ALARM);
+ if (update_time == 0) {
+ result = acpi_sbs_update_run(sbs, battery->id, DATA_TYPE_ALARM);
if (result) {
ACPI_EXCEPTION((AE_INFO, AE_ERROR,
"acpi_sbs_update_run() failed"));
}
}
- if (!acpi_battery_is_present(battery)) {
+ if (!battery->battery_present) {
seq_printf(seq, "present: no\n");
goto end;
}
@@ -1126,16 +1128,16 @@ static int acpi_battery_read_alarm(struct seq_file *seq, void *offset)
seq_printf(seq, "alarm: ");
if (battery->alarm.remaining_capacity) {
- seq_printf(seq, "%i%s",
+ seq_printf(seq, "%i%s\n",
battery->alarm.remaining_capacity * cscale,
- battery->info.capacity_mode ? "0 mWh\n" : " mAh\n");
+ battery->info.capacity_mode ? "0 mWh" : " mAh");
} else {
seq_printf(seq, "disabled\n");
}
end:
- up(&sbs_sem);
+ sbs_mutex_unlock(sbs);
return result;
}
@@ -1146,16 +1148,19 @@ acpi_battery_write_alarm(struct file *file, const char __user * buffer,
{
struct seq_file *seq = file->private_data;
struct acpi_battery *battery = seq->private;
+ struct acpi_sbs *sbs = battery->sbs;
char alarm_string[12] = { '\0' };
int result, old_alarm, new_alarm;
- if (battery->sbs->zombie) {
+ if (sbs_mutex_lock(sbs)) {
return -ENODEV;
}
- down(&sbs_sem);
+ result = acpi_check_update_proc(sbs);
+ if (result)
+ goto end;
- if (!acpi_battery_is_present(battery)) {
+ if (!battery->battery_present) {
result = -ENODEV;
goto end;
}
@@ -1191,7 +1196,7 @@ acpi_battery_write_alarm(struct file *file, const char __user * buffer,
}
end:
- up(&sbs_sem);
+ sbs_mutex_unlock(sbs);
if (result) {
return result;
@@ -1239,14 +1244,12 @@ static int acpi_ac_read_state(struct seq_file *seq, void *offset)
struct acpi_sbs *sbs = seq->private;
int result;
- if (sbs->zombie) {
+ if (sbs_mutex_lock(sbs)) {
return -ENODEV;
}
- down(&sbs_sem);
-
- if (update_mode == REQUEST_UPDATE_MODE) {
- result = acpi_sbs_update_run(sbs, DATA_TYPE_AC_STATE);
+ if (update_time == 0) {
+ result = acpi_sbs_update_run(sbs, -1, DATA_TYPE_AC_STATE);
if (result) {
ACPI_EXCEPTION((AE_INFO, AE_ERROR,
"acpi_sbs_update_run() failed"));
@@ -1254,9 +1257,9 @@ static int acpi_ac_read_state(struct seq_file *seq, void *offset)
}
seq_printf(seq, "state: %s\n",
- sbs->ac_present ? "on-line" : "off-line");
+ sbs->ac.ac_present ? "on-line" : "off-line");
- up(&sbs_sem);
+ sbs_mutex_unlock(sbs);
return 0;
}
@@ -1309,7 +1312,7 @@ static int acpi_battery_add(struct acpi_sbs *sbs, int id)
goto end;
}
- is_present = acpi_battery_is_present(battery);
+ is_present = battery->battery_present;
if (is_present) {
result = acpi_battery_init(battery);
@@ -1336,6 +1339,10 @@ static int acpi_battery_add(struct acpi_sbs *sbs, int id)
}
battery->alive = 1;
+ printk(KERN_INFO PREFIX "%s [%s]: Battery Slot [%s] (battery %s)\n",
+ ACPI_SBS_DEVICE_NAME, acpi_device_bid(sbs->device), dir_name,
+ sbs->battery->battery_present ? "present" : "absent");
+
end:
return result;
}
@@ -1370,6 +1377,10 @@ static int acpi_ac_add(struct acpi_sbs *sbs)
goto end;
}
+ printk(KERN_INFO PREFIX "%s [%s]: AC Adapter [%s] (%s)\n",
+ ACPI_SBS_DEVICE_NAME, acpi_device_bid(sbs->device),
+ ACPI_AC_DIR_NAME, sbs->ac.ac_present ? "on-line" : "off-line");
+
end:
return result;
@@ -1383,29 +1394,48 @@ static void acpi_ac_remove(struct acpi_sbs *sbs)
}
}
-static void acpi_sbs_update_queue_run(unsigned long data)
+static void acpi_sbs_update_time_run(unsigned long data)
{
- acpi_os_execute(OSL_GPE_HANDLER, acpi_sbs_update_queue, (void *)data);
+ acpi_os_execute(OSL_GPE_HANDLER, acpi_sbs_update_time, (void *)data);
}
-static int acpi_sbs_update_run(struct acpi_sbs *sbs, int data_type)
+static int acpi_sbs_update_run(struct acpi_sbs *sbs, int id, int data_type)
{
struct acpi_battery *battery;
- int result = 0;
- int old_ac_present;
- int old_battery_present;
- int new_ac_present;
- int new_battery_present;
- int id;
+ int result = 0, cnt;
+ int old_ac_present = -1;
+ int old_battery_present = -1;
+ int new_ac_present = -1;
+ int new_battery_present = -1;
+ int id_min = 0, id_max = MAX_SBS_BAT - 1;
char dir_name[32];
- int do_battery_init, do_ac_init;
- s16 old_remaining_capacity;
+ int do_battery_init = 0, do_ac_init = 0;
+ int old_remaining_capacity = 0;
+ int update_ac = 1, update_battery = 1;
+ int up_tm = update_time;
+
+ if (sbs_zombie(sbs)) {
+ goto end;
+ }
- if (sbs->zombie) {
+ if (id >= 0) {
+ id_min = id_max = id;
+ }
+
+ if (data_type == DATA_TYPE_COMMON && up_tm > 0) {
+ cnt = up_tm / (up_tm > UPDATE_DELAY ? UPDATE_DELAY : up_tm);
+ if (sbs->run_cnt % cnt != 0) {
+ update_battery = 0;
+ }
+ }
+
+ sbs->run_cnt++;
+
+ if (!update_ac && !update_battery) {
goto end;
}
- old_ac_present = acpi_ac_is_present(sbs);
+ old_ac_present = sbs->ac.ac_present;
result = acpi_ac_get_present(sbs);
if (result) {
@@ -1413,15 +1443,36 @@ static int acpi_sbs_update_run(struct acpi_sbs *sbs, int data_type)
"acpi_ac_get_present() failed"));
}
- new_ac_present = acpi_ac_is_present(sbs);
+ new_ac_present = sbs->ac.ac_present;
do_ac_init = (old_ac_present != new_ac_present);
+ if (sbs->run_cnt == 1 && data_type == DATA_TYPE_COMMON) {
+ do_ac_init = 1;
+ }
- if (data_type == DATA_TYPE_AC_STATE) {
+ if (do_ac_init) {
+ result = acpi_sbs_generate_event(sbs->device,
+ ACPI_SBS_AC_NOTIFY_STATUS,
+ new_ac_present,
+ ACPI_AC_DIR_NAME,
+ ACPI_AC_CLASS);
+ if (result) {
+ ACPI_EXCEPTION((AE_INFO, AE_ERROR,
+ "acpi_sbs_generate_event() failed"));
+ }
+ }
+
+ if (data_type == DATA_TYPE_COMMON) {
+ if (!do_ac_init && !update_battery) {
+ goto end;
+ }
+ }
+
+ if (data_type == DATA_TYPE_AC_STATE && !do_ac_init) {
goto end;
}
- for (id = 0; id < MAX_SBS_BAT; id++) {
+ for (id = id_min; id <= id_max; id++) {
battery = &sbs->battery[id];
if (battery->alive == 0) {
continue;
@@ -1429,41 +1480,27 @@ static int acpi_sbs_update_run(struct acpi_sbs *sbs, int data_type)
old_remaining_capacity = battery->state.remaining_capacity;
- old_battery_present = acpi_battery_is_present(battery);
+ old_battery_present = battery->battery_present;
result = acpi_battery_select(battery);
if (result) {
ACPI_EXCEPTION((AE_INFO, AE_ERROR,
"acpi_battery_select() failed"));
}
- if (sbs->zombie) {
- goto end;
- }
result = acpi_battery_get_present(battery);
if (result) {
ACPI_EXCEPTION((AE_INFO, AE_ERROR,
"acpi_battery_get_present() failed"));
}
- if (sbs->zombie) {
- goto end;
- }
- new_battery_present = acpi_battery_is_present(battery);
+ new_battery_present = battery->battery_present;
do_battery_init = ((old_battery_present != new_battery_present)
&& new_battery_present);
-
- if (sbs->zombie) {
- goto end;
- }
- if (do_ac_init || do_battery_init ||
- update_info_mode || sbs->update_info_mode) {
- if (sbs->update_info_mode) {
- sbs->update_info_mode = 0;
- } else {
- sbs->update_info_mode = 1;
- }
+ if (!new_battery_present)
+ goto event;
+ if (do_ac_init || do_battery_init) {
result = acpi_battery_init(battery);
if (result) {
ACPI_EXCEPTION((AE_INFO, AE_ERROR,
@@ -1471,52 +1508,64 @@ static int acpi_sbs_update_run(struct acpi_sbs *sbs, int data_type)
"failed"));
}
}
- if (data_type == DATA_TYPE_INFO) {
- continue;
- }
-
- if (sbs->zombie) {
+ if (sbs_zombie(sbs)) {
goto end;
}
- if (new_battery_present) {
- result = acpi_battery_get_alarm(battery);
+
+ if ((data_type == DATA_TYPE_COMMON
+ || data_type == DATA_TYPE_INFO)
+ && new_battery_present) {
+ result = acpi_battery_get_info(battery);
if (result) {
ACPI_EXCEPTION((AE_INFO, AE_ERROR,
- "acpi_battery_get_alarm() "
- "failed"));
- }
- if (data_type == DATA_TYPE_ALARM) {
- continue;
+ "acpi_battery_get_info() failed"));
}
+ }
+ if (data_type == DATA_TYPE_INFO) {
+ continue;
+ }
+ if (sbs_zombie(sbs)) {
+ goto end;
+ }
+ if ((data_type == DATA_TYPE_COMMON
+ || data_type == DATA_TYPE_STATE)
+ && new_battery_present) {
result = acpi_battery_get_state(battery);
if (result) {
ACPI_EXCEPTION((AE_INFO, AE_ERROR,
- "acpi_battery_get_state() "
- "failed"));
+ "acpi_battery_get_state() failed"));
}
}
- if (sbs->zombie) {
- goto end;
+ if (data_type == DATA_TYPE_STATE) {
+ goto event;
}
- if (data_type != DATA_TYPE_COMMON) {
- continue;
+ if (sbs_zombie(sbs)) {
+ goto end;
}
- if (old_battery_present != new_battery_present) {
- sprintf(dir_name, ACPI_BATTERY_DIR_NAME, id);
- result = acpi_sbs_generate_event(sbs->device,
- ACPI_SBS_BATTERY_NOTIFY_STATUS,
- new_battery_present,
- dir_name,
- ACPI_BATTERY_CLASS);
+ if ((data_type == DATA_TYPE_COMMON
+ || data_type == DATA_TYPE_ALARM)
+ && new_battery_present) {
+ result = acpi_battery_get_alarm(battery);
if (result) {
ACPI_EXCEPTION((AE_INFO, AE_ERROR,
- "acpi_sbs_generate_event() "
+ "acpi_battery_get_alarm() "
"failed"));
}
}
- if (old_remaining_capacity != battery->state.remaining_capacity) {
+ if (data_type == DATA_TYPE_ALARM) {
+ continue;
+ }
+ if (sbs_zombie(sbs)) {
+ goto end;
+ }
+
+ event:
+
+ if (old_battery_present != new_battery_present || do_ac_init ||
+ old_remaining_capacity !=
+ battery->state.remaining_capacity) {
sprintf(dir_name, ACPI_BATTERY_DIR_NAME, id);
result = acpi_sbs_generate_event(sbs->device,
ACPI_SBS_BATTERY_NOTIFY_STATUS,
@@ -1525,71 +1574,62 @@ static int acpi_sbs_update_run(struct acpi_sbs *sbs, int data_type)
ACPI_BATTERY_CLASS);
if (result) {
ACPI_EXCEPTION((AE_INFO, AE_ERROR,
- "acpi_sbs_generate_event() failed"));
+ "acpi_sbs_generate_event() "
+ "failed"));
}
}
-
- }
- if (sbs->zombie) {
- goto end;
- }
- if (data_type != DATA_TYPE_COMMON) {
- goto end;
- }
-
- if (old_ac_present != new_ac_present) {
- result = acpi_sbs_generate_event(sbs->device,
- ACPI_SBS_AC_NOTIFY_STATUS,
- new_ac_present,
- ACPI_AC_DIR_NAME,
- ACPI_AC_CLASS);
- if (result) {
- ACPI_EXCEPTION((AE_INFO, AE_ERROR,
- "acpi_sbs_generate_event() failed"));
- }
}
end:
+
return result;
}
-static void acpi_sbs_update_queue(void *data)
+static void acpi_sbs_update_time(void *data)
{
struct acpi_sbs *sbs = data;
unsigned long delay = -1;
int result;
+ unsigned int up_tm = update_time;
- if (sbs->zombie) {
- goto end;
- }
+ if (sbs_mutex_lock(sbs))
+ return;
- result = acpi_sbs_update_run(sbs, DATA_TYPE_COMMON);
+ result = acpi_sbs_update_run(sbs, -1, DATA_TYPE_COMMON);
if (result) {
ACPI_EXCEPTION((AE_INFO, AE_ERROR,
"acpi_sbs_update_run() failed"));
}
- if (sbs->zombie) {
+ if (sbs_zombie(sbs)) {
goto end;
}
- if (update_mode == REQUEST_UPDATE_MODE) {
- goto end;
+ if (!up_tm) {
+ if (timer_pending(&sbs->update_timer))
+ del_timer(&sbs->update_timer);
+ } else {
+ delay = (up_tm > UPDATE_DELAY ? UPDATE_DELAY : up_tm);
+ delay = jiffies + HZ * delay;
+ if (timer_pending(&sbs->update_timer)) {
+ mod_timer(&sbs->update_timer, delay);
+ } else {
+ sbs->update_timer.data = (unsigned long)data;
+ sbs->update_timer.function = acpi_sbs_update_time_run;
+ sbs->update_timer.expires = delay;
+ add_timer(&sbs->update_timer);
+ }
}
- delay = jiffies + HZ * update_time;
- sbs->update_timer.data = (unsigned long)data;
- sbs->update_timer.function = acpi_sbs_update_queue_run;
- sbs->update_timer.expires = delay;
- add_timer(&sbs->update_timer);
end:
- ;
+
+ sbs_mutex_unlock(sbs);
}
static int acpi_sbs_add(struct acpi_device *device)
{
struct acpi_sbs *sbs = NULL;
- int result;
+ int result = 0, remove_result = 0;
unsigned long sbs_obj;
int id;
acpi_status status = AE_OK;
@@ -1604,33 +1644,34 @@ static int acpi_sbs_add(struct acpi_device *device)
sbs = kzalloc(sizeof(struct acpi_sbs), GFP_KERNEL);
if (!sbs) {
- ACPI_EXCEPTION((AE_INFO, AE_ERROR, "kmalloc() failed"));
- return -ENOMEM;
+ ACPI_EXCEPTION((AE_INFO, AE_ERROR, "kzalloc() failed"));
+ result = -ENOMEM;
+ goto end;
}
- sbs->base = (val & 0xff00ull) >> 8;
+ mutex_init(&sbs->mutex);
+
+ sbs_mutex_lock(sbs);
+
+ sbs->base = (val & 0xff00ull) >> 8;
sbs->device = device;
strcpy(acpi_device_name(device), ACPI_SBS_DEVICE_NAME);
strcpy(acpi_device_class(device), ACPI_SBS_CLASS);
acpi_driver_data(device) = sbs;
- sbs->update_time = 0;
- sbs->update_time2 = 0;
-
result = acpi_ac_add(sbs);
if (result) {
ACPI_EXCEPTION((AE_INFO, AE_ERROR, "acpi_ac_add() failed"));
goto end;
}
- result = acpi_evaluate_integer(device->handle, "_SBS", NULL, &sbs_obj);
- if (ACPI_FAILURE(result)) {
- ACPI_EXCEPTION((AE_INFO, AE_ERROR,
+ status = acpi_evaluate_integer(device->handle, "_SBS", NULL, &sbs_obj);
+ if (status) {
+ ACPI_EXCEPTION((AE_INFO, status,
"acpi_evaluate_integer() failed"));
result = -EIO;
goto end;
}
-
if (sbs_obj > 0) {
result = acpi_sbsm_get_info(sbs);
if (result) {
@@ -1640,6 +1681,7 @@ static int acpi_sbs_add(struct acpi_device *device)
}
sbs->sbsm_present = 1;
}
+
if (sbs->sbsm_present == 0) {
result = acpi_battery_add(sbs, 0);
if (result) {
@@ -1653,8 +1695,7 @@ static int acpi_sbs_add(struct acpi_device *device)
result = acpi_battery_add(sbs, id);
if (result) {
ACPI_EXCEPTION((AE_INFO, AE_ERROR,
- "acpi_battery_add() "
- "failed"));
+ "acpi_battery_add() failed"));
goto end;
}
}
@@ -1664,29 +1705,26 @@ static int acpi_sbs_add(struct acpi_device *device)
sbs->handle = device->handle;
init_timer(&sbs->update_timer);
- if (update_mode == QUEUE_UPDATE_MODE) {
- status = acpi_os_execute(OSL_GPE_HANDLER,
- acpi_sbs_update_queue, sbs);
- if (status != AE_OK) {
- ACPI_EXCEPTION((AE_INFO, AE_ERROR,
- "acpi_os_execute() failed"));
- }
- }
- sbs->update_time = update_time;
- sbs->update_time2 = update_time2;
-
- printk(KERN_INFO PREFIX "%s [%s]\n",
- acpi_device_name(device), acpi_device_bid(device));
+ result = acpi_check_update_proc(sbs);
+ if (result)
+ goto end;
end:
+
+ sbs_mutex_unlock(sbs);
+
if (result) {
- acpi_sbs_remove(device, 0);
+ remove_result = acpi_sbs_remove(device, 0);
+ if (remove_result) {
+ ACPI_EXCEPTION((AE_INFO, AE_ERROR,
+ "acpi_sbs_remove() failed"));
+ }
}
return result;
}
-int acpi_sbs_remove(struct acpi_device *device, int type)
+static int acpi_sbs_remove(struct acpi_device *device, int type)
{
struct acpi_sbs *sbs;
int id;
@@ -1695,15 +1733,14 @@ int acpi_sbs_remove(struct acpi_device *device, int type)
return -EINVAL;
}
- sbs = (struct acpi_sbs *)acpi_driver_data(device);
-
+ sbs = acpi_driver_data(device);
if (!sbs) {
return -EINVAL;
}
+ sbs_mutex_lock(sbs);
+
sbs->zombie = 1;
- sbs->update_time = 0;
- sbs->update_time2 = 0;
del_timer_sync(&sbs->update_timer);
acpi_os_wait_events_complete(NULL);
del_timer_sync(&sbs->update_timer);
@@ -1714,13 +1751,41 @@ int acpi_sbs_remove(struct acpi_device *device, int type)
acpi_ac_remove(sbs);
- acpi_driver_data(device) = NULL;
+ sbs_mutex_unlock(sbs);
+
+ mutex_destroy(&sbs->mutex);
kfree(sbs);
return 0;
}
+static void acpi_sbs_rmdirs(void)
+{
+ if (acpi_ac_dir) {
+ acpi_unlock_ac_dir(acpi_ac_dir);
+ acpi_ac_dir = NULL;
+ }
+ if (acpi_battery_dir) {
+ acpi_unlock_battery_dir(acpi_battery_dir);
+ acpi_battery_dir = NULL;
+ }
+}
+
+static int acpi_sbs_resume(struct acpi_device *device)
+{
+ struct acpi_sbs *sbs;
+
+ if (!device)
+ return -EINVAL;
+
+ sbs = device->driver_data;
+
+ sbs->run_cnt = 0;
+
+ return 0;
+}
+
static int __init acpi_sbs_init(void)
{
int result = 0;
@@ -1728,12 +1793,10 @@ static int __init acpi_sbs_init(void)
if (acpi_disabled)
return -ENODEV;
- init_MUTEX(&sbs_sem);
-
if (capacity_mode != DEF_CAPACITY_UNIT
&& capacity_mode != MAH_CAPACITY_UNIT
&& capacity_mode != MWH_CAPACITY_UNIT) {
- ACPI_EXCEPTION((AE_INFO, AE_ERROR, "acpi_sbs_init: "
+ ACPI_EXCEPTION((AE_INFO, AE_ERROR,
"invalid capacity_mode = %d", capacity_mode));
return -EINVAL;
}
@@ -1749,6 +1812,7 @@ static int __init acpi_sbs_init(void)
if (!acpi_battery_dir) {
ACPI_EXCEPTION((AE_INFO, AE_ERROR,
"acpi_lock_battery_dir() failed"));
+ acpi_sbs_rmdirs();
return -ENODEV;
}
@@ -1756,6 +1820,7 @@ static int __init acpi_sbs_init(void)
if (result < 0) {
ACPI_EXCEPTION((AE_INFO, AE_ERROR,
"acpi_bus_register_driver() failed"));
+ acpi_sbs_rmdirs();
return -ENODEV;
}
@@ -1764,13 +1829,9 @@ static int __init acpi_sbs_init(void)
static void __exit acpi_sbs_exit(void)
{
-
acpi_bus_unregister_driver(&acpi_sbs_driver);
- acpi_unlock_ac_dir(acpi_ac_dir);
- acpi_ac_dir = NULL;
- acpi_unlock_battery_dir(acpi_battery_dir);
- acpi_battery_dir = NULL;
+ acpi_sbs_rmdirs();
return;
}
--
1.5.2.rc0.34.gda94
next prev parent reply other threads:[~2007-04-29 4:52 UTC|newest]
Thread overview: 89+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-04-29 4:50 ACPI patches for 2.6.22 merge window Len Brown
[not found] ` <11778223068-git-send-email-len.brown@intel.com>
[not found] ` <ac122bb64b0d51f0512185d3522a75f3f3a80bc9.1177822058.git.len.brown@intel.com>
[not found] ` <a5f8dee2d367e69fd57f5ea107072bb72eb15327.1177822058.git.len.brown@intel.com>
2007-04-29 4:50 ` [PATCH 002/105] ACPI: EC: Don't use Global Lock if not asked to do so Len Brown
[not found] ` <33d20b6100d05a0b14883e7dc8ab41e4531fcf59.1177822058.git.len.brown@intel.com>
2007-04-29 4:50 ` [PATCH 003/105] ACPI: EC: Make EC to initialize first in ACPI Len Brown
[not found] ` <33c7a0738c5f753a7d94fd3b2ec7d84e79a141a8.1177822058.git.len.brown@intel.com>
2007-04-29 4:50 ` [PATCH 004/105] ACPI: EC: "Fake ECDT" workaround is not needed any longer Len Brown
[not found] ` <c45aac43fec2d6ca8d0be8408f94e8176c8110ef.1177822058.git.len.brown@intel.com>
2007-04-29 4:50 ` [PATCH 005/105] ACPI: EC: enable burst functionality in EC Len Brown
[not found] ` <3d02b90be2c7bc7ffbc5e502a135c13838d23ef4.1177822058.git.len.brown@intel.com>
2007-04-29 4:50 ` [PATCH 006/105] ACPI: EC: Remove casts to/from void* from ec.c Len Brown
[not found] ` <e8284321048aac7be307b3ec5e0631f5c514935a.1177822058.git.len.brown@intel.com>
2007-04-29 4:50 ` [PATCH 007/105] ACPI: EC: Put install handlers into separate function Len Brown
[not found] ` <c0900c3512dc8fd0b37f8fbcebc7853ed9efff10.1177822058.git.len.brown@intel.com>
2007-04-29 4:50 ` [PATCH 008/105] ACPI: EC: Clean ECDT and namespace parsing Len Brown
[not found] ` <d66d969df88c742494736ed06eeaf3229d3a7259.1177822058.git.len.brown@intel.com>
2007-04-29 4:50 ` [PATCH 009/105] ACPI: EC: Rename ec_ecdt to more informative boot_ec Len Brown
[not found] ` <d033879c9838b960014e861d0eb3bdf11d3b9d9d.1177822058.git.len.brown@intel.com>
2007-04-29 4:50 ` [PATCH 010/105] ACPI: EC: first_ec is better to be acpi_ec than acpi_device Len Brown
[not found] ` <01f2246269639f6aa93086719a8dbec26cb68e98.1177822058.git.len.brown@intel.com>
2007-04-29 4:50 ` [PATCH 011/105] ACPI: EC: Cleanup of EC initialization Len Brown
[not found] ` <9fd9f8e8bdcfc9aa309dae5bccc55d02804337d0.1177822058.git.len.brown@intel.com>
2007-04-29 4:50 ` [PATCH 012/105] ACPI: EC: Block queries until EC is fully initialized Len Brown
[not found] ` <9a8168500674b1062afe438d34d0c8216d38dc31.1177822058.git.len.brown@intel.com>
2007-04-29 4:50 ` [PATCH 013/105] asus-laptop: use acpi_evaluate_integer instead of read_acpi_int Len Brown
[not found] ` <935ffeeca84fe5d48d0cc9f35c58db42b384229f.1177822058.git.len.brown@intel.com>
2007-04-29 4:50 ` [PATCH 014/105] asus-laptop: clean write_status Len Brown
[not found] ` <fdd8d08084663242b42e27f7d71739f3f9009286.1177822058.git.len.brown@intel.com>
2007-04-29 4:50 ` [PATCH 015/105] asus-laptop: add GLED Len Brown
[not found] ` <185e5af98b1e09b1e0f859332243223776b2ad57.1177822058.git.len.brown@intel.com>
2007-04-29 4:50 ` [PATCH 016/105] asus-laptop: add wapf param Len Brown
[not found] ` <8ec555c2c4c6c33759a1dbb13fa8f3b14fc77e10.1177822058.git.len.brown@intel.com>
2007-04-29 4:50 ` [PATCH 017/105] asus-laptop: version bump Len Brown
[not found] ` <6d15702cc07503b74494dc4f1ddb15f354987b14.1177822058.git.len.brown@intel.com>
2007-04-29 4:50 ` [PATCH 018/105] ACPI: sbs: use EC rather than I2C Len Brown
[not found] ` <b4150fc4ae20621edf2f8e1ea5ce13eb2c803e7a.1177822058.git.len.brown@intel.com>
2007-04-29 4:50 ` [PATCH 019/105] ACPI: sbs: remove I2C Kconfig dependency Len Brown
[not found] ` <84cb55987236ffea062a35fbe1441768b6bb2722.1177822058.git.len.brown@intel.com>
2007-04-29 4:50 ` [PATCH 020/105] ACPI: sbs: remove I2C Makefile hooks Len Brown
[not found] ` <6845118b3b7a9cc2ba14dc665370217bc3ba8057.1177822058.git.len.brown@intel.com>
2007-04-29 4:50 ` [PATCH 021/105] ACPI: sbs: Debug messages correction/improvement Len Brown
[not found] ` <722062334b972c31a3b83dbf7e9b5a58bb2707dd.1177822058.git.len.brown@intel.com>
2007-04-29 4:50 ` Len Brown [this message]
[not found] ` <439a888885c584f7ac8536a43be80475f9eaed71.1177822058.git.len.brown@intel.com>
2007-04-29 4:50 ` [PATCH 023/105] ACPI: sbs: remove i2c_ec.[ch] Len Brown
[not found] ` <837ca6ddb440c186eaa8e01b69486581d3457f2c.1177822058.git.len.brown@intel.com>
2007-04-29 4:50 ` [PATCH 024/105] ACPI: ibm-acpi: kill trailing whitespace Len Brown
[not found] ` <e062e0343871a41e8ec408f1c1e8ac3b0310da9d.1177822058.git.len.brown@intel.com>
2007-04-29 4:50 ` [PATCH 025/105] ACPI: ibm-acpi: rename some identifiers Len Brown
[not found] ` <1406cdd1760743106278c1f02a0f445159c8f400.1177822058.git.len.brown@intel.com>
2007-04-29 4:50 ` [PATCH 026/105] ACPI: ibm-acpi: add header file Len Brown
[not found] ` <56b6aeb05890f219895197f5166637b3d7a6f679.1177822058.git.len.brown@intel.com>
2007-04-29 4:50 ` [PATCH 027/105] ACPI: ibm-acpi: organize code Len Brown
[not found] ` <a62bc916cf48caaf9efa2fed20440fd617647c6c.1177822058.git.len.brown@intel.com>
2007-04-29 4:50 ` [PATCH 028/105] ACPI: ibm-acpi: update copyright notice Len Brown
[not found] ` <38f996ed21089fa4ae40526a5f428e3c792ea561.1177822058.git.len.brown@intel.com>
2007-04-29 4:50 ` [PATCH 029/105] ACPI: ibm-acpi: update documentation Len Brown
[not found] ` <62a6d7fd9bc1d85f9aae734c46234e88fa839db0.1177822058.git.len.brown@intel.com>
2007-04-29 4:50 ` [PATCH 031/105] ACPI: dock: use NULL for pointer Len Brown
[not found] ` <85998248b2e8c6ae7d3ad1fa7b059aed22205ec4.1177822058.git.len.brown@intel.com>
2007-04-29 4:50 ` [PATCH 033/105] ACPI: thinkpad-acpi: cleanup Kconfig for thinkpad-acpi Len Brown
[not found] ` <d903ac5455102b13d0e28d6a39f640175fb4cd4d.1177822058.git.len.brown@intel.com>
2007-04-29 4:50 ` [PATCH 034/105] ACPI: thinkpad-acpi: add compatibility MODULE_ALIAS entry Len Brown
[not found] ` <643f12dbb660e139fbaea268f3e3ce4d7d594b8f.1177822058.git.len.brown@intel.com>
2007-04-29 4:50 ` [PATCH 035/105] ACPI: thinkpad-acpi: cleanup after rename Len Brown
[not found] ` <756970ad4bb93027a60da2de9b43d094b7f387a2.1177822058.git.len.brown@intel.com>
2007-04-29 4:50 ` [PATCH 036/105] ACPI: thinkpad-acpi: update MAINTAINERS Len Brown
[not found] ` <11778223411658-git-send-email-len.brown@intel.com>
[not found] ` <11778223412672-git-send-email-len.brown@intel.com>
[not found] ` <11778223423-git-send-email-len.brown@intel.com>
[not found] ` <1177822343712-git-send-email-len.brown@intel.com>
[not found] ` <11778223442065-git-send-email-len.brown@intel.com>
[not found] ` <11778223452843-git-send-email-len.brown@intel.com>
[not found] ` <11778223461282-git-send-email-len.brown@intel.com>
[not found] ` <11778223472316-git-send-email-len.brown@intel.com>
[not found] ` <6700121b535fa16fe1c8aaac03559b2f12909726.1177822058.git.len.brown@intel.com>
2007-04-29 4:50 ` [PATCH 046/105] ACPI: thinkpad-acpi: rename register_ibmacpi_subdriver Len Brown
[not found] ` <142cfc90f026b0b8fd1a14ba11ae29eb7b1b6ca1.1177822058.git.len.brown@intel.com>
2007-04-29 4:50 ` [PATCH 047/105] ACPI: thinkpad-acpi: rename one stray use of ibm-acpi in a comment Len Brown
[not found] ` <1def7115f0277ce9d2a54efd0ae187aa88d5c7fa.1177822058.git.len.brown@intel.com>
2007-04-29 4:50 ` [PATCH 048/105] ACPI: thinkpad-acpi: rename module glue Len Brown
[not found] ` <efa27145df34eacf2569bd45f68dbe00003d3616.1177822058.git.len.brown@intel.com>
2007-04-29 4:50 ` [PATCH 049/105] ACPI: thinkpad-acpi: rename thinkpad constants Len Brown
[not found] ` <f51d1a39840ae5e8678d702ab57377c611fc3826.1177822058.git.len.brown@intel.com>
2007-04-29 4:50 ` [PATCH 050/105] ACPI: thinkpad-acpi: update fan firmware documentation Len Brown
[not found] ` <132ce09123755ec5e3d3a8ae22f4f753c3baac97.1177822058.git.len.brown@intel.com>
2007-04-29 4:50 ` [PATCH 051/105] ACPI: thinkpad-acpi: add debug mode Len Brown
[not found] ` <5fba344cfdbaa79e6320da26c3db34dfb219a845.1177822058.git.len.brown@intel.com>
2007-04-29 4:50 ` [PATCH 052/105] ACPI: thinkpad-acpi: clean up probing and move init to subdrivers Len Brown
[not found] ` <fe08bc4b4fd1371fad111675a564e4d2ebbf39ea.1177822058.git.len.brown@intel.com>
2007-04-29 4:50 ` [PATCH 053/105] ACPI: thinkpad-acpi: add subdriver debug statements Len Brown
[not found] ` <a5763f2223ce3fdbc75923f8c948fc7b59ed2f96.1177822058.git.len.brown@intel.com>
2007-04-29 4:50 ` [PATCH 054/105] ACPI: thinkpad-acpi: uncouple subdriver init from ibms struct Len Brown
[not found] ` <0dcef77c5b889338811d35e786b42046259fe433.1177822058.git.len.brown@intel.com>
2007-04-29 4:50 ` [PATCH 055/105] ACPI: thinkpad-acpi: improve thinkpad detection Len Brown
[not found] ` <926411779287ad4f7013c9d80aa44fd131b70cd9.1177822058.git.len.brown@intel.com>
2007-04-29 4:50 ` [PATCH 056/105] ACPI: thinkpad-acpi: use bitfields to hold subdriver flags Len Brown
[not found] ` <d8fd94d9f08237ffda7e44e6825b057bf20a90e3.1177822058.git.len.brown@intel.com>
2007-04-29 4:50 ` [PATCH 057/105] ACPI: thinkpad-acpi: use bitfields for module flags Len Brown
[not found] ` <8d376cd6543d57ef10799be02ba5f19aa6678032.1177822058.git.len.brown@intel.com>
2007-04-29 4:50 ` [PATCH 058/105] ACPI: thinkpad-acpi: prepare for device model conversion Len Brown
[not found] ` <d01320e606d334a0cd35d781a58f9f3c254829ab.1177822058.git.len.brown@intel.com>
2007-04-29 4:50 ` [PATCH 059/105] ACPI: thinkpad-acpi: mark acpi helper functions __must_check Len Brown
[not found] ` <b86c4722de62f336b82dff3c47ef59ba2a587ec1.1177822058.git.len.brown@intel.com>
2007-04-29 4:51 ` [PATCH 060/105] ACPI: thinkpad-acpi: clean up hotkey subdriver Len Brown
[not found] ` <d6fdd1e91a8a4cd852dc1d945165e3a69ac9e257.1177822058.git.len.brown@intel.com>
2007-04-29 4:51 ` [PATCH 061/105] ACPI: thinkpad-acpi: cleanup bluetooth and wan for sysfs conversion Len Brown
[not found] ` <83f34724643a3b0ec9322490b9ad9f1b60170a6c.1177822058.git.len.brown@intel.com>
2007-04-29 4:51 ` [PATCH 062/105] ACPI: thinkpad-acpi: cleanup video subdriver Len Brown
[not found] ` <c9bea99c1a712548db3437cbca52b0da8f30069c.1177822058.git.len.brown@intel.com>
2007-04-29 4:51 ` [PATCH 063/105] ACPI: thinkpad-acpi: clean up CMOS commands subdriver Len Brown
[not found] ` <04cc862c1893a055ab1117fa6f3aa0886c0ba032.1177822058.git.len.brown@intel.com>
2007-04-29 4:51 ` [PATCH 064/105] ACPI: thinkpad-acpi: cleanup thermal subdriver for sysfs conversion Len Brown
[not found] ` <99fba3f8177956170f3d86f83c2cf2f70747105f.1177822058.git.len.brown@intel.com>
2007-04-29 4:51 ` [PATCH 065/105] ACPI: thinkpad-acpi: improve fan watchdog messages Len Brown
[not found] ` <f8993aff8b4de0317c6e081802ca5c86c449fef2.1177822058.git.len.brown@intel.com>
2007-04-29 4:51 ` [PATCH 066/105] ACPI: Disable MSI on request of FADT Len Brown
[not found] ` <f989106cac719f8fe91da7734e73b3ca09146ecc.1177822058.git.len.brown@intel.com>
2007-04-29 4:51 ` [PATCH 067/105] ACPI: Improve acpi debug documentation Len Brown
[not found] ` <54ae15014c306b3d7ad32c996fea9a5ac8560b60.1177822058.git.len.brown@intel.com>
2007-04-29 4:51 ` [PATCH 068/105] ACPI: thinkpad-acpi: register with the device model Len Brown
[not found] ` <176750d68801bfa4a88d1cf54174aa0347d7e5d8.1177822058.git.len.brown@intel.com>
2007-04-29 4:51 ` [PATCH 069/105] ACPI: thinkpad-acpi: driver sysfs conversion Len Brown
[not found] ` <7252374a39d794879f5e47bcfa0a16e7599b27b5.1177822058.git.len.brown@intel.com>
2007-04-29 4:51 ` [PATCH 070/105] ACPI: thinkpad-acpi: add infrastructure for the sysfs device attributes Len Brown
[not found] ` <40ca9fdf8aa7d929e2b8939be1e6380d107381e1.1177822058.git.len.brown@intel.com>
2007-04-29 4:51 ` [PATCH 071/105] ACPI: thinkpad-acpi: protect fan and hotkey data structures Len Brown
[not found] ` <2c37aa4e22dd55070c608290c5031f2ee93e69ce.1177822058.git.len.brown@intel.com>
2007-04-29 4:51 ` [PATCH 072/105] ACPI: thinkpad-acpi: add sysfs support to the thermal subdriver Len Brown
[not found] ` <fe98a52ce7540fb3a19d57488a08864110cf4d5c.1177822058.git.len.brown@intel.com>
2007-04-29 4:51 ` [PATCH 073/105] ACPI: thinkpad-acpi: add sysfs support to fan subdriver Len Brown
[not found] ` <eaa7571b2d1a08873e4bdd8e6db3431df61cd9ad.1177822058.git.len.brown@intel.com>
2007-04-29 4:51 ` [PATCH 074/105] ACPI: thinkpad-acpi: add a safety net for TPEC fan control mode Len Brown
[not found] ` <b616004c70dd7f60a1477c3e9d6fddd00ee1fa37.1177822058.git.len.brown@intel.com>
2007-04-29 4:51 ` [PATCH 075/105] ACPI: thinkpad-acpi: add sysfs support to the cmos command subdriver Len Brown
[not found] ` <7d5a015eece8be9186d3613d595643a520555e33.1177822058.git.len.brown@intel.com>
2007-04-29 4:51 ` [PATCH 076/105] ACPI: thinkpad-acpi: update brightness sysfs interface support Len Brown
[not found] ` <d8938801d10945ac2fbe0f41ded43f6276660a17.1177822058.git.len.brown@intel.com>
2007-04-29 4:51 ` [PATCH 077/105] ACPI: remove duplicate include Len Brown
[not found] ` <a0bd4ac498acfe60f7533d15ba60d5efdd4e9ca5.1177822058.git.len.brown@intel.com>
2007-04-29 4:51 ` [PATCH 078/105] ACPI: Remove duplicate definitions for _STA bits Len Brown
[not found] ` <0c0e8921018dbb4fe189a1034f80ac32553bc7bc.1177822058.git.len.brown@intel.com>
2007-04-29 4:51 ` [PATCH 079/105] ACPI: use _STA bit names rather than 0x0F Len Brown
[not found] ` <8ce8e2f99a973c39c4aeddbe0966038196a8e71a.1177822058.git.len.brown@intel.com>
2007-04-29 4:51 ` [PATCH 080/105] ACPI: correct pathname in comment Len Brown
[not found] ` <cf6c6045a06aed2ccd8ebd0a3128ce0f2f8a11aa.1177822058.git.len.brown@intel.com>
2007-04-29 4:51 ` [PATCH 081/105] ACPI: word-smith kconfig help Len Brown
[not found] ` <8aa55591bfea25c441117e82711cbfd7c274250a.1177822058.git.len.brown@intel.com>
2007-04-29 4:51 ` [PATCH 082/105] ACPI: make /proc/acpi/wakeup more useful Len Brown
[not found] ` <b2983f10f87423fab92326bbe1e92e2256573d4f.1177822058.git.len.brown@intel.com>
2007-04-29 4:51 ` [PATCH 083/105] ACPI: prevent ACPI quirk warning mass spamming in logs Len Brown
2007-04-29 9:58 ` Andi Kleen
[not found] ` <afd3810d9b6b0d446a34e1d4e94f0cc020b00a14.1177822058.git.len.brown@intel.com>
2007-04-29 4:51 ` [PATCH 084/105] ACPI: Remove a warning about unused variable in !CONFIG_ACPI compilation Len Brown
2007-04-29 9:59 ` Andi Kleen
[not found] ` <79fff270026dc46634563a29b99e4034028ee919.1177822058.git.len.brown@intel.com>
2007-04-29 4:51 ` [PATCH 085/105] ACPICA: clear fields reserved before FADT r3 Len Brown
[not found] ` <ecf2a80a97b3d38ae008fa8a3cb98cd540ac1eae.1177822058.git.len.brown@intel.com>
2007-04-29 4:51 ` [PATCH 086/105] ACPI: thinkpad-acpi: add a fan-control feature master toggle Len Brown
[not found] ` <4985cd0a63b0713b6469ef01aae6a0e63ea72f83.1177822058.git.len.brown@intel.com>
2007-04-29 4:51 ` [PATCH 087/105] ACPI: thinkpad-acpi: do not arm fan watchdog if it would not work Len Brown
[not found] ` <ca4ac2f48a4502bbbfcb47b86312273c28194f53.1177822058.git.len.brown@intel.com>
2007-04-29 4:51 ` [PATCH 088/105] ACPI: thinkpad-acpi: fix a fan watchdog invocation Len Brown
[not found] ` <c573ddb998456a89a5ccb83a922d2c8ba18484a6.1177822058.git.len.brown@intel.com>
2007-04-29 4:51 ` [PATCH 089/105] ACPI: thinkpad-acpi: map ENXIO to EINVAL for fan sysfs Len Brown
[not found] ` <b39fe582eb9252dca9a62f7135bcad2e486083e5.1177822058.git.len.brown@intel.com>
2007-04-29 4:51 ` [PATCH 090/105] ACPI: thinkpad-acpi: improve fan control documentation Len Brown
[not found] ` <5ae930e685018e2dc6d4139362213e4b283e5700.1177822058.git.len.brown@intel.com>
2007-04-29 4:51 ` [PATCH 091/105] ACPI: thinkpad-acpi: improve debugging for acpi helpers Len Brown
[not found] ` <d94a7f16cad7700f8d2b142cc13cfba5387af3db.1177822058.git.len.brown@intel.com>
2007-04-29 4:51 ` [PATCH 092/105] ACPI: thinkpad-acpi: improve dock subdriver initialization Len Brown
[not found] ` <a0416420e2c6244792d6f308183ad57c40532078.1177822058.git.len.brown@intel.com>
2007-04-29 4:51 ` [PATCH 093/105] ACPI: thinkpad-acpi: add sysfs support to hotkey subdriver Len Brown
[not found] ` <d3a6ade4f84416d774c3e5db5faae1840d55bd97.1177822058.git.len.brown@intel.com>
2007-04-29 4:51 ` [PATCH 094/105] ACPI: thinkpad-acpi: add sysfs support to wan and bluetooth subdrivers Len Brown
[not found] ` <836a53f42f3b5d5cb3a0751587ea33801e4b120d.1177822058.git.len.brown@intel.com>
2007-04-29 4:51 ` [PATCH 095/105] thinkpad-acpi: make drivers/misc/thinkpad_acpi:fan_mutex static Len Brown
[not found] ` <11778223931192-git-send-email-len.brown@intel.com>
[not found] ` <11778223942367-git-send-email-len.brown@intel.com>
[not found] ` <11778223942377-git-send-email-len.brown@intel.com>
[not found] ` <1177822395384-git-send-email-len.brown@intel.com>
[not found] ` <11778223963095-git-send-email-len.brown@intel.com>
[not found] ` <11778223972558-git-send-email-len.brown@intel.com>
[not found] ` <11778223981263-git-send-email-len.brown@intel.com>
[not found] ` <117782239917-git-send-email-len.brown@intel.com>
[not found] ` <c6c60106b9584f17c55e4c5e0ce9b905a1a6cdb6.1177822058.git.len.brown@intel.com>
2007-04-29 4:51 ` [PATCH 105/105] sonypi: use mutex instead of semaphore Len Brown
2007-05-01 2:19 ` ACPI patches for 2.6.22 merge window Mattia Dongili
2007-05-10 6:44 ` Len Brown
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=1177822324973-git-send-email-len.brown@intel.com \
--to=len.brown@intel.com \
--cc=linux-acpi@vger.kernel.org \
--cc=vladimir.p.lebedev@intel.com \
/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