iio: temperature: tmp117: improve fallback capabilities
Don't error if the device-id found don't match the device-id for the TMP117 sensor since other TMPxxx might be compatible to the TMP117. The fallback mechanism tries to gather the required information from the of_device_id or from the i2c_client information. The commit also prepares the driver for adding new devices more easily by making use of switch-case at the relevant parts. Signed-off-by: Marco Felsch <m.felsch@pengutronix.de> Link: https://lore.kernel.org/r/20230228090518.529811-3-m.felsch@pengutronix.deSigned-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Showing
Please register or sign in to comment