iio: magnetometer: yas530: Introduce "chip_info" structure
authorJakob Hauser <jahau@rocketmail.com>
Fri, 12 Aug 2022 21:54:14 +0000 (23:54 +0200)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Mon, 15 Aug 2022 21:30:03 +0000 (22:30 +0100)
commita70f60e5b6b37e8b9f0967235bf89aebd2d9fbb9
tree574d7c0d76e062aff661a9b0eaf20e9d7c073f32
parent92d9c05ca7324aed6695b53d3ce11b3e1387f470
iio: magnetometer: yas530: Introduce "chip_info" structure

Introduce the "chip_info" structure approach for better variant handling.

The variant to be used is now chosen by the Device Tree (enum "chip_ids"),
not by the chip ID in the register. However, there is a check to make sure
they match (using integer "id_check").

Signed-off-by: Jakob Hauser <jahau@rocketmail.com>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Link: https://lore.kernel.org/r/57236545107286771d351b95091bf56815d3717d.1660337264.git.jahau@rocketmail.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/magnetometer/yamaha-yas530.c