hwmon: iio: Add labels from IIO channels
Add labels from IIO channels to our channels. This allows userspace to display more meaningful names instead of "in0" or "temp5". Although lm-sensors gracefully handles errors when reading channel labels, the ABI says the label attribute > Should only be created if the driver has hints about what this voltage > channel is being used for, and user-space doesn't. Therefore, we test to see if the channel has a label before creating the attribute. Signed-off-by: Sean Anderson <sean.anderson@linux.dev> Acked-by: Guenter Roeck <linux@roeck-us.net> Link: https://patch.msgid.link/20240624174601.1527244-3-sean.anderson@linux.devSigned-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Showing
Please register or sign in to comment