Skip to content

Commit

Permalink
Merge branch 'release' of git://lm-sensors.org/kernel/mhoffman/hwmon-2.6
Browse files Browse the repository at this point in the history
* 'release' of git://lm-sensors.org/kernel/mhoffman/hwmon-2.6:
  hwmon: (i5k_amb) Convert macros to C functions
  hwmon: (w83781d) Add missing curly braces
  hwmon: (abituguru3) Identify ABit IP35 Pro as such
  hwmon: (f75375s) pwmX_mode sysfs files writable for f75375 variant
  hwmon: (f75375s) On n2100 systems, set fans to full speed on boot
  hwmon: (f75375s) Allow setting up fans with platform_data
  hwmon: (f75375s) Add new style bindings
  hwmon: (lm70) Convert semaphore to mutex
  hwmon: (applesmc) Add support for Mac Pro 2 x Quad-Core
  hwmon: (abituguru3) Add support for 2 new motherboards
  hwmon: (ibmpex) Change printk to dev_{info,err} macros
  hwmon: (i5k_amb) New memory temperature sensor driver
  hwmon: (f75375s) fix pwm mode setting
  hwmon: (ibmpex.c) fix NULL dereference
  hwmon: (sis5595) Split sis5595_attributes_opt
  hwmon: (sis5595) Add individual alarm files
  hwmon: (w83627hf) push nr+1 offset into *_REG_FAN macros and simplify
  hwmon: (w83627hf) hoist nr-1 offset out of show-store-temp-X
  hwmon: Add power meter spec to Documentation/hwmon/sysfs-interface
  • Loading branch information
Linus Torvalds committed Nov 13, 2007
2 parents 31083eb + 59a030a commit 9418d5d
Show file tree
Hide file tree
Showing 15 changed files with 1,049 additions and 189 deletions.
31 changes: 31 additions & 0 deletions Documentation/hwmon/sysfs-interface
Original file line number Diff line number Diff line change
Expand Up @@ -328,6 +328,37 @@ curr[1-*]_input Current input value
Unit: milliampere
RO

*********
* Power *
*********

power[1-*]_average Average power use
Unit: microWatt
RO

power[1-*]_average_highest Historical average maximum power use
Unit: microWatt
RO

power[1-*]_average_lowest Historical average minimum power use
Unit: microWatt
RO

power[1-*]_input Instantaneous power use
Unit: microWatt
RO

power[1-*]_input_highest Historical maximum power use
Unit: microWatt
RO

power[1-*]_input_lowest Historical minimum power use
Unit: microWatt
RO

power[1-*]_reset_history Reset input_highest, input_lowest,
average_highest and average_lowest.
WO

**********
* Alarms *
Expand Down
11 changes: 11 additions & 0 deletions arch/arm/mach-iop32x/n2100.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@

#include <linux/mm.h>
#include <linux/init.h>
#include <linux/f75375s.h>
#include <linux/delay.h>
#include <linux/kernel.h>
#include <linux/pci.h>
Expand Down Expand Up @@ -200,11 +201,21 @@ static struct platform_device n2100_serial_device = {
.resource = &n2100_uart_resource,
};

static struct f75375s_platform_data n2100_f75375s = {
.pwm = { 255, 255 },
.pwm_enable = { 0, 0 },
};

static struct i2c_board_info __initdata n2100_i2c_devices[] = {
{
I2C_BOARD_INFO("rtc-rs5c372", 0x32),
.type = "rs5c372b",
},
{
I2C_BOARD_INFO("f75375", 0x2e),
.type = "f75375",
.platform_data = &n2100_f75375s,
},
};

