Re: [PATCH 09/11] hwmon: (ina2xx) Consolidate chip initialization code

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 8/29/24 07:55, Tzung-Bi Shih wrote:
On Tue, Aug 27, 2024 at 08:34:53AM -0700, Guenter Roeck wrote:
+static int ina2xx_init(struct device *dev, struct ina2xx_data *data)
+{
+	u16 config = data->config->config_default;
+	struct regmap *regmap = data->regmap;
+	u32 shunt;
+	int ret;
[...]
+	if (data->chip == ina226 &&
+	    device_property_read_bool(dev, "ti,alert-polarity-active-high"))
+		config |= INA226_ALERT_POLARITY;

This looks wrong to me.  The polarity setting should be in INA226_MASK_ENABLE
instead of INA2XX_CONFIG.


Yes, I fixed that already. Thanks for noticing!

Guenter





[Index of Archives]     [LM Sensors]     [Linux Sound]     [ALSA Users]     [ALSA Devel]     [Linux Audio Users]     [Linux Media]     [Kernel]     [Gimp]     [Yosemite News]     [Linux Media]

  Powered by Linux