Skip to contentSkip to conversation

serial: sc16is7xx: Put IOControl register into regmap_volatile

PATCH New Hui Wang 1 participant 1 message Jul 24, 2023 TTY layer and serial drivers

lore
Share & tools
lore

Hui Wang

author
#0 lore raw

PATCH 1/1 serial: sc16is7xx: Put IOControl register into regmap_volatile

According to the IOControl register bits description in the page 31 of the product datasheet, we know the bit 3 of IOControl register is softreset, this bit will self-clearing once the reset finish.

In the probe, the softreset bit is set, and when we read this register from debugfs/regmap interface, we found the softreset bit is still setting, this confused us for a while. Finally we found this register is cached, to read the real value from register, we could put it into the regmap_volatile().

---
 drivers/tty/serial/sc16is7xx.c | 1 +
 1 file changed, 1 insertion(+)
drivers/tty/serial/sc16is7xx.c +1 -0
index 2e7e7c409cf2..bc2b204d63af 100644
@@ -488,6 +488,7 @@ static bool sc16is7xx_regmap_volatile(struct device *dev, unsigned int reg)
 	case SC16IS7XX_TXLVL_REG:
 	case SC16IS7XX_RXLVL_REG:
 	case SC16IS7XX_IOSTATE_REG:
+	case SC16IS7XX_IOCONTROL_REG:
 		return true;
 	default:
 		break;
Signature · 1 line
2.34.1