/*
Expand Down
10 changes: 10 additions & 0 deletions drivers/hwmon/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,16 @@ config SENSORS_DS1621
This driver can also be built as a module. If so, the module
will be called ds1621.

config SENSORS_I5K_AMB
tristate "FB-DIMM AMB temperature sensor on Intel 5000 series chipsets"
depends on PCI && EXPERIMENTAL
help
If you say yes here you get support for FB-DIMM AMB temperature
monitoring chips on systems with the Intel 5000 series chipset.

This driver can also be built as a module. If so, the module
will be called i5k_amb.

config SENSORS_F71805F
tristate "Fintek F71805F/FG, F71806F/FG and F71872F/FG"
depends on EXPERIMENTAL
Expand Down
1 change: 1 addition & 0 deletions drivers/hwmon/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ obj-$(CONFIG_SENSORS_FSCPOS) += fscpos.o
obj-$(CONFIG_SENSORS_GL518SM) += gl518sm.o
obj-$(CONFIG_SENSORS_GL520SM) += gl520sm.o
obj-$(CONFIG_SENSORS_HDAPS) += hdaps.o
obj-$(CONFIG_SENSORS_I5K_AMB) += i5k_amb.o
obj-$(CONFIG_SENSORS_IBMPEX) += ibmpex.o
obj-$(CONFIG_SENSORS_IT87) += it87.o
obj-$(CONFIG_SENSORS_K8TEMP) += k8temp.o
Expand Down
56 changes: 55 additions & 1 deletion drivers/hwmon/abituguru3.c
Original file line number Diff line number Diff line change
Expand Up @@ -503,7 +503,7 @@ static const struct abituguru3_motherboard_info abituguru3_motherboards[] = {
{ "AUX3 FAN", 36, 2, 60, 1, 0 },
{ NULL, 0, 0, 0, 0, 0 } }
},
{ 0x001A, "unknown", {
{ 0x001A, "Abit IP35 Pro", {
{ "CPU Core", 0, 0, 10, 1, 0 },
{ "DDR2", 1, 0, 20, 1, 0 },
{ "DDR2 VTT", 2, 0, 10, 1, 0 },
Expand All @@ -530,6 +530,60 @@ static const struct abituguru3_motherboard_info abituguru3_motherboards[] = {
{ "AUX3 Fan", 36, 2, 60, 1, 0 },
{ NULL, 0, 0, 0, 0, 0 } }
},
{ 0x001B, "unknown", {
{ "CPU Core", 0, 0, 10, 1, 0 },
{ "DDR3", 1, 0, 20, 1, 0 },
{ "DDR3 VTT", 2, 0, 10, 1, 0 },
{ "CPU VTT", 3, 0, 10, 1, 0 },
{ "MCH 1.25V", 4, 0, 10, 1, 0 },
{ "ICHIO 1.5V", 5, 0, 10, 1, 0 },
{ "ICH 1.05V", 6, 0, 10, 1, 0 },
{ "ATX +12V (24-Pin)", 7, 0, 60, 1, 0 },
{ "ATX +12V (8-pin)", 8, 0, 60, 1, 0 },
{ "ATX +5V", 9, 0, 30, 1, 0 },
{ "+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 Phase1", 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 },
{ "PWM Phase5", 30, 1, 1, 1, 0 },
{ "CPU Fan", 32, 2, 60, 1, 0 },
{ "SYS Fan", 34, 2, 60, 1, 0 },
{ "AUX1 Fan", 33, 2, 60, 1, 0 },
{ "AUX2 Fan", 35, 2, 60, 1, 0 },
{ "AUX3 Fan", 36, 2, 60, 1, 0 },
{ NULL, 0, 0, 0, 0, 0 } }
},
{ 0x001C, "unknown", {
{ "CPU Core", 0, 0, 10, 1, 0 },
{ "DDR2", 1, 0, 20, 1, 0 },
{ "DDR2 VTT", 2, 0, 10, 1, 0 },
{ "CPU VTT", 3, 0, 10, 1, 0 },
{ "MCH 1.25V", 4, 0, 10, 1, 0 },
{ "ICHIO 1.5V", 5, 0, 10, 1, 0 },
{ "ICH 1.05V", 6, 0, 10, 1, 0 },
{ "ATX +12V (24-Pin)", 7, 0, 60, 1, 0 },
{ "ATX +12V (8-pin)", 8, 0, 60, 1, 0 },
{ "ATX +5V", 9, 0, 30, 1, 0 },
{ "+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 Phase1", 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 },
{ "PWM Phase5", 30, 1, 1, 1, 0 },
{ "CPU Fan", 32, 2, 60, 1, 0 },
{ "SYS Fan", 34, 2, 60, 1, 0 },
{ "AUX1 Fan", 33, 2, 60, 1, 0 },
{ "AUX2 Fan", 35, 2, 60, 1, 0 },
{ "AUX3 Fan", 36, 2, 60, 1, 0 },
{ NULL, 0, 0, 0, 0, 0 } }
},
{ 0x0000, NULL, { { NULL, 0, 0, 0, 0, 0 } } }
};

Expand Down
107 changes: 101 additions & 6 deletions drivers/hwmon/applesmc.c
Original file line number Diff line number Diff line change
Expand Up @@ -80,15 +80,21 @@
/*
* Temperature sensors keys (sp78 - 2 bytes).
*/
static const char* temperature_sensors_sets[][13] = {
static const char* temperature_sensors_sets[][36] = {
/* Set 0: Macbook Pro */
{ "TA0P", "TB0T", "TC0D", "TC0P", "TG0H", "TG0P", "TG0T", "Th0H",
"Th1H", "Tm0P", "Ts0P", "Ts1P", NULL },
/* Set 1: Macbook set */
{ "TB0T", "TC0D", "TC0P", "TM0P", "TN0P", "TN1P", "Th0H", "Th0S",
"Th1H", "Ts0P", NULL },
/* Set 2: Macmini set */
{ "TC0D", "TC0P", NULL }
{ "TC0D", "TC0P", NULL },
/* Set 3: Mac Pro (2 x Quad-Core) */
{ "TA0P", "TCAG", "TCAH", "TCBG", "TCBH", "TC0C", "TC0D", "TC0P",
"TC1C", "TC1D", "TC2C", "TC2D", "TC3C", "TC3D", "THTG", "TH0P",
"TH1P", "TH2P", "TH3P", "TMAP", "TMAS", "TMBS", "TM0P", "TM0S",
"TM1P", "TM1S", "TM2P", "TM2S", "TM3S", "TM8P", "TM8S", "TM9P",
"TM9S", "TN0H", "TS0C", NULL },
};

/* List of keys used to read/write fan speeds */
Expand Down Expand Up @@ -990,14 +996,18 @@ static struct attribute *fan##offset##_attributes[] = { \

/*
* Create the needed functions for each fan using the macro defined above
* (2 fans are supported)
* (4 fans are supported)
*/
sysfs_fan_speeds_offset(1);
sysfs_fan_speeds_offset(2);
sysfs_fan_speeds_offset(3);
sysfs_fan_speeds_offset(4);

static const struct attribute_group fan_attribute_groups[] = {
{ .attrs = fan1_attributes },
{ .attrs = fan2_attributes }
{ .attrs = fan2_attributes },
{ .attrs = fan3_attributes },
{ .attrs = fan4_attributes },
};

/*
Expand Down Expand Up @@ -1027,6 +1037,52 @@ static SENSOR_DEVICE_ATTR(temp11_input, S_IRUGO,
applesmc_show_temperature, NULL, 10);
static SENSOR_DEVICE_ATTR(temp12_input, S_IRUGO,
applesmc_show_temperature, NULL, 11);
static SENSOR_DEVICE_ATTR(temp13_input, S_IRUGO,
applesmc_show_temperature, NULL, 12);
static SENSOR_DEVICE_ATTR(temp14_input, S_IRUGO,
applesmc_show_temperature, NULL, 13);
static SENSOR_DEVICE_ATTR(temp15_input, S_IRUGO,
applesmc_show_temperature, NULL, 14);
static SENSOR_DEVICE_ATTR(temp16_input, S_IRUGO,
applesmc_show_temperature, NULL, 15);
static SENSOR_DEVICE_ATTR(temp17_input, S_IRUGO,
applesmc_show_temperature, NULL, 16);
static SENSOR_DEVICE_ATTR(temp18_input, S_IRUGO,
applesmc_show_temperature, NULL, 17);
static SENSOR_DEVICE_ATTR(temp19_input, S_IRUGO,
applesmc_show_temperature, NULL, 18);
static SENSOR_DEVICE_ATTR(temp20_input, S_IRUGO,
applesmc_show_temperature, NULL, 19);
static SENSOR_DEVICE_ATTR(temp21_input, S_IRUGO,
applesmc_show_temperature, NULL, 20);
static SENSOR_DEVICE_ATTR(temp22_input, S_IRUGO,
applesmc_show_temperature, NULL, 21);
static SENSOR_DEVICE_ATTR(temp23_input, S_IRUGO,
applesmc_show_temperature, NULL, 22);
static SENSOR_DEVICE_ATTR(temp24_input, S_IRUGO,
applesmc_show_temperature, NULL, 23);
static SENSOR_DEVICE_ATTR(temp25_input, S_IRUGO,
applesmc_show_temperature, NULL, 24);
static SENSOR_DEVICE_ATTR(temp26_input, S_IRUGO,
applesmc_show_temperature, NULL, 25);
static SENSOR_DEVICE_ATTR(temp27_input, S_IRUGO,
applesmc_show_temperature, NULL, 26);
static SENSOR_DEVICE_ATTR(temp28_input, S_IRUGO,
applesmc_show_temperature, NULL, 27);
static SENSOR_DEVICE_ATTR(temp29_input, S_IRUGO,
applesmc_show_temperature, NULL, 28);
static SENSOR_DEVICE_ATTR(temp30_input, S_IRUGO,
applesmc_show_temperature, NULL, 29);
static SENSOR_DEVICE_ATTR(temp31_input, S_IRUGO,
applesmc_show_temperature, NULL, 30);
static SENSOR_DEVICE_ATTR(temp32_input, S_IRUGO,
applesmc_show_temperature, NULL, 31);
static SENSOR_DEVICE_ATTR(temp33_input, S_IRUGO,
applesmc_show_temperature, NULL, 32);
static SENSOR_DEVICE_ATTR(temp34_input, S_IRUGO,
applesmc_show_temperature, NULL, 33);
static SENSOR_DEVICE_ATTR(temp35_input, S_IRUGO,
applesmc_show_temperature, NULL, 34);

static struct attribute *temperature_attributes[] = {
&sensor_dev_attr_temp1_input.dev_attr.attr,
Expand All @@ -1041,6 +1097,29 @@ static struct attribute *temperature_attributes[] = {
&sensor_dev_attr_temp10_input.dev_attr.attr,
&sensor_dev_attr_temp11_input.dev_attr.attr,
&sensor_dev_attr_temp12_input.dev_attr.attr,
&sensor_dev_attr_temp13_input.dev_attr.attr,
&sensor_dev_attr_temp14_input.dev_attr.attr,
&sensor_dev_attr_temp15_input.dev_attr.attr,
&sensor_dev_attr_temp16_input.dev_attr.attr,
&sensor_dev_attr_temp17_input.dev_attr.attr,
&sensor_dev_attr_temp18_input.dev_attr.attr,
&sensor_dev_attr_temp19_input.dev_attr.attr,
&sensor_dev_attr_temp20_input.dev_attr.attr,
&sensor_dev_attr_temp21_input.dev_attr.attr,
&sensor_dev_attr_temp22_input.dev_attr.attr,
&sensor_dev_attr_temp23_input.dev_attr.attr,
&sensor_dev_attr_temp24_input.dev_attr.attr,
&sensor_dev_attr_temp25_input.dev_attr.attr,
&sensor_dev_attr_temp26_input.dev_attr.attr,
&sensor_dev_attr_temp27_input.dev_attr.attr,
&sensor_dev_attr_temp28_input.dev_attr.attr,
&sensor_dev_attr_temp29_input.dev_attr.attr,
&sensor_dev_attr_temp30_input.dev_attr.attr,
&sensor_dev_attr_temp31_input.dev_attr.attr,
&sensor_dev_attr_temp32_input.dev_attr.attr,
&sensor_dev_attr_temp33_input.dev_attr.attr,
&sensor_dev_attr_temp34_input.dev_attr.attr,
&sensor_dev_attr_temp35_input.dev_attr.attr,
NULL
};

Expand Down Expand Up @@ -1137,6 +1216,8 @@ static __initdata struct dmi_match_data applesmc_dmi_data[] = {
{ .accelerometer = 1, .light = 0, .temperature_set = 1 },
/* MacMini: temperature set 2 */
{ .accelerometer = 0, .light = 0, .temperature_set = 2 },
/* MacPro: temperature set 3 */
{ .accelerometer = 0, .light = 0, .temperature_set = 3 },
};

