Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 117834
b: refs/heads/master
c: 16be87e
h: refs/heads/master
v: v3
  • Loading branch information
Miao Xie authored and Len Brown committed Oct 25, 2008
1 parent eea9ef3 commit 110d2bc
Show file tree
Hide file tree
Showing 23 changed files with 188 additions and 123 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: 0173a3265b228da319ceb9c1ec6a5682fd1b2d92
refs/heads/master: 16be87ea170ae6cfaa9f47f79d14f7577d8cb420
2 changes: 1 addition & 1 deletion trunk/Documentation/hwmon/lm90
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Supported chips:
Datasheet: Publicly available at the National Semiconductor website
http://www.national.com/pf/LM/LM90.html
* National Semiconductor LM89
Prefix: 'lm89' (no auto-detection)
Prefix: 'lm99'
Addresses scanned: I2C 0x4c and 0x4d
Datasheet: Publicly available at the National Semiconductor website
http://www.national.com/mpf/LM/LM89.html
Expand Down
2 changes: 1 addition & 1 deletion trunk/Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
VERSION = 2
PATCHLEVEL = 6
SUBLEVEL = 28
EXTRAVERSION = -rc2
EXTRAVERSION = -rc1
NAME = Killer Bat of Doom

# *DOCUMENTATION*
Expand Down
5 changes: 5 additions & 0 deletions trunk/drivers/acpi/processor_perflib.c
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,10 @@

#include <asm/uaccess.h>
#endif

#ifdef CONFIG_X86
#include <asm/cpufeature.h>
#endif

#include <acpi/acpi_bus.h>
#include <acpi/processor.h>
Expand Down Expand Up @@ -360,11 +363,13 @@ static int acpi_processor_get_performance_info(struct acpi_processor *pr)
* the BIOS is older than the CPU and does not know its frequencies
*/
update_bios:
#ifdef CONFIG_X86
if (ACPI_SUCCESS(acpi_get_handle(pr->handle, "_PPC", &handle))){
if(boot_cpu_has(X86_FEATURE_EST))
printk(KERN_WARNING FW_BUG "BIOS needs update for CPU "
"frequency support\n");
}
#endif
return result;
}

Expand Down
6 changes: 2 additions & 4 deletions trunk/drivers/char/amiserial.c
Original file line number Diff line number Diff line change
Expand Up @@ -2071,13 +2071,12 @@ module_init(rs_init)
module_exit(rs_exit)


#if defined(CONFIG_SERIAL_CONSOLE) && !defined(MODULE)

/*
* ------------------------------------------------------------
* Serial console driver
* ------------------------------------------------------------
*/
#ifdef CONFIG_SERIAL_CONSOLE

static void amiga_serial_putc(char c)
{
Expand Down Expand Up @@ -2131,7 +2130,6 @@ static int __init amiserial_console_init(void)
return 0;
}
console_initcall(amiserial_console_init);

#endif /* CONFIG_SERIAL_CONSOLE && !MODULE */
#endif

