iio: health: max30102: add support for max30101
authorJavier Carrasco <javier.carrasco.cruz@gmail.com>
Sun, 24 Mar 2024 19:20:29 +0000 (20:20 +0100)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Thu, 28 Mar 2024 13:22:15 +0000 (13:22 +0000)
The Maxim max30101 is the replacement for the max30105, which is no
longer recommended for future designs.

Their internal structure is identical, as well as the register map,
configuration options and sensitivity, which allows for code recycling.

Signed-off-by: Javier Carrasco <javier.carrasco.cruz@gmail.com>
Link: https://lore.kernel.org/r/20240324-max30101-v2-2-611deb510c97@gmail.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/health/max30102.c

index 37e619827e8a11711230d93aa5950d979cb96c99..6616729af5b77969ef650a255d3c89d03c3ee359 100644 (file)
@@ -613,6 +613,7 @@ static void max30102_remove(struct i2c_client *client)
 }
 
 static const struct i2c_device_id max30102_id[] = {
+       { "max30101", max30105 },
        { "max30102", max30102 },
        { "max30105", max30105 },
        {}
@@ -620,6 +621,7 @@ static const struct i2c_device_id max30102_id[] = {
 MODULE_DEVICE_TABLE(i2c, max30102_id);
 
 static const struct of_device_id max30102_dt_ids[] = {
+       { .compatible = "maxim,max30101" },
        { .compatible = "maxim,max30102" },
        { .compatible = "maxim,max30105" },
        { }