/* Note that DMI_MATCH(...,"MacBook") will match "MacBookPro1,1".
Expand All @@ -1154,6 +1235,10 @@ static __initdata struct dmi_system_id applesmc_whitelist[] = {
DMI_MATCH(DMI_BOARD_VENDOR,"Apple"),
DMI_MATCH(DMI_PRODUCT_NAME,"Macmini") },
(void*)&applesmc_dmi_data[2]},
{ applesmc_dmi_match, "Apple MacPro2", {
DMI_MATCH(DMI_BOARD_VENDOR,"Apple"),
DMI_MATCH(DMI_PRODUCT_NAME,"MacPro2") },
(void*)&applesmc_dmi_data[3]},
{ .ident = NULL }
};

Expand Down Expand Up @@ -1204,9 +1289,19 @@ static int __init applesmc_init(void)

switch (count) {
default:
printk(KERN_WARNING "applesmc: More than 2 fans found,"
" but at most 2 fans are supported"
printk(KERN_WARNING "applesmc: More than 4 fans found,"
" but at most 4 fans are supported"
" by the driver.\n");
case 4:
ret = sysfs_create_group(&pdev->dev.kobj,
&fan_attribute_groups[3]);
if (ret)
goto out_key_enumeration;
case 3:
ret = sysfs_create_group(&pdev->dev.kobj,
&fan_attribute_groups[2]);
if (ret)
goto out_key_enumeration;
case 2:
ret = sysfs_create_group(&pdev->dev.kobj,
&fan_attribute_groups[1]);
Expand Down
Loading

0 comments on commit 9418d5d

Please sign in to comment.