Skip to contentSkip to conversation

hwmon/lm70: Allow 4wire SPI bus with LM70

PATCH Applied Christophe Leroy 2 participants 2 messages Sep 4, 2012

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/2 hwmon/lm70: Allow 4wire SPI bus with LM70

Removing the 3wire limitation on LM70 as the component also allows operation on 4wire SPI bus

drivers/hwmon/lm70.c +0 -4
diff -u linux-3.5-vanilla/drivers/hwmon/lm70.c linux-3.5/drivers/hwmon/lm70.c
@@ -143,10 +143,6 @@
 	if (spi->mode & (SPI_CPOL | SPI_CPHA))
 		return -EINVAL;
 
-	/* 3-wire link (shared SI/SO) for LM70 */
-	if (chip = LM70_CHIP_LM70 && !(spi->mode & SPI_3WIRE))
-		return -EINVAL;
-
 	/* NOTE:  we assume 8-bit words, and convert to 16 bits manually */
 
 	p_lm70 = kzalloc(sizeof *p_lm70, GFP_KERNEL);
Documentation/hwmon/lm70 +2 -3
diff -u linux-3.5-vanilla/Documentation/hwmon/lm70 linux-3.5/Documentation/hwmon/lm70
@@ -31,9 +31,8 @@
 with a "SPI master controller driver", see drivers/spi/spi_lm70llp.c
 and its associated documentation.
 
-The TMP121/TMP123 are very similar; main differences are 4 wire SPI inter-
-face (read only) and 13-bit temperature data (0.0625 degrees celsius reso-
-lution).
+The TMP121/TMP123 are very similar; main difference is 13-bit temperature
+data (0.0625 degrees celsius resolution).
 
 Thanks to
 ---------

_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors

maintainer Applied
#1 lore raw
Quoted 5 lines · Christophe Leroy

Removing the 3wire limitation on LM70 as the component also allows operation on 4wire SPI bus

Applied to -next.

Thanks,
Guenter

Quoted 30 lines

diff -u linux-3.5-vanilla/drivers/hwmon/lm70.c linux-3.5/drivers/hwmon/lm70.c

drivers/hwmon/lm70.c +0 -4
@@ -143,10 +143,6 @@
 	if (spi->mode & (SPI_CPOL | SPI_CPHA))
 		return -EINVAL;
 
-	/* 3-wire link (shared SI/SO) for LM70 */
-	if (chip == LM70_CHIP_LM70 && !(spi->mode & SPI_3WIRE))
-		return -EINVAL;
-
 	/* NOTE:  we assume 8-bit words, and convert to 16 bits manually */
 
 	p_lm70 = kzalloc(sizeof *p_lm70, GFP_KERNEL);

diff -u linux-3.5-vanilla/Documentation/hwmon/lm70 linux-3.5/Documentation/hwmon/lm70

Documentation/hwmon/lm70 +2 -3
@@ -31,9 +31,8 @@
 with a "SPI master controller driver", see drivers/spi/spi_lm70llp.c
 and its associated documentation.
 
-The TMP121/TMP123 are very similar; main differences are 4 wire SPI inter-
-face (read only) and 13-bit temperature data (0.0625 degrees celsius reso-
-lution).
+The TMP121/TMP123 are very similar; main difference is 13-bit temperature
+data (0.0625 degrees celsius resolution).
 
 Thanks to
 ---------