Re: [PATCH v3 2/2] hwmon: ina3221: Read channel input source info from DT
From: Guenter Roeck <linux@roeck-us.net>
Date: 2018-09-23 05:25:47
Also in:
linux-doc, linux-hwmon, lkml
From: Guenter Roeck <linux@roeck-us.net>
Date: 2018-09-23 05:25:47
Also in:
linux-doc, linux-hwmon, lkml
On 09/22/2018 08:33 PM, Nicolin Chen wrote:
quoted
No. If the chip was configured by the BIOS/ROMMON, it is supposed to be that way. We can not just override that.For this driver, it does soft reset in the probe() so we're sure that all channels are enabled at the moment of calling this regmap_update_bits. So there's no assumption anymore.
Good point.
But the case that you mentioned is a good one. It does give me some insight about the use case and the things that will need to be careful when adding in[123]_enable. Just it'd be also possible that BIOS could disable a channel that is not explicitly disabled in the DT -- then the driver should not enable it.
Not necessarily. Again, we can not assume that everyone has DT (or that it and/or the BIOS is correct, for that matter). Nevertheless, adding the enable attribute is not required at this point, so it is ok for me to skip it. Please note that I'll accept a patch adding it, though, if it is ever submitted (with a use case). Thanks, Guenter