Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

mfd: tqmx86: Specify IO port register range more precisely

Registers 0x160..0x17f are unassigned. Use 0x180 as base register and
update offets accordingly.

Also change the size of the range to include 0x19f. While 0x19f is
currently reserved for future extensions, so are several of the previous
registers up to 0x19e, and it is weird to leave out just the last one.

Fixes: 2f17dd34ffed ("mfd: tqmx86: IO controller with I2C, Wachdog and GPIO")
Signed-off-by: Matthias Schiffer <matthias.schiffer@ew.tq-group.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: Lee Jones <lee@kernel.org>
Link: https://lore.kernel.org/r/db4677ac318b1283c8956f637f409995a30a31c3.1676892223.git.matthias.schiffer@ew.tq-group.com

authored by

Matthias Schiffer and committed by
Lee Jones
051c69ff 1be1b236

+5 -5
+5 -5
drivers/mfd/tqmx86.c
··· 16 16 #include <linux/platform_data/i2c-ocores.h> 17 17 #include <linux/platform_device.h> 18 18 19 - #define TQMX86_IOBASE 0x160 20 - #define TQMX86_IOSIZE 0x3f 19 + #define TQMX86_IOBASE 0x180 20 + #define TQMX86_IOSIZE 0x20 21 21 #define TQMX86_IOBASE_I2C 0x1a0 22 22 #define TQMX86_IOSIZE_I2C 0xa 23 23 #define TQMX86_IOBASE_WATCHDOG 0x18b ··· 25 25 #define TQMX86_IOBASE_GPIO 0x18d 26 26 #define TQMX86_IOSIZE_GPIO 0x4 27 27 28 - #define TQMX86_REG_BOARD_ID 0x20 28 + #define TQMX86_REG_BOARD_ID 0x00 29 29 #define TQMX86_REG_BOARD_ID_E38M 1 30 30 #define TQMX86_REG_BOARD_ID_50UC 2 31 31 #define TQMX86_REG_BOARD_ID_E38C 3 ··· 40 40 #define TQMX86_REG_BOARD_ID_E40S 13 41 41 #define TQMX86_REG_BOARD_ID_E40C1 14 42 42 #define TQMX86_REG_BOARD_ID_E40C2 15 43 - #define TQMX86_REG_BOARD_REV 0x21 44 - #define TQMX86_REG_IO_EXT_INT 0x26 43 + #define TQMX86_REG_BOARD_REV 0x01 44 + #define TQMX86_REG_IO_EXT_INT 0x06 45 45 #define TQMX86_REG_IO_EXT_INT_NONE 0 46 46 #define TQMX86_REG_IO_EXT_INT_7 1 47 47 #define TQMX86_REG_IO_EXT_INT_9 2