• Lukas Wunner's avatar
    iio: dac: ti-dac082s085: Read chip spec from device table · f98677cf
    Lukas Wunner authored
    The two properties unique to each supported chip, resolution and number
    of channels, are currently gleaned from the chip's name.
    E.g. dac102s085 is a dual channel 10-bit DAC.
            ^^^
    This was deemed unmaintainable by the subsystem maintainer once the
    driver is extended to support further chips, hence it was requested
    to add an explicit table for chip-specific information and use an
    enum to reference into it.
    
    This adds 17 LoC without any immediate gain, so make the change in a
    separate commit which can be reverted if we determine in 10 years that
    it was unnecessary.
    Signed-off-by: default avatarLukas Wunner <lukas@wunner.de>
    Signed-off-by: default avatarJonathan Cameron <Jonathan.Cameron@huawei.com>
    f98677cf
ti-dac082s085.c 9 KB