Trouble with sensor chip label matching.

Mike Williamson <[email protected]> Thu, 14 Aug 2025 09:20:06 -0400
Newsgroups org.kernel.vger.lm-sensors
Message-ID <CAHEoWwsxq7Tk-GSCLA3xne_b6qrKUqh1u4aXdp5-1oZe=L05xA@mail.gmail.com>
Hello,

We are trying to set up a configuration file for an ads7828 chip, and
are having some troubles.  We have two chips named ads7828-i2c-11-48
and ads7828-i2c-11-49.  If we use the fully qualified names in the
chip command of the sensor configuration file, we don't get a match.
I have tried the following:

"ads7828-*" - matches both devices
"ads7828-i2c-11-*" - matches nothing
"ads7828-i2c-11-49" - matches nothing
"*-i2c-11-49" - matches nothing
"*-i2c-11-*" - matches nothing

I feel like this has to be my error, but I am stuck.  This is a yocto
build lm-sensors suite at version 3.6.0.  Are there build options for
reg exprs that have to be enabled?

Thanks,
Mike


 --
root@qcs6490-mitysom-devkit:/etc/sensors.d# sensors -v
sensors version 3.6.0 with libsensors version 3.6.0

root@qcs6490-mitysom-devkit:/etc/sensors.d# cat sensors.conf
bus "i2c-11" "Geni-I2C"

chip "ads7828-i2c-11-49"
        label in0 "1V8-MEM"

root@qcs6490-mitysom-devkit:/etc/sensors.d# sensors ads7828-i2c-11-49
ads7828-i2c-11-49
Adapter: Geni-I2C
in0:           1.81 V
[snip]

-- change sensors to wildcard, but this won't work because we have two devices

root@qcs6490-mitysom-devkit:/etc/sensors.d# cat sensors.conf
bus "i2c-11" "Geni-I2C"

chip "ads7828-*"
        label in0 "1V8-MEM"
root@qcs6490-mitysom-devkit:/etc/sensors.d#

root@qcs6490-mitysom-devkit:/etc/sensors.d# sensors ads7828-i2c-11-48
ads7828-i2c-11-48
Adapter: Geni-I2C
1V8-MEM:       1.81 V
[snip]