* [lm-sensors] [PATCH 51/82] hwmon: (pc87360) Fix multi-line comments
@ 2012-01-19 23:55 Guenter Roeck
2012-01-21 7:13 ` Jim Cromie
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: Guenter Roeck @ 2012-01-19 23:55 UTC (permalink / raw)
To: lm-sensors
Cc: Jim Cromie <jim.cromie@gmail.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
---
drivers/hwmon/pc87360.c | 73 +++++++++++++++++++++++++++++-----------------
1 files changed, 46 insertions(+), 27 deletions(-)
diff --git a/drivers/hwmon/pc87360.c b/drivers/hwmon/pc87360.c
index 51c97ca..7f95761 100644
--- a/drivers/hwmon/pc87360.c
+++ b/drivers/hwmon/pc87360.c
@@ -531,9 +531,11 @@ static struct sensor_device_attribute in_max[] = {
#define CHAN_ALM_MAX 0x04 /* max limit exceeded */
#define TEMP_ALM_CRIT 0x08 /* temp crit exceeded (temp only) */
-/* show_in_min/max_alarm() reads data from the per-channel status
- register (sec 11.5.12), not the vin event status registers (sec
- 11.5.2) that (legacy) show_in_alarm() resds (via data->in_alarms) */
+/*
+ * show_in_min/max_alarm() reads data from the per-channel status
+ * register (sec 11.5.12), not the vin event status registers (sec
+ * 11.5.2) that (legacy) show_in_alarm() resds (via data->in_alarms)
+ */
static ssize_t show_in_min_alarm(struct device *dev,
struct device_attribute *devattr, char *buf)
@@ -748,9 +750,10 @@ static ssize_t set_therm_crit(struct device *dev,
return count;
}
-/* the +11 term below reflects the fact that VLM units 11,12,13 are
- used in the chip to measure voltage across the thermistors
-*/
+/*
+ * the +11 term below reflects the fact that VLM units 11,12,13 are
+ * used in the chip to measure voltage across the thermistors
+ */
static struct sensor_device_attribute therm_input[] = {
SENSOR_ATTR(temp4_input, S_IRUGO, show_therm_input, NULL, 0 + 11),
SENSOR_ATTR(temp5_input, S_IRUGO, show_therm_input, NULL, 1 + 11),
@@ -786,8 +789,10 @@ static struct sensor_device_attribute therm_crit[] = {
show_therm_crit, set_therm_crit, 2 + 11),
};
-/* show_therm_min/max_alarm() reads data from the per-channel voltage
- status register (sec 11.5.12) */
+/*
+ * show_therm_min/max_alarm() reads data from the per-channel voltage
+ * status register (sec 11.5.12)
+ */
static ssize_t show_therm_min_alarm(struct device *dev,
struct device_attribute *devattr, char *buf)
@@ -1007,9 +1012,11 @@ static ssize_t show_temp_alarms(struct device *dev,
static DEVICE_ATTR(alarms_temp, S_IRUGO, show_temp_alarms, NULL);
-/* show_temp_min/max_alarm() reads data from the per-channel status
- register (sec 12.3.7), not the temp event status registers (sec
- 12.3.2) that show_temp_alarm() reads (via data->temp_alarms) */
+/*
+ * show_temp_min/max_alarm() reads data from the per-channel status
+ * register (sec 12.3.7), not the temp event status registers (sec
+ * 12.3.2) that show_temp_alarm() reads (via data->temp_alarms)
+ */
static ssize_t show_temp_min_alarm(struct device *dev,
struct device_attribute *devattr, char *buf)
@@ -1172,9 +1179,11 @@ static int __init pc87360_find(int sioaddr, u8 *devid,
} else if (i = 1) { /* Voltages */
/* Are we using thermistors? */
if (*devid = 0xE9) { /* PC87366 */
- /* These registers are not logical-device
- specific, just that we won't need them if
- we don't use the VLM device */
+ /*
+ * These registers are not logical-device
+ * specific, just that we won't need them if
+ * we don't use the VLM device
+ */
confreg[2] = superio_inb(sioaddr, 0x2B);
confreg[3] = superio_inb(sioaddr, 0x25);
@@ -1258,9 +1267,11 @@ static int __devinit pc87360_probe(struct platform_device *pdev)
if (data->fannr)
data->fan_conf = confreg[0] | (confreg[1] << 8);
- /* Use the correct reference voltage
- Unless both the VLM and the TMS logical devices agree to
- use an external Vref, the internal one is used. */
+ /*
+ * Use the correct reference voltage
+ * Unless both the VLM and the TMS logical devices agree to
+ * use an external Vref, the internal one is used.
+ */
if (data->innr) {
i = pc87360_read_value(data, LD_IN, NO_BANK,
PC87365_REG_IN_CONFIG);
@@ -1402,8 +1413,10 @@ static int __devexit pc87360_remove(struct platform_device *pdev)
return 0;
}
-/* ldi is the logical device index
- bank is for voltages and temperatures only */
+/*
+ * ldi is the logical device index
+ * bank is for voltages and temperatures only
+ */
static int pc87360_read_value(struct pc87360_data *data, u8 ldi, u8 bank,
u8 reg)
{
@@ -1474,8 +1487,10 @@ static void pc87360_init_device(struct platform_device *pdev,
}
}
- /* We can't blindly trust the Super-I/O space configuration bit,
- most BIOS won't set it properly */
+ /*
+ * We can't blindly trust the Super-I/O space configuration bit,
+ * most BIOS won't set it properly
+ */
dev_dbg(&pdev->dev, "bios thermistors:%d\n", use_thermistors);
for (i = 11; i < data->innr; i++) {
reg = pc87360_read_value(data, LD_IN, i,
@@ -1506,8 +1521,10 @@ static void pc87360_init_device(struct platform_device *pdev,
if (use_thermistors) {
for (i = 11; i < data->innr; i++) {
if (init >= init_in[i]) {
- /* The pin may already be used by thermal
- diodes */
+ /*
+ * The pin may already be used by thermal
+ * diodes
+ */
reg = pc87360_read_value(data, LD_TEMP,
(i - 11) / 2, PC87365_REG_TEMP_STATUS);
if (reg & CHAN_ENA) {
@@ -1560,10 +1577,12 @@ static void pc87360_init_device(struct platform_device *pdev,
if (init >= 2) {
/* Chip config as documented by National Semi. */
pc87360_write_value(data, LD_TEMP, 0xF, 0xA, 0x08);
- /* We voluntarily omit the bank here, in case the
- sequence itself matters. It shouldn't be a problem,
- since nobody else is supposed to access the
- device at that point. */
+ /*
+ * We voluntarily omit the bank here, in case the
+ * sequence itself matters. It shouldn't be a problem,
+ * since nobody else is supposed to access the
+ * device at that point.
+ */
pc87360_write_value(data, LD_TEMP, NO_BANK, 0xB, 0x04);
pc87360_write_value(data, LD_TEMP, NO_BANK, 0xC, 0x35);
pc87360_write_value(data, LD_TEMP, NO_BANK, 0xD, 0x05);
--
1.7.5.4
_______________________________________________
lm-sensors mailing list
lm-sensors@lm-sensors.org
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
^ permalink raw reply related [flat|nested] 5+ messages in thread* Re: [lm-sensors] [PATCH 51/82] hwmon: (pc87360) Fix multi-line comments
2012-01-19 23:55 [lm-sensors] [PATCH 51/82] hwmon: (pc87360) Fix multi-line comments Guenter Roeck
@ 2012-01-21 7:13 ` Jim Cromie
2012-01-21 7:17 ` Jean Delvare
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: Jim Cromie @ 2012-01-21 7:13 UTC (permalink / raw)
To: lm-sensors
are these checkpatch warnings ?
ackd-by: Jim Cromie <jim.cromie@gmail.com>
On Thu, Jan 19, 2012 at 4:55 PM, Guenter Roeck <linux@roeck-us.net> wrote:
> Cc: Jim Cromie <jim.cromie@gmail.com>
> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
> ---
> drivers/hwmon/pc87360.c | 73 +++++++++++++++++++++++++++++-----------------
> 1 files changed, 46 insertions(+), 27 deletions(-)
>
> diff --git a/drivers/hwmon/pc87360.c b/drivers/hwmon/pc87360.c
> index 51c97ca..7f95761 100644
> --- a/drivers/hwmon/pc87360.c
> +++ b/drivers/hwmon/pc87360.c
> @@ -531,9 +531,11 @@ static struct sensor_device_attribute in_max[] = {
> #define CHAN_ALM_MAX 0x04 /* max limit exceeded */
> #define TEMP_ALM_CRIT 0x08 /* temp crit exceeded (temp only) */
>
> -/* show_in_min/max_alarm() reads data from the per-channel status
> - register (sec 11.5.12), not the vin event status registers (sec
> - 11.5.2) that (legacy) show_in_alarm() resds (via data->in_alarms) */
> +/*
> + * show_in_min/max_alarm() reads data from the per-channel status
> + * register (sec 11.5.12), not the vin event status registers (sec
> + * 11.5.2) that (legacy) show_in_alarm() resds (via data->in_alarms)
> + */
>
> static ssize_t show_in_min_alarm(struct device *dev,
> struct device_attribute *devattr, char *buf)
> @@ -748,9 +750,10 @@ static ssize_t set_therm_crit(struct device *dev,
> return count;
> }
>
> -/* the +11 term below reflects the fact that VLM units 11,12,13 are
> - used in the chip to measure voltage across the thermistors
> -*/
> +/*
> + * the +11 term below reflects the fact that VLM units 11,12,13 are
> + * used in the chip to measure voltage across the thermistors
> + */
> static struct sensor_device_attribute therm_input[] = {
> SENSOR_ATTR(temp4_input, S_IRUGO, show_therm_input, NULL, 0 + 11),
> SENSOR_ATTR(temp5_input, S_IRUGO, show_therm_input, NULL, 1 + 11),
> @@ -786,8 +789,10 @@ static struct sensor_device_attribute therm_crit[] = {
> show_therm_crit, set_therm_crit, 2 + 11),
> };
>
> -/* show_therm_min/max_alarm() reads data from the per-channel voltage
> - status register (sec 11.5.12) */
> +/*
> + * show_therm_min/max_alarm() reads data from the per-channel voltage
> + * status register (sec 11.5.12)
> + */
>
> static ssize_t show_therm_min_alarm(struct device *dev,
> struct device_attribute *devattr, char *buf)
> @@ -1007,9 +1012,11 @@ static ssize_t show_temp_alarms(struct device *dev,
>
> static DEVICE_ATTR(alarms_temp, S_IRUGO, show_temp_alarms, NULL);
>
> -/* show_temp_min/max_alarm() reads data from the per-channel status
> - register (sec 12.3.7), not the temp event status registers (sec
> - 12.3.2) that show_temp_alarm() reads (via data->temp_alarms) */
> +/*
> + * show_temp_min/max_alarm() reads data from the per-channel status
> + * register (sec 12.3.7), not the temp event status registers (sec
> + * 12.3.2) that show_temp_alarm() reads (via data->temp_alarms)
> + */
>
> static ssize_t show_temp_min_alarm(struct device *dev,
> struct device_attribute *devattr, char *buf)
> @@ -1172,9 +1179,11 @@ static int __init pc87360_find(int sioaddr, u8 *devid,
> } else if (i == 1) { /* Voltages */
> /* Are we using thermistors? */
> if (*devid == 0xE9) { /* PC87366 */
> - /* These registers are not logical-device
> - specific, just that we won't need them if
> - we don't use the VLM device */
> + /*
> + * These registers are not logical-device
> + * specific, just that we won't need them if
> + * we don't use the VLM device
> + */
> confreg[2] = superio_inb(sioaddr, 0x2B);
> confreg[3] = superio_inb(sioaddr, 0x25);
>
> @@ -1258,9 +1267,11 @@ static int __devinit pc87360_probe(struct platform_device *pdev)
> if (data->fannr)
> data->fan_conf = confreg[0] | (confreg[1] << 8);
>
> - /* Use the correct reference voltage
> - Unless both the VLM and the TMS logical devices agree to
> - use an external Vref, the internal one is used. */
> + /*
> + * Use the correct reference voltage
> + * Unless both the VLM and the TMS logical devices agree to
> + * use an external Vref, the internal one is used.
> + */
> if (data->innr) {
> i = pc87360_read_value(data, LD_IN, NO_BANK,
> PC87365_REG_IN_CONFIG);
> @@ -1402,8 +1413,10 @@ static int __devexit pc87360_remove(struct platform_device *pdev)
> return 0;
> }
>
> -/* ldi is the logical device index
> - bank is for voltages and temperatures only */
> +/*
> + * ldi is the logical device index
> + * bank is for voltages and temperatures only
> + */
> static int pc87360_read_value(struct pc87360_data *data, u8 ldi, u8 bank,
> u8 reg)
> {
> @@ -1474,8 +1487,10 @@ static void pc87360_init_device(struct platform_device *pdev,
> }
> }
>
> - /* We can't blindly trust the Super-I/O space configuration bit,
> - most BIOS won't set it properly */
> + /*
> + * We can't blindly trust the Super-I/O space configuration bit,
> + * most BIOS won't set it properly
> + */
> dev_dbg(&pdev->dev, "bios thermistors:%d\n", use_thermistors);
> for (i = 11; i < data->innr; i++) {
> reg = pc87360_read_value(data, LD_IN, i,
> @@ -1506,8 +1521,10 @@ static void pc87360_init_device(struct platform_device *pdev,
> if (use_thermistors) {
> for (i = 11; i < data->innr; i++) {
> if (init >= init_in[i]) {
> - /* The pin may already be used by thermal
> - diodes */
> + /*
> + * The pin may already be used by thermal
> + * diodes
> + */
> reg = pc87360_read_value(data, LD_TEMP,
> (i - 11) / 2, PC87365_REG_TEMP_STATUS);
> if (reg & CHAN_ENA) {
> @@ -1560,10 +1577,12 @@ static void pc87360_init_device(struct platform_device *pdev,
> if (init >= 2) {
> /* Chip config as documented by National Semi. */
> pc87360_write_value(data, LD_TEMP, 0xF, 0xA, 0x08);
> - /* We voluntarily omit the bank here, in case the
> - sequence itself matters. It shouldn't be a problem,
> - since nobody else is supposed to access the
> - device at that point. */
> + /*
> + * We voluntarily omit the bank here, in case the
> + * sequence itself matters. It shouldn't be a problem,
> + * since nobody else is supposed to access the
> + * device at that point.
> + */
> pc87360_write_value(data, LD_TEMP, NO_BANK, 0xB, 0x04);
> pc87360_write_value(data, LD_TEMP, NO_BANK, 0xC, 0x35);
> pc87360_write_value(data, LD_TEMP, NO_BANK, 0xD, 0x05);
> --
> 1.7.5.4
>
_______________________________________________
lm-sensors mailing list
lm-sensors@lm-sensors.org
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: [lm-sensors] [PATCH 51/82] hwmon: (pc87360) Fix multi-line comments
2012-01-19 23:55 [lm-sensors] [PATCH 51/82] hwmon: (pc87360) Fix multi-line comments Guenter Roeck
2012-01-21 7:13 ` Jim Cromie
@ 2012-01-21 7:17 ` Jean Delvare
2012-01-21 17:20 ` Guenter Roeck
2012-01-23 6:06 ` Jim Cromie
3 siblings, 0 replies; 5+ messages in thread
From: Jean Delvare @ 2012-01-21 7:17 UTC (permalink / raw)
To: lm-sensors
On Sat, 21 Jan 2012 00:13:34 -0700, Jim Cromie wrote:
> are these checkpatch warnings ?
Not directly, but non-standard comment style can cause false positives
in checkpatch.
--
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] 5+ messages in thread
* Re: [lm-sensors] [PATCH 51/82] hwmon: (pc87360) Fix multi-line comments
2012-01-19 23:55 [lm-sensors] [PATCH 51/82] hwmon: (pc87360) Fix multi-line comments Guenter Roeck
2012-01-21 7:13 ` Jim Cromie
2012-01-21 7:17 ` Jean Delvare
@ 2012-01-21 17:20 ` Guenter Roeck
2012-01-23 6:06 ` Jim Cromie
3 siblings, 0 replies; 5+ messages in thread
From: Guenter Roeck @ 2012-01-21 17:20 UTC (permalink / raw)
To: lm-sensors
On Sat, Jan 21, 2012 at 02:17:23AM -0500, Jean Delvare wrote:
> On Sat, 21 Jan 2012 00:13:34 -0700, Jim Cromie wrote:
> > are these checkpatch warnings ?
>
> Not directly, but non-standard comment style can cause false positives
> in checkpatch.
>
Exactly. Also, it was straightforward to write a little program to do it
automatically, so it was not much effort.
Any comments on http://thread.gmane.org/gmane.linux.drivers.sensors/28266/focus(286 ?
Thanks,
Guenter
_______________________________________________
lm-sensors mailing list
lm-sensors@lm-sensors.org
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [lm-sensors] [PATCH 51/82] hwmon: (pc87360) Fix multi-line comments
2012-01-19 23:55 [lm-sensors] [PATCH 51/82] hwmon: (pc87360) Fix multi-line comments Guenter Roeck
` (2 preceding siblings ...)
2012-01-21 17:20 ` Guenter Roeck
@ 2012-01-23 6:06 ` Jim Cromie
3 siblings, 0 replies; 5+ messages in thread
From: Jim Cromie @ 2012-01-23 6:06 UTC (permalink / raw)
To: lm-sensors
On Sat, Jan 21, 2012 at 10:20 AM, Guenter Roeck
<guenter.roeck@ericsson.com> wrote:
> On Sat, Jan 21, 2012 at 02:17:23AM -0500, Jean Delvare wrote:
>> On Sat, 21 Jan 2012 00:13:34 -0700, Jim Cromie wrote:
>> > are these checkpatch warnings ?
>>
>> Not directly, but non-standard comment style can cause false positives
>> in checkpatch.
>>
> Exactly. Also, it was straightforward to write a little program to do it
> automatically, so it was not much effort.
>
> Any comments on http://thread.gmane.org/gmane.linux.drivers.sensors/28266/focus(286 ?
Ive just built and modprobed it on voyage linux ( a debian derivative )
Given that this patch is just cleanup, thats good for an
acked-by: Jim Cromie <jim.cromie@gmail.com>
Im a little puzzled though - I have no sensors or sensors-detect on voyage,
and its apparently not available via dselect / aptitude.
So I pulled lm-sensors-3.3.1 and built it on laptop, copied it over to
the soekris.
sensors-detect wont work, I cant install the dependencies -
not enough memory there to do apt-get install.
sensors works though, and seems to have all the info.
pc87366-isa-6620
Adapter: ISA adapter
in0: +3.01 V (min = +0.00 V, max = +3.01 V)
in1: +2.00 V (min = +0.00 V, max = +3.01 V)
in2: +2.49 V (min = +0.00 V, max = +3.01 V)
in3: +0.60 V (min = +0.00 V, max = +3.01 V)
in4: +2.46 V (min = +0.00 V, max = +3.01 V)
in5: +2.49 V (min = +0.00 V, max = +3.01 V)
in6: +0.00 V (min = +0.00 V, max = +3.01 V)
3VSB: +3.31 V (min = +0.00 V, max = +6.03 V)
VDD: +3.05 V (min = +0.00 V, max = +6.03 V)
Vbat: +0.00 V (min = +0.00 V, max = +0.00 V)
AVDD: +3.28 V (min = +0.00 V, max = +6.03 V)
temp1: FAULT (low = -55.0 C, high = +127.0 C) ALARM (HIGH, CRIT)
(crit = +127.0 C)
temp2: FAULT (low = -55.0 C, high = +127.0 C) ALARM (HIGH, CRIT)
(crit = +127.0 C)
SIO Temp: +91.0 C (low = -55.0 C, high = +127.0 C)
(crit = +127.0 C)
temp4: +0.0 C (low = +0.0 C, high = +0.0 C)
(crit = +0.0 C)
temp5: +0.0 C (low = +0.0 C, high = +0.0 C)
(crit = +0.0 C)
temp6: +0.0 C (low = +0.0 C, high = +0.0 C)
(crit = +0.0 C)
cpu0_vid: +0.000 V
I'll have to go digging for a customized sensors3.conf to know better.
FTR, and so Ive written it down, to check (compare against) your last
cleanup patch:
root@voyage:/sys/class/hwmon/hwmon0/device# ls | wc
128 128 1472
root@voyage:/sys/class/hwmon/hwmon0/device# ls temp* | wc
51 51 666
root@voyage:/sys/class/hwmon/hwmon0/device# ls temp1* |wc
9 9 117
root@voyage:/sys/class/hwmon/hwmon0/device# ls temp6* |wc
8 8 105
root@voyage:/sys/class/hwmon/hwmon0/device# ls in* | wc
66 66 721
root@voyage:/sys/class/hwmon/hwmon0/device# ls in1* | wc
12 12 136
root@voyage:/sys/class/hwmon/hwmon0/device# ls in10* | wc
6 6 71
I'll build all 3 patches together, and report back soon.
_______________________________________________
lm-sensors mailing list
lm-sensors@lm-sensors.org
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2012-01-23 6:06 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-01-19 23:55 [lm-sensors] [PATCH 51/82] hwmon: (pc87360) Fix multi-line comments Guenter Roeck
2012-01-21 7:13 ` Jim Cromie
2012-01-21 7:17 ` Jean Delvare
2012-01-21 17:20 ` Guenter Roeck
2012-01-23 6:06 ` Jim Cromie
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.