Home Home > GIT Browse > stable
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJiri Slaby <jslaby@suse.cz>2019-08-16 22:01:45 +0200
committerJiri Slaby <jslaby@suse.cz>2019-08-16 22:25:11 +0200
commit6c21eff2a40f9a737886292a50b05a5b744171d3 (patch)
treef44f229d07efe1e5d49ceafe65c3a682174f8853
parentdb9a9dabd8a9884bb74f715ba493a215cc750d24 (diff)
hwmon: (lm75) Fixup tmp75b clr_mask (bnc#1012628).
-rw-r--r--patches.kernel.org/5.2.9-124-hwmon-lm75-Fixup-tmp75b-clr_mask.patch42
-rw-r--r--series.conf1
2 files changed, 43 insertions, 0 deletions
diff --git a/patches.kernel.org/5.2.9-124-hwmon-lm75-Fixup-tmp75b-clr_mask.patch b/patches.kernel.org/5.2.9-124-hwmon-lm75-Fixup-tmp75b-clr_mask.patch
new file mode 100644
index 0000000000..96d8d8a113
--- /dev/null
+++ b/patches.kernel.org/5.2.9-124-hwmon-lm75-Fixup-tmp75b-clr_mask.patch
@@ -0,0 +1,42 @@
+From: Iker Perez del Palomar Sustatxa <iker.perez@codethink.co.uk>
+Date: Thu, 1 Aug 2019 08:53:24 +0100
+Subject: [PATCH] hwmon: (lm75) Fixup tmp75b clr_mask
+References: bnc#1012628
+Patch-mainline: 5.2.9
+Git-commit: a95a4f3f2702b55a89393bf0f1b2b3d79e0f7da2
+
+commit a95a4f3f2702b55a89393bf0f1b2b3d79e0f7da2 upstream.
+
+The configuration register of the tmp75b sensor is 16bit long, however
+the first byte is reserved, so there is not no need to take care of it.
+
+Because the order of the bytes is little endian and it is only necessary
+to write one byte, the desired bits must be shifted into a 8 bit range.
+
+Fixes: 39abe9d88b30 ("hwmon: (lm75) Add support for TMP75B")
+Cc: stable@vger.kernel.org
+Signed-off-by: Iker Perez del Palomar Sustatxa <iker.perez@codethink.co.uk>
+Link: https://lore.kernel.org/r/20190801075324.4638-1-iker.perez@codethink.co.uk
+Signed-off-by: Guenter Roeck <linux@roeck-us.net>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+Signed-off-by: Jiri Slaby <jslaby@suse.cz>
+---
+ drivers/hwmon/lm75.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/drivers/hwmon/lm75.c b/drivers/hwmon/lm75.c
+index 3fb9c0a2d6d0..ce5ec403ec73 100644
+--- a/drivers/hwmon/lm75.c
++++ b/drivers/hwmon/lm75.c
+@@ -343,7 +343,7 @@ lm75_probe(struct i2c_client *client, const struct i2c_device_id *id)
+ data->sample_time = MSEC_PER_SEC / 2;
+ break;
+ case tmp75b: /* not one-shot mode, Conversion rate 37Hz */
+- clr_mask |= 1 << 15 | 0x3 << 13;
++ clr_mask |= 1 << 7 | 0x3 << 5;
+ data->resolution = 12;
+ data->sample_time = MSEC_PER_SEC / 37;
+ break;
+--
+2.22.0
+
diff --git a/series.conf b/series.conf
index b6544dda7e..21e6fb69ed 100644
--- a/series.conf
+++ b/series.conf
@@ -1144,6 +1144,7 @@
patches.kernel.org/5.2.9-121-can-peak_usb-pcan_usb_pro-Fix-info-leaks-to-USB.patch
patches.kernel.org/5.2.9-122-can-peak_usb-pcan_usb_fd-Fix-info-leaks-to-USB-.patch
patches.kernel.org/5.2.9-123-hwmon-nct7802-Fix-wrong-detection-of-in4-presen.patch
+ patches.kernel.org/5.2.9-124-hwmon-lm75-Fixup-tmp75b-clr_mask.patch
########################################################
# Build fixes that apply to the vanilla kernel too.