MODULE_LICENSE("GPL");
30 changes: 15 additions & 15 deletions trunk/drivers/hwmon/abituguru3.c
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ static const struct abituguru3_motherboard_info abituguru3_motherboards[] = {
{ "+3.3V", 10, 0, 20, 1, 0 },
{ "5VSB", 11, 0, 30, 1, 0 },
{ "CPU", 24, 1, 1, 1, 0 },
{ "System", 25, 1, 1, 1, 0 },
{ "System ", 25, 1, 1, 1, 0 },
{ "PWM", 26, 1, 1, 1, 0 },
{ "CPU Fan", 32, 2, 60, 1, 0 },
{ "NB Fan", 33, 2, 60, 1, 0 },
Expand All @@ -200,7 +200,7 @@ static const struct abituguru3_motherboard_info abituguru3_motherboards[] = {
{ "+3.3V", 10, 0, 20, 1, 0 },
{ "5VSB", 11, 0, 30, 1, 0 },
{ "CPU", 24, 1, 1, 1, 0 },
{ "System", 25, 1, 1, 1, 0 },
{ "System ", 25, 1, 1, 1, 0 },
{ "PWM1", 26, 1, 1, 1, 0 },
{ "PWM2", 27, 1, 1, 1, 0 },
{ "PWM3", 28, 1, 1, 1, 0 },
Expand Down Expand Up @@ -229,7 +229,7 @@ static const struct abituguru3_motherboard_info abituguru3_motherboards[] = {
{ "+3.3V", 10, 0, 20, 1, 0 },
{ "5VSB", 11, 0, 30, 1, 0 },
{ "CPU", 24, 1, 1, 1, 0 },
{ "System", 25, 1, 1, 1, 0 },
{ "System ", 25, 1, 1, 1, 0 },
{ "PWM", 26, 1, 1, 1, 0 },
{ "CPU Fan", 32, 2, 60, 1, 0 },
{ "NB Fan", 33, 2, 60, 1, 0 },
Expand All @@ -250,7 +250,7 @@ static const struct abituguru3_motherboard_info abituguru3_motherboards[] = {
{ "+3.3V", 10, 0, 20, 1, 0 },
{ "5VSB", 11, 0, 30, 1, 0 },
{ "CPU", 24, 1, 1, 1, 0 },
{ "System", 25, 1, 1, 1, 0 },
{ "System ", 25, 1, 1, 1, 0 },
{ "PWM", 26, 1, 1, 1, 0 },
{ "CPU Fan", 32, 2, 60, 1, 0 },
{ "NB Fan", 33, 2, 60, 1, 0 },
Expand Down Expand Up @@ -342,7 +342,7 @@ static const struct abituguru3_motherboard_info abituguru3_motherboards[] = {
{ "+3.3V", 10, 0, 20, 1, 0 },
{ "5VSB", 11, 0, 30, 1, 0 },
{ "CPU", 24, 1, 1, 1, 0 },
{ "System", 25, 1, 1, 1, 0 },
{ "System ", 25, 1, 1, 1, 0 },
{ "PWM1", 26, 1, 1, 1, 0 },
{ "PWM2", 27, 1, 1, 1, 0 },
{ "PWM3", 28, 1, 1, 1, 0 },
Expand Down Expand Up @@ -371,7 +371,7 @@ static const struct abituguru3_motherboard_info abituguru3_motherboards[] = {
{ "+3.3V", 10, 0, 20, 1, 0 },
{ "5VSB", 11, 0, 30, 1, 0 },
{ "CPU", 24, 1, 1, 1, 0 },
{ "System", 25, 1, 1, 1, 0 },
{ "System ", 25, 1, 1, 1, 0 },
{ "PWM", 26, 1, 1, 1, 0 },
{ "CPU Fan", 32, 2, 60, 1, 0 },
{ "NB Fan", 33, 2, 60, 1, 0 },
Expand Down Expand Up @@ -402,7 +402,7 @@ static const struct abituguru3_motherboard_info abituguru3_motherboards[] = {
{ "AUX3 Fan", 36, 2, 60, 1, 0 },
{ NULL, 0, 0, 0, 0, 0 } }
},
{ 0x0016, "AW9D-MAX (Intel i975-ICH7)", {
{ 0x0016, NULL /* AW9D-MAX, need DMI string */, {
{ "CPU Core", 0, 0, 10, 1, 0 },
{ "DDR2", 1, 0, 20, 1, 0 },
{ "DDR2 VTT", 2, 0, 10, 1, 0 },
Expand All @@ -416,7 +416,7 @@ static const struct abituguru3_motherboard_info abituguru3_motherboards[] = {
{ "+3.3V", 10, 0, 20, 1, 0 },
{ "5VSB", 11, 0, 30, 1, 0 },
{ "CPU", 24, 1, 1, 1, 0 },
{ "System", 25, 1, 1, 1, 0 },
{ "System ", 25, 1, 1, 1, 0 },
{ "PWM1", 26, 1, 1, 1, 0 },
{ "PWM2", 27, 1, 1, 1, 0 },
{ "PWM3", 28, 1, 1, 1, 0 },
Expand Down Expand Up @@ -446,7 +446,7 @@ static const struct abituguru3_motherboard_info abituguru3_motherboards[] = {
{ "ATX +3.3V", 10, 0, 20, 1, 0 },
{ "ATX 5VSB", 11, 0, 30, 1, 0 },
{ "CPU", 24, 1, 1, 1, 0 },
{ "System", 26, 1, 1, 1, 0 },
{ "System ", 26, 1, 1, 1, 0 },
{ "PWM", 27, 1, 1, 1, 0 },
{ "CPU FAN", 32, 2, 60, 1, 0 },
{ "SYS FAN", 34, 2, 60, 1, 0 },
Expand All @@ -469,7 +469,7 @@ static const struct abituguru3_motherboard_info abituguru3_motherboards[] = {
{ "+3.3V", 10, 0, 20, 1, 0 },
{ "5VSB", 11, 0, 30, 1, 0 },
{ "CPU", 24, 1, 1, 1, 0 },
{ "System", 25, 1, 1, 1, 0 },
{ "System ", 25, 1, 1, 1, 0 },
{ "PWM Phase1", 26, 1, 1, 1, 0 },
{ "PWM Phase2", 27, 1, 1, 1, 0 },
{ "PWM Phase3", 28, 1, 1, 1, 0 },
Expand All @@ -487,7 +487,7 @@ static const struct abituguru3_motherboard_info abituguru3_motherboards[] = {
{ "DDR2", 13, 0, 20, 1, 0 },
{ "DDR2 VTT", 14, 0, 10, 1, 0 },
{ "CPU VTT", 3, 0, 20, 1, 0 },
{ "NB 1.2V", 4, 0, 10, 1, 0 },
{ "NB 1.2V ", 4, 0, 10, 1, 0 },
{ "SB 1.5V", 6, 0, 10, 1, 0 },
{ "HyperTransport", 5, 0, 10, 1, 0 },
{ "ATX +12V (24-Pin)", 12, 0, 60, 1, 0 },
Expand All @@ -496,7 +496,7 @@ static const struct abituguru3_motherboard_info abituguru3_motherboards[] = {
{ "ATX +3.3V", 10, 0, 20, 1, 0 },
{ "ATX 5VSB", 11, 0, 30, 1, 0 },
{ "CPU", 24, 1, 1, 1, 0 },
{ "System", 25, 1, 1, 1, 0 },
{ "System ", 25, 1, 1, 1, 0 },
{ "PWM Phase1", 26, 1, 1, 1, 0 },
{ "PWM Phase2", 27, 1, 1, 1, 0 },
{ "PWM Phase3", 28, 1, 1, 1, 0 },
Expand All @@ -523,8 +523,8 @@ static const struct abituguru3_motherboard_info abituguru3_motherboards[] = {
{ "+3.3V", 10, 0, 20, 1, 0 },
{ "5VSB", 11, 0, 30, 1, 0 },
{ "CPU", 24, 1, 1, 1, 0 },
{ "System", 25, 1, 1, 1, 0 },
{ "PWM", 26, 1, 1, 1, 0 },
{ "System ", 25, 1, 1, 1, 0 },
{ "PWM ", 26, 1, 1, 1, 0 },
{ "PWM Phase2", 27, 1, 1, 1, 0 },
{ "PWM Phase3", 28, 1, 1, 1, 0 },
{ "PWM Phase4", 29, 1, 1, 1, 0 },
Expand Down Expand Up @@ -947,7 +947,7 @@ static int __devinit abituguru3_probe(struct platform_device *pdev)
if (!abituguru3_motherboards[i].dmi_name) {
printk(KERN_WARNING ABIT_UGURU3_NAME ": this motherboard was "
"not detected using DMI. Please send the output of "
"\"dmidecode\" to the abituguru3 maintainer "
"\"dmidecode\" to the abituguru3 maintainer"
"(see MAINTAINERS)\n");
}
#endif
Expand Down
29 changes: 20 additions & 9 deletions trunk/drivers/hwmon/adt7473.c
Original file line number Diff line number Diff line change
Expand Up @@ -319,24 +319,35 @@ static struct adt7473_data *adt7473_update_device(struct device *dev)
}

/*
* Conversions
* On this chip, voltages are given as a count of steps between a minimum
* and maximum voltage, not a direct voltage.
*/

/* IN are scaled acording to built-in resistors */
static const int adt7473_scaling[] = { /* .001 Volts */
2250, 3300
static const int volt_convert_table[][2] = {
{2997, 3},
{4395, 4},
};
#define SCALE(val, from, to) (((val) * (to) + ((from) / 2)) / (from))

static int decode_volt(int volt_index, u8 raw)
{
return SCALE(raw, 192, adt7473_scaling[volt_index]);
int cmax = volt_convert_table[volt_index][0];
int cmin = volt_convert_table[volt_index][1];
return ((raw * (cmax - cmin)) / 255) + cmin;
}

static u8 encode_volt(int volt_index, int cooked)
{
int raw = SCALE(cooked, adt7473_scaling[volt_index], 192);
return SENSORS_LIMIT(raw, 0, 255);
int cmax = volt_convert_table[volt_index][0];
int cmin = volt_convert_table[volt_index][1];
u8 x;

if (cooked > cmax)
cooked = cmax;
else if (cooked < cmin)
cooked = cmin;

x = ((cooked - cmin) * 255) / (cmax - cmin);

return x;
}

static ssize_t show_volt_min(struct device *dev,
Expand Down
1 change: 0 additions & 1 deletion trunk/drivers/hwmon/hwmon-vid.c
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,6 @@ static struct vrm_model vrm_models[] = {
{X86_VENDOR_AMD, 0x6, ANY, ANY, 90}, /* Athlon Duron etc */
{X86_VENDOR_AMD, 0xF, 0x3F, ANY, 24}, /* Athlon 64, Opteron */
{X86_VENDOR_AMD, 0xF, ANY, ANY, 25}, /* NPT family 0Fh */
{X86_VENDOR_AMD, 0x10, ANY, ANY, 25}, /* NPT family 10h */
{X86_VENDOR_INTEL, 0x6, 0x9, ANY, 13}, /* Pentium M (130 nm) */
{X86_VENDOR_INTEL, 0x6, 0xB, ANY, 85}, /* Tualatin */
{X86_VENDOR_INTEL, 0x6, 0xD, ANY, 13}, /* Pentium M (90 nm) */
Expand Down
52 changes: 7 additions & 45 deletions trunk/drivers/hwmon/lm90.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@
* made by National Semiconductor. Both have an increased remote
* temperature measurement accuracy (1 degree), and the LM99
* additionally shifts remote temperatures (measured and limits) by 16
* degrees, which allows for higher temperatures measurement.
* degrees, which allows for higher temperatures measurement. The
* driver doesn't handle it since it can be done easily in user-space.
* Note that there is no way to differentiate between both chips.
* When device is auto-detected, the driver will assume an LM99.
*
* This driver also supports the LM86, another sensor chip made by
* National Semiconductor. It is exactly similar to the LM90 except it
Expand Down Expand Up @@ -169,8 +169,8 @@ static const struct i2c_device_id lm90_id[] = {
{ "adt7461", adt7461 },
{ "lm90", lm90 },
{ "lm86", lm86 },
{ "lm89", lm86 },
{ "lm99", lm99 },
{ "lm89", lm99 },
{ "lm99", lm99 }, /* Missing temperature offset */
{ "max6646", max6646 },
{ "max6647", max6646 },
{ "max6649", max6646 },
Expand Down Expand Up @@ -366,10 +366,6 @@ static ssize_t show_temp8(struct device *dev, struct device_attribute *devattr,
else
temp = temp_from_s8(data->temp8[attr->index]);

/* +16 degrees offset for temp2 for the LM99 */
if (data->kind == lm99 && attr->index == 3)
temp += 16000;

return sprintf(buf, "%d\n", temp);
}

Expand All @@ -389,10 +385,6 @@ static ssize_t set_temp8(struct device *dev, struct device_attribute *devattr,
long val = simple_strtol(buf, NULL, 10);
int nr = attr->index;

/* +16 degrees offset for temp2 for the LM99 */
if (data->kind == lm99 && attr->index == 3)
val -= 16000;

mutex_lock(&data->update_lock);
if (data->kind == adt7461)
data->temp8[nr] = temp_to_u8_adt7461(data, val);
Expand All @@ -419,10 +411,6 @@ static ssize_t show_temp11(struct device *dev, struct device_attribute *devattr,
else
temp = temp_from_s16(data->temp11[attr->index]);

/* +16 degrees offset for temp2 for the LM99 */
if (data->kind == lm99 && attr->index <= 2)
temp += 16000;

return sprintf(buf, "%d\n", temp);
}

Expand All @@ -444,10 +432,6 @@ static ssize_t set_temp11(struct device *dev, struct device_attribute *devattr,
long val = simple_strtol(buf, NULL, 10);
int nr = attr->index;

/* +16 degrees offset for temp2 for the LM99 */
if (data->kind == lm99 && attr->index <= 2)
val -= 16000;

mutex_lock(&data->update_lock);
if (data->kind == adt7461)
data->temp11[nr] = temp_to_u16_adt7461(data, val);
Expand Down Expand Up @@ -477,15 +461,9 @@ static ssize_t show_temphyst(struct device *dev, struct device_attribute *devatt

if (data->kind == adt7461)
temp = temp_from_u8_adt7461(data, data->temp8[attr->index]);
else if (data->kind == max6646)
temp = temp_from_u8(data->temp8[attr->index]);
else
temp = temp_from_s8(data->temp8[attr->index]);

/* +16 degrees offset for temp2 for the LM99 */
if (data->kind == lm99 && attr->index == 3)
temp += 16000;

return sprintf(buf, "%d\n", temp - temp_from_s8(data->temp_hyst));
}

Expand All @@ -495,19 +473,12 @@ static ssize_t set_temphyst(struct device *dev, struct device_attribute *dummy,
struct i2c_client *client = to_i2c_client(dev);
struct lm90_data *data = i2c_get_clientdata(client);
long val = simple_strtol(buf, NULL, 10);
int temp;
long hyst;

mutex_lock(&data->update_lock);
if (data->kind == adt7461)
temp = temp_from_u8_adt7461(data, data->temp8[2]);
else if (data->kind == max6646)
temp = temp_from_u8(data->temp8[2]);
else
temp = temp_from_s8(data->temp8[2]);

data->temp_hyst = hyst_to_reg(temp - val);
hyst = temp_from_s8(data->temp8[2]) - val;
i2c_smbus_write_byte_data(client, LM90_REG_W_TCRIT_HYST,
data->temp_hyst);
hyst_to_reg(hyst));
mutex_unlock(&data->update_lock);
return count;
}
Expand Down Expand Up @@ -711,15 +682,6 @@ static int lm90_detect(struct i2c_client *new_client, int kind,
} else
if ((chip_id & 0xF0) == 0x30) { /* LM89/LM99 */
kind = lm99;
dev_info(&adapter->dev,
"Assuming LM99 chip at "
"0x%02x\n", address);
dev_info(&adapter->dev,
"If it is an LM89, pass "
"force_lm86=%d,0x%02x when "
"loading the lm90 driver\n",
i2c_adapter_id(adapter),
address);
} else
if (address == 0x4C
&& (chip_id & 0xF0) == 0x10) { /* LM86 */
Expand Down
4 changes: 2 additions & 2 deletions trunk/drivers/hwmon/w83781d.c
Original file line number Diff line number Diff line change
Expand Up @@ -1968,7 +1968,7 @@ w83781d_isa_register(void)
return res;
}

static void
static void __exit
w83781d_isa_unregister(void)
{
if (pdev) {
Expand Down Expand Up @@ -2017,7 +2017,7 @@ w83781d_isa_register(void)
return 0;
}

static void
static void __exit
w83781d_isa_unregister(void)
{
}
Expand Down
Loading

0 comments on commit 110d2bc

Please sign in to comment.