kernel: backport some Bluetooth RTL8761 USB IDs
[openwrt/openwrt.git] / target / linux / generic / backport-5.10 / 872-v5.13-01-hwmon-tps23861-define-regmap-max-register.patch
1 From 3d61a7b3a714eb3ef1777e3c576576aca2b85365 Mon Sep 17 00:00:00 2001
2 From: Robert Marko <robert.marko@sartura.hr>
3 Date: Thu, 10 Jun 2021 00:07:26 +0200
4 Subject: [PATCH 2/4] hwmon: (tps23861) define regmap max register
5
6 Define the max register address the device supports.
7 This allows reading the whole register space via
8 regmap debugfs, without it only register 0x0 is visible.
9
10 This was forgotten in the original driver commit.
11
12 Fixes: fff7b8ab2255 ("hwmon: add Texas Instruments TPS23861 driver")
13 Signed-off-by: Robert Marko <robert.marko@sartura.hr>
14 Link: https://lore.kernel.org/r/20210609220728.499879-1-robert.marko@sartura.hr
15 Signed-off-by: Guenter Roeck <linux@roeck-us.net>
16 ---
17 drivers/hwmon/tps23861.c | 1 +
18 1 file changed, 1 insertion(+)
19
20 --- a/drivers/hwmon/tps23861.c
21 +++ b/drivers/hwmon/tps23861.c
22 @@ -117,6 +117,7 @@ struct tps23861_data {
23 static struct regmap_config tps23861_regmap_config = {
24 .reg_bits = 8,
25 .val_bits = 8,
26 + .max_register = 0x6f,
27 };
28
29 static int tps23861_read_temp(struct tps23861_data *data, long *val)