On 9/16/23 10:04, Guenter Roeck wrote: [ ... ]
The proper fix should really be in nct6775_in_is_visible(), which should drop the attribute if there is no alarm bit for it, similar to, for example, nct6775_fan_is_visible(). Something like int nr = index % 5; /* attribute index */ if (nr == 1 && data->ALARM_BITS[in] == -1) return 0; I think there is a also problem with beep attribute handling, but that is a different bug unrelated to this one.
I think beep attributes are ok after all. All voltages have them, and nct6775_fan_is_visible() already checks for beep bits. Guenter