All of lore.kernel.org
 help / color / mirror / Atom feed
* [lm-sensors] Patch: libsensors: add support for ACPI bus
@ 2009-01-01 21:51 Hans de Goede
  2009-01-12 12:14 ` Jean Delvare
  2009-01-13  8:08 ` Hans de Goede
  0 siblings, 2 replies; 3+ messages in thread
From: Hans de Goede @ 2009-01-01 21:51 UTC (permalink / raw)
  To: lm-sensors

[-- Attachment #1: Type: text/plain, Size: 1165 bytes --]

Hi All,

The way the new atk0110 driver work it ends up being connected to an "ACPI" 
bus, this patch adds support for this to lm_sensors-3.0.3

With this patch the sensors output on an Asus board looks like this:

atk0110-acpi-0
Adapter: ACPI interface
Vcore Voltage:          +1.45 V  (min =  +1.45 V, max =  +1.75 V)
  +3.3 Voltage:          +3.38 V  (min =  +3.00 V, max =  +3.60 V)
  +5.0 Voltage:          +5.16 V  (min =  +4.50 V, max =  +5.50 V)
+12.0 Voltage:         +12.24 V  (min = +11.20 V, max = +13.20 V)
CPU FAN Speed:         1516 RPM  (min =    0 RPM)
CHASSIS FAN Speed:        0 RPM  (min =    0 RPM)
POWER FAN Speed:          0 RPM  (min =    0 RPM)
CHASSIS4 FAN FAN Speed:   0 RPM  (min =    0 RPM)
CHASSIS2 FAN FAN Speed:   0 RPM  (min =    0 RPM)
CHASSIS3 FAN FAN Speed:   0 RPM  (min =    0 RPM)
CPU Temperature:        +43.0°C  (high = +90.0°C, crit = +125.0°C)
MB Temperature:         +44.0°C  (high = +45.0°C, crit = +90.0°C)


Jean, can you please review this patch, if its ok I can apply it myself.

Thanks & Regards,

Hans


p.s.

Also see my related (to be written) ACPI versus native IC drivers post

[-- Attachment #2: lm_sensors-3.0.3-acpi-bus.patch --]
[-- Type: text/plain, Size: 1986 bytes --]

Index: lib/access.c
===================================================================
--- lib/access.c	(revision 5577)
+++ lib/access.c	(working copy)
@@ -349,6 +349,8 @@
 		return "SPI adapter";
 	case SENSORS_BUS_TYPE_VIRTUAL:
 		return "Virtual device";
+	case SENSORS_BUS_TYPE_ACPI:
+		return "ACPI interface";
 	}
 
 	/* bus types with several instances */
Index: lib/sensors.h
===================================================================
--- lib/sensors.h	(revision 5577)
+++ lib/sensors.h	(working copy)
@@ -42,6 +42,7 @@
 #define SENSORS_BUS_TYPE_PCI		2
 #define SENSORS_BUS_TYPE_SPI		3
 #define SENSORS_BUS_TYPE_VIRTUAL	4
+#define SENSORS_BUS_TYPE_ACPI		5
 #define SENSORS_BUS_NR_ANY		(-1)
 #define SENSORS_BUS_NR_IGNORE		(-2)
 
Index: lib/sysfs.c
===================================================================
--- lib/sysfs.c	(revision 5577)
+++ lib/sysfs.c	(working copy)
@@ -596,6 +596,11 @@
 			entry.chip.addr = 0;
 		entry.chip.bus.type = SENSORS_BUS_TYPE_ISA;
 		entry.chip.bus.nr = 0;
+	} else if (subsys && !strcmp(subsys, "acpi")) {
+		entry.chip.bus.type = SENSORS_BUS_TYPE_ACPI;
+		/* For now we assume that acpi devices are unique */
+		entry.chip.bus.nr = 0;
+		entry.chip.addr = 0;
 	} else {
 		/* Ignore unknown device */
 		err = 0;
Index: lib/data.c
===================================================================
--- lib/data.c	(revision 5577)
+++ lib/data.c	(working copy)
@@ -111,6 +111,8 @@
 		res->bus.type = SENSORS_BUS_TYPE_SPI;
 	else if (!strncmp(name, "virtual", dash - name))
 		res->bus.type = SENSORS_BUS_TYPE_VIRTUAL;
+	else if (!strncmp(name, "acpi", dash - name))
+		res->bus.type = SENSORS_BUS_TYPE_ACPI;
 	else
 		goto ERROR;
 	name = dash + 1;
@@ -174,6 +176,9 @@
 	case SENSORS_BUS_TYPE_VIRTUAL:
 		return snprintf(str, size, "%s-virtual-%x", chip->prefix,
 				chip->addr);
+	case SENSORS_BUS_TYPE_ACPI:
+		return snprintf(str, size, "%s-acpi-%x", chip->prefix,
+				chip->addr);
 	}
 
 	return -SENSORS_ERR_CHIP_NAME;

