2024-03-24 19:20:45

by Javier Carrasco

[permalink] [raw]
Subject: [PATCH v2 0/2] iio: health: max30102: add support for max30101

The Maxim max30101 is the replacement for the max30105, which is no
longer recommended for new designs [1].

The max30101 is described as a pulse oximeter and heart-rate sensor,
as opposed to the max30105, which is described as an optical sensor for
smoke detection applications. In the end, the internal structure is
identical, as well as the register map, voltages and sensitivity. Only
the pinout has changed, which is not relevant for the driver.

A new compatible has been added, but the logic used for the max30105 can
be re-used for the new part.

Link: https://www.analog.com/en/products/max30105.html [1]

Signed-off-by: Javier Carrasco <[email protected]>
---
Changes in v2:
- dt-bindings: use maxim,max30105 as the fallback compatible for
maxim,max30101.
- PATCH 1/2: Typo in commit description.
- Link to v1: https://lore.kernel.org/r/[email protected]

---
Javier Carrasco (2):
dt-bindings: iio: health: maxim,max30102: add max30101
iio: health: max30102: add support for max30101

.../devicetree/bindings/iio/health/maxim,max30102.yaml | 12 ++++++++----
drivers/iio/health/max30102.c | 2 ++
2 files changed, 10 insertions(+), 4 deletions(-)
---
base-commit: 70293240c5ce675a67bfc48f419b093023b862b3
change-id: 20240317-max30101-edbe658b6633

Best regards,
--
Javier Carrasco <[email protected]>



2024-03-24 19:20:56

by Javier Carrasco

[permalink] [raw]
Subject: [PATCH v2 1/2] dt-bindings: iio: health: maxim,max30102: add max30101

The Maxim max30101 is the replacement for the max30105, which is no
longer recommended for future designs.

The max30101 does not require new properties, and it can be described
with the existing ones for the max30105, which will be used as a
fallback compatible.

Signed-off-by: Javier Carrasco <[email protected]>
---
.../devicetree/bindings/iio/health/maxim,max30102.yaml | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/Documentation/devicetree/bindings/iio/health/maxim,max30102.yaml b/Documentation/devicetree/bindings/iio/health/maxim,max30102.yaml
index c13c10c8d65d..a0fe0a818d86 100644
--- a/Documentation/devicetree/bindings/iio/health/maxim,max30102.yaml
+++ b/Documentation/devicetree/bindings/iio/health/maxim,max30102.yaml
@@ -4,16 +4,20 @@
$id: http://devicetree.org/schemas/iio/health/maxim,max30102.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

-title: Maxim MAX30102 heart rate and pulse oximeter and MAX30105 particle-sensor
+title: Maxim MAX30101/2 heart rate and pulse oximeter and MAX30105 particle-sensor

maintainers:
- Matt Ranostay <[email protected]>

properties:
compatible:
- enum:
- - maxim,max30102
- - maxim,max30105
+ oneOf:
+ - enum:
+ - maxim,max30102
+ - maxim,max30105
+ - items:
+ - const: maxim,max30101
+ - const: maxim,max30105

reg:
maxItems: 1

--
2.40.1


2024-03-24 19:21:07

by Javier Carrasco

[permalink] [raw]
Subject: [PATCH v2 2/2] iio: health: max30102: add support for max30101

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 <[email protected]>
---
drivers/iio/health/max30102.c | 2 ++
1 file changed, 2 insertions(+)

diff --git a/drivers/iio/health/max30102.c b/drivers/iio/health/max30102.c
index 37e619827e8a..6616729af5b7 100644
--- a/drivers/iio/health/max30102.c
+++ b/drivers/iio/health/max30102.c
@@ -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" },
{ }

--
2.40.1


2024-03-25 18:00:25

by Krzysztof Kozlowski

[permalink] [raw]
Subject: Re: [PATCH v2 1/2] dt-bindings: iio: health: maxim,max30102: add max30101

On 24/03/2024 20:20, Javier Carrasco wrote:
> The Maxim max30101 is the replacement for the max30105, which is no
> longer recommended for future designs.
>
> The max30101 does not require new properties, and it can be described
> with the existing ones for the max30105, which will be used as a
> fallback compatible.
>
> Signed-off-by: Javier Carrasco <[email protected]>
> ---
> .../devicetree/bindings/iio/health/maxim,max30102.yaml | 12 ++++++++----
> 1 file changed, 8 insertions(+), 4 deletions(-)

Reviewed-by: Krzysztof Kozlowski <[email protected]>

Best regards,
Krzysztof


2024-03-25 23:33:10

by Jonathan Cameron

[permalink] [raw]
Subject: Re: [PATCH v2 1/2] dt-bindings: iio: health: maxim,max30102: add max30101

On Mon, 25 Mar 2024 13:18:14 +0100
Krzysztof Kozlowski <[email protected]> wrote:

> On 24/03/2024 20:20, Javier Carrasco wrote:
> > The Maxim max30101 is the replacement for the max30105, which is no
> > longer recommended for future designs.
> >
> > The max30101 does not require new properties, and it can be described
> > with the existing ones for the max30105, which will be used as a
> > fallback compatible.
> >
> > Signed-off-by: Javier Carrasco <[email protected]>
> > ---
> > .../devicetree/bindings/iio/health/maxim,max30102.yaml | 12 ++++++++----
> > 1 file changed, 8 insertions(+), 4 deletions(-)
>
> Reviewed-by: Krzysztof Kozlowski <[email protected]>
>
> Best regards,
> Krzysztof
>
>

Thanks,

Series applied to the togreg branch of iio.git and initially pushed out
as testing to get it some build testing from 0-day.

Thanks,

Jonathan