On 10/8/21 5:55 AM, Oskar Senft wrote:
Hi Guenter
Numbering in sysfs is not relevant here; the index should always start with 0.
Ok, in that case, I'll encode LTD as @0 and RTD1..3 as @1..@3.
In this example, RTD1, RTD2 and LTD would be temperature sensors and
RTD3 would be a voltage sensor.
Would that make more sense? Is the use of strings acceptable?
I don't think so. I am quite sure that rtd3 is still a temperature,
and I am not sure if other sensor types on that chip may need dt
configuration.
Reading the existing nct7802_in_is_visible() and
nct7802_temp_is_visible() [1] in I read that RTD3 could either be
voltage or temperature.
Ah yes, you are correct. The same applies to RTD1 and RTD2, actually,
Sorry, it has been too long since I wrote the driver. And it really needs
a conversion to the new hwmon API.
Guenter
I'll go ahead and propose another patch version on [3] for that.
[1] https://github.com/torvalds/linux/blob/master/drivers/hwmon/nct7802.c#L778
[2] https://github.com/torvalds/linux/blob/master/drivers/hwmon/nct7802.c#L679
[3] https://lore.kernel.org/all/20210921004627.2786132-1-osk@xxxxxxxxxx/