[-- Attachment #3: Type: text/plain, Size: 153 bytes --]

_______________________________________________
lm-sensors mailing list
lm-sensors@lm-sensors.org
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [lm-sensors] Patch: libsensors: add support for ACPI bus
  2009-01-01 21:51 [lm-sensors] Patch: libsensors: add support for ACPI bus Hans de Goede
@ 2009-01-12 12:14 ` Jean Delvare
  2009-01-13  8:08 ` Hans de Goede
  1 sibling, 0 replies; 3+ messages in thread
From: Jean Delvare @ 2009-01-12 12:14 UTC (permalink / raw)
  To: lm-sensors

Hi Hans,

Sorry for the late answer.

On Thu, 01 Jan 2009 22:51:56 +0100, Hans de Goede wrote:
> The way the new atk0110 driver work it ends up being connected to an "ACPI" 
> bus, this patch adds support for this to lm_sensors-3.0.3
> 
> With this patch the sensors output on an Asus board looks like this:
> 
> atk0110-acpi-0
> Adapter: ACPI interface
> Vcore Voltage:          +1.45 V  (min =  +1.45 V, max =  +1.75 V)
>   +3.3 Voltage:          +3.38 V  (min =  +3.00 V, max =  +3.60 V)
>   +5.0 Voltage:          +5.16 V  (min =  +4.50 V, max =  +5.50 V)
> +12.0 Voltage:         +12.24 V  (min = +11.20 V, max = +13.20 V)
> CPU FAN Speed:         1516 RPM  (min =    0 RPM)
> CHASSIS FAN Speed:        0 RPM  (min =    0 RPM)
> POWER FAN Speed:          0 RPM  (min =    0 RPM)
> CHASSIS4 FAN FAN Speed:   0 RPM  (min =    0 RPM)
> CHASSIS2 FAN FAN Speed:   0 RPM  (min =    0 RPM)
> CHASSIS3 FAN FAN Speed:   0 RPM  (min =    0 RPM)
> CPU Temperature:        +43.0°C  (high = +90.0°C, crit = +125.0°C)
> MB Temperature:         +44.0°C  (high = +45.0°C, crit = +90.0°C)
> 
> 
> Jean, can you please review this patch, if its ok I can apply it myself.

I have no objection, the patch looks just fine to me, just go ahead and
apply it. Please don't forget to apply the libsensors-API document.

-- 
Jean Delvare

_______________________________________________
lm-sensors mailing list
lm-sensors@lm-sensors.org
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [lm-sensors] Patch: libsensors: add support for ACPI bus
  2009-01-01 21:51 [lm-sensors] Patch: libsensors: add support for ACPI bus Hans de Goede
  2009-01-12 12:14 ` Jean Delvare
@ 2009-01-13  8:08 ` Hans de Goede
  1 sibling, 0 replies; 3+ messages in thread
From: Hans de Goede @ 2009-01-13  8:08 UTC (permalink / raw)
  To: lm-sensors



Jean Delvare wrote:
> Hi Hans,
> 
> Sorry for the late answer.
> 
> On Thu, 01 Jan 2009 22:51:56 +0100, Hans de Goede wrote:
>> The way the new atk0110 driver work it ends up being connected to an "ACPI" 
>> bus, this patch adds support for this to lm_sensors-3.0.3
>>
>> With this patch the sensors output on an Asus board looks like this:
>>
>> atk0110-acpi-0
>> Adapter: ACPI interface
>> Vcore Voltage:          +1.45 V  (min =  +1.45 V, max =  +1.75 V)
>>   +3.3 Voltage:          +3.38 V  (min =  +3.00 V, max =  +3.60 V)
>>   +5.0 Voltage:          +5.16 V  (min =  +4.50 V, max =  +5.50 V)
>> +12.0 Voltage:         +12.24 V  (min = +11.20 V, max = +13.20 V)
>> CPU FAN Speed:         1516 RPM  (min =    0 RPM)
>> CHASSIS FAN Speed:        0 RPM  (min =    0 RPM)
>> POWER FAN Speed:          0 RPM  (min =    0 RPM)
>> CHASSIS4 FAN FAN Speed:   0 RPM  (min =    0 RPM)
>> CHASSIS2 FAN FAN Speed:   0 RPM  (min =    0 RPM)
>> CHASSIS3 FAN FAN Speed:   0 RPM  (min =    0 RPM)
>> CPU Temperature:        +43.0°C  (high = +90.0°C, crit = +125.0°C)
>> MB Temperature:         +44.0°C  (high = +45.0°C, crit = +90.0°C)
>>
>>
>> Jean, can you please review this patch, if its ok I can apply it myself.
> 
> I have no objection, the patch looks just fine to me, just go ahead and
> apply it. Please don't forget to apply the libsensors-API document.
> 

Thanks for the review, API doc updated and committed.

Regards,

Hans

_______________________________________________
lm-sensors mailing list
lm-sensors@lm-sensors.org
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2009-01-13  8:08 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-01-01 21:51 [lm-sensors] Patch: libsensors: add support for ACPI bus Hans de Goede
2009-01-12 12:14 ` Jean Delvare
2009-01-13  8:08 ` Hans de Goede

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.