summaryrefslogtreecommitdiff
path: root/drivers/tty/serial/Kconfig
diff options
context:
space:
mode:
authorCosmin Tanislav <cosmin.tanislav@analog.com>2022-06-05 17:46:58 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2022-06-10 13:43:19 +0200
commitb3883ab5e95713e479f774ea68be275413e8e5b2 (patch)
tree046a37cb06250f822ee8e44c1003671731ee8f09 /drivers/tty/serial/Kconfig
parent6ef281daf020592c219fa91780abc381c6c20db5 (diff)
serial: max310x: make accessing revision id interface-agnostic
SPI can only use 5 address bits, since one bit is reserved for specifying R/W and 2 bits are used to specify the UART port. To access registers that have addresses past 0x1F, an extended register space can be enabled by writing to the GlobalCommand register (address 0x1F). I2C uses 8 address bits. The R/W bit is placed in the slave address, and so is the UART port. Because of this, registers that have addresses higher than 0x1F can be accessed normally. To access the RevID register, on SPI, 0xCE must be written to the 0x1F address to enable the extended register space, after which the RevID register is accessible at address 0x5. 0xCD must be written to the 0x1F address to disable the extended register space. On I2C, the RevID register is accessible at address 0x25. Create an interface config struct, and add a method for toggling the extended register space and a member for the RevId register address. Implement these for SPI. Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com> Signed-off-by: Cosmin Tanislav <cosmin.tanislav@analog.com> Link: https://lore.kernel.org/r/20220605144659.4169853-4-demonsingur@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty/serial/Kconfig')
0 files changed, 0 insertions, 0 deletions