summaryrefslogtreecommitdiff
path: root/drivers/tty/serial/Kconfig
diff options
context:
space:
mode:
authorCosmin Tanislav <cosmin.tanislav@analog.com>2022-06-05 17:46:59 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2022-06-10 13:43:19 +0200
commit2e1f2d9a9bdbe12ee475c82a45ac46a278e8049a (patch)
treecc769ed3b0987b9062c784e5a0799237c1d1761a /drivers/tty/serial/Kconfig
parentb3883ab5e95713e479f774ea68be275413e8e5b2 (diff)
serial: max310x: implement I2C support
I2C implementation on this chip has a few key differences compared to SPI, as described in previous patches. * extended register space access needs no extra logic * slave address is used to select which UART to communicate with To accommodate these differences, add an I2C interface config, set the RevID register address and implement an empty method for setting the GlobalCommand register, since no special handling is needed for the extended register space. To handle the port-specific slave address, create an I2C dummy device for each port, except the base one (UART0), which is expected to be the one specified in firmware, and create a regmap for each I2C device. Add minimum and maximum slave addresses to each devtype for sanity checking. Also, use a separate regmap config with no write_flag_mask, since I2C has a R/W bit in its slave address, and set the max register to the address of the RevID register, since the extended register space needs no extra logic. Finally, add the I2C driver. 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-5-demonsingur@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty/serial/Kconfig')
-rw-r--r--drivers/tty/serial/Kconfig1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/tty/serial/Kconfig b/drivers/tty/serial/Kconfig
index a452748c69b2..8a3ee1525d80 100644
--- a/drivers/tty/serial/Kconfig
+++ b/drivers/tty/serial/Kconfig
@@ -324,6 +324,7 @@ config SERIAL_MAX310X
depends on SPI_MASTER
select SERIAL_CORE
select REGMAP_SPI if SPI_MASTER
+ select REGMAP_I2C if I2C
help
This selects support for an advanced UART from Maxim (Dallas).
Supported ICs are MAX3107, MAX3108, MAX3109, MAX14830.