All of lore.kernel.org
 help / color / mirror / Atom feed
* [lm-sensors] [Patch] hwmon: (max6639) Set Pulse per revolution loop for both channels
@ 2012-02-12  3:00 Chris
  2012-02-12  9:30 ` Jean Delvare
                   ` (20 more replies)
  0 siblings, 21 replies; 22+ messages in thread
From: Chris @ 2012-02-12  3:00 UTC (permalink / raw)
  To: lm-sensors

Moved Fan Pulse per revolution into a loop so that both channel 1 and
channel 2 get set, instead of just channel 1


Signed-off-by: Chris D Schimp <silverchris@gmail.com>

---
diff -uprN -X vanilla/linux-3.2.5/Documentation/dontdiff
vanilla/linux-3.2.5/drivers/hwmon/max6639.c
devel/linux-3.2.5/drivers/hwmon/max6639.c
--- vanilla/linux-3.2.5/drivers/hwmon/max6639.c	2012-02-06
12:47:00.000000000 -0500
+++ devel/linux-3.2.5/drivers/hwmon/max6639.c	2012-02-11
21:40:02.399127171 -0500
@@ -439,25 +439,24 @@ static int max6639_init_client(struct i2
 	if (err)
 		goto exit;

-	/* Fans pulse per revolution is 2 by default */
-	if (max6639_info && max6639_info->ppr > 0 &&
-			max6639_info->ppr < 5)
-		data->ppr = max6639_info->ppr;
-	else
-		data->ppr = 2;
-	data->ppr -= 1;
-	err = i2c_smbus_write_byte_data(client,
-			MAX6639_REG_FAN_PPR(i),
-			data->ppr << 5);
-	if (err)
-		goto exit;
-
 	if (max6639_info)
 		rpm_range = rpm_range_to_reg(max6639_info->rpm_range);
 	data->rpm_range = rpm_range;

 	for (i = 0; i < 2; i++) {

+		/* Fans pulse per revolution is 2 by default */
+		if (max6639_info && max6639_info->ppr > 0 &&
+				max6639_info->ppr < 5)
+			data->ppr = max6639_info->ppr;
+		else
+			data->ppr = 2;
+		data->ppr -= 1;
+		err = i2c_smbus_write_byte_data(client,
+			MAX6639_REG_FAN_PPR(i),
+			data->ppr << 5);
+		if (err)
+			goto exit;
 		/* Fans config PWM, RPM */
 		err = i2c_smbus_write_byte_data(client,
 			MAX6639_REG_FAN_CONFIG1(i),

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

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

end of thread, other threads:[~2012-02-21  8:41 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-02-12  3:00 [lm-sensors] [Patch] hwmon: (max6639) Set Pulse per revolution loop for both channels Chris
2012-02-12  9:30 ` Jean Delvare
2012-02-13  5:53 ` Chris
2012-02-13  5:56 ` Chris
2012-02-16 21:18 ` Jean Delvare
2012-02-16 21:29 ` Jean Delvare
2012-02-20 17:39 ` Guenter Roeck
2012-02-20 18:58 ` Roland Stigge
2012-02-20 21:58 ` Chris
2012-02-20 21:59 ` Chris
2012-02-20 22:14 ` Chris
2012-02-20 22:28 ` Guenter Roeck
2012-02-20 22:31 ` Guenter Roeck
2012-02-20 22:44 ` Chris
2012-02-20 22:53 ` Roland Stigge
2012-02-20 22:56 ` Roland Stigge
2012-02-20 23:06 ` Roland Stigge
2012-02-20 23:53 ` Guenter Roeck
2012-02-20 23:57 ` Guenter Roeck
2012-02-20 23:58 ` Guenter Roeck
2012-02-21  8:40 ` Roland Stigge
2012-02-21  8:41 ` Roland Stigge

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.