• Miquel Raynal's avatar
    thermal: armada: add multi-channel sensors support · f7c2068a
    Miquel Raynal authored
    MVEBU thermal IP supports multiple channels. Each channel may have
    several sensors but for now each channel is wired to only one thermal
    sensor. The first channel always points to the so called internal
    sensor, within the thermal IP. There is usually one more channel (with
    one sensor each time) per CPU. The code has been written to support
    possible evolutions of the ap806 IP that would embed more CPUs and thus
    more channels to select. Each channel should be referenced in the device
    tree as an independent thermal zone.
    
    Add the possibility to read each of these sensors through sysfs by
    registering all the sensors (translated in "thermal_zone"). Also add a
    mutex on these accesses to avoid read conflicts (only one channel/sensor
    may be selected and read at a time).
    Signed-off-by: default avatarMiquel Raynal <miquel.raynal@bootlin.com>
    Signed-off-by: default avatarEduardo Valentin <edubezval@gmail.com>
    f7c2068a
armada_thermal.c 19 KB