On Tue, Aug 27, 2024 at 08:34:51AM -0700, Guenter Roeck wrote: > @@ -440,7 +441,7 @@ static ssize_t ina226_alert_store(struct device *dev, > */ > mutex_lock(&data->config_lock); > ret = regmap_update_bits(regmap, INA226_MASK_ENABLE, > - INA226_ALERT_CONFIG_MASK, 0); > + INA226_ALERT_CONFIG_MASK | INA226_ALERT_LATCH_ENABLE, 0); > if (ret < 0) > goto abort; > > @@ -451,8 +452,8 @@ static ssize_t ina226_alert_store(struct device *dev, > > if (val != 0) { > ret = regmap_update_bits(regmap, INA226_MASK_ENABLE, > - INA226_ALERT_CONFIG_MASK, > - attr->index); > + INA226_ALERT_CONFIG_MASK | INA226_ALERT_LATCH_ENABLE, > + attr->index | INA226_ALERT_LATCH_ENABLE); Does it really need to clear and set every time? Could it set only once in ina2xx_probe() just like ina2xx_set_alert_polarity()?