* [PATCH 0/2] iio: health: max30102: add support for max30101
@ 2024-03-21 18:33 Javier Carrasco
2024-03-21 18:33 ` [PATCH 1/2] dt-bindings: iio: health: maxim,max30102: add max30101 Javier Carrasco
2024-03-21 18:33 ` [PATCH 2/2] iio: health: max30102: add support for max30101 Javier Carrasco
0 siblings, 2 replies; 7+ messages in thread
From: Javier Carrasco @ 2024-03-21 18:33 UTC (permalink / raw)
To: Jonathan Cameron, Lars-Peter Clausen, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Matt Ranostay
Cc: linux-iio, devicetree, linux-kernel, Javier Carrasco
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 <javier.carrasco.cruz@gmail.com>
---
Javier Carrasco (2):
dt-bindings: iio: health: maxim,max30102: add max30101
iio: health: max30102: add support for max30101
Documentation/devicetree/bindings/iio/health/maxim,max30102.yaml | 3 ++-
drivers/iio/health/max30102.c | 2 ++
2 files changed, 4 insertions(+), 1 deletion(-)
---
base-commit: ebc9bee8814d12ec247de117aa2f7fd39ff11127
change-id: 20240317-max30101-edbe658b6633
Best regards,
--
Javier Carrasco <javier.carrasco.cruz@gmail.com>
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH 1/2] dt-bindings: iio: health: maxim,max30102: add max30101
2024-03-21 18:33 [PATCH 0/2] iio: health: max30102: add support for max30101 Javier Carrasco
@ 2024-03-21 18:33 ` Javier Carrasco
2024-03-22 2:09 ` Rob Herring
` (2 more replies)
2024-03-21 18:33 ` [PATCH 2/2] iio: health: max30102: add support for max30101 Javier Carrasco
1 sibling, 3 replies; 7+ messages in thread
From: Javier Carrasco @ 2024-03-21 18:33 UTC (permalink / raw)
To: Jonathan Cameron, Lars-Peter Clausen, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Matt Ranostay
Cc: linux-iio, devicetree, linux-kernel, Javier Carrasco
The Maxim max30101 irs 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.
Signed-off-by: Javier Carrasco <javier.carrasco.cruz@gmail.com>
---
Documentation/devicetree/bindings/iio/health/maxim,max30102.yaml | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/Documentation/devicetree/bindings/iio/health/maxim,max30102.yaml b/Documentation/devicetree/bindings/iio/health/maxim,max30102.yaml
index c13c10c8d65d..0e455809340f 100644
--- a/Documentation/devicetree/bindings/iio/health/maxim,max30102.yaml
+++ b/Documentation/devicetree/bindings/iio/health/maxim,max30102.yaml
@@ -4,7 +4,7 @@
$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 <matt.ranostay@konsulko.com>
@@ -12,6 +12,7 @@ maintainers:
properties:
compatible:
enum:
+ - maxim,max30101
- maxim,max30102
- maxim,max30105
--
2.40.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH 2/2] iio: health: max30102: add support for max30101
2024-03-21 18:33 [PATCH 0/2] iio: health: max30102: add support for max30101 Javier Carrasco
2024-03-21 18:33 ` [PATCH 1/2] dt-bindings: iio: health: maxim,max30102: add max30101 Javier Carrasco
@ 2024-03-21 18:33 ` Javier Carrasco
1 sibling, 0 replies; 7+ messages in thread
From: Javier Carrasco @ 2024-03-21 18:33 UTC (permalink / raw)
To: Jonathan Cameron, Lars-Peter Clausen, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Matt Ranostay
Cc: linux-iio, devicetree, linux-kernel, Javier Carrasco
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>
---
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
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH 1/2] dt-bindings: iio: health: maxim,max30102: add max30101
2024-03-21 18:33 ` [PATCH 1/2] dt-bindings: iio: health: maxim,max30102: add max30101 Javier Carrasco
@ 2024-03-22 2:09 ` Rob Herring
2024-03-24 13:41 ` Jonathan Cameron
2024-03-24 13:46 ` Jonathan Cameron
2 siblings, 0 replies; 7+ messages in thread
From: Rob Herring @ 2024-03-22 2:09 UTC (permalink / raw)
To: Javier Carrasco
Cc: Krzysztof Kozlowski, Matt Ranostay, devicetree, Jonathan Cameron,
Lars-Peter Clausen, Conor Dooley, linux-iio, linux-kernel
On Thu, 21 Mar 2024 19:33:48 +0100, Javier Carrasco wrote:
> The Maxim max30101 irs 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.
>
> Signed-off-by: Javier Carrasco <javier.carrasco.cruz@gmail.com>
> ---
> Documentation/devicetree/bindings/iio/health/maxim,max30102.yaml | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
Acked-by: Rob Herring <robh@kernel.org>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 1/2] dt-bindings: iio: health: maxim,max30102: add max30101
2024-03-21 18:33 ` [PATCH 1/2] dt-bindings: iio: health: maxim,max30102: add max30101 Javier Carrasco
2024-03-22 2:09 ` Rob Herring
@ 2024-03-24 13:41 ` Jonathan Cameron
2024-03-24 13:46 ` Jonathan Cameron
2 siblings, 0 replies; 7+ messages in thread
From: Jonathan Cameron @ 2024-03-24 13:41 UTC (permalink / raw)
To: Javier Carrasco
Cc: Lars-Peter Clausen, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Matt Ranostay, linux-iio, devicetree, linux-kernel
On Thu, 21 Mar 2024 19:33:48 +0100
Javier Carrasco <javier.carrasco.cruz@gmail.com> wrote:
> The Maxim max30101 irs the replacement for the max30105, which is no
is
> longer recommended for future designs.
>
> The max30101 does not require new properties, and it can be described
> with the existing ones for the max30105.
>
> Signed-off-by: Javier Carrasco <javier.carrasco.cruz@gmail.com>
> ---
> Documentation/devicetree/bindings/iio/health/maxim,max30102.yaml | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/Documentation/devicetree/bindings/iio/health/maxim,max30102.yaml b/Documentation/devicetree/bindings/iio/health/maxim,max30102.yaml
> index c13c10c8d65d..0e455809340f 100644
> --- a/Documentation/devicetree/bindings/iio/health/maxim,max30102.yaml
> +++ b/Documentation/devicetree/bindings/iio/health/maxim,max30102.yaml
> @@ -4,7 +4,7 @@
> $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 <matt.ranostay@konsulko.com>
> @@ -12,6 +12,7 @@ maintainers:
> properties:
> compatible:
> enum:
> + - maxim,max30101
> - maxim,max30102
> - maxim,max30105
>
>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 1/2] dt-bindings: iio: health: maxim,max30102: add max30101
2024-03-21 18:33 ` [PATCH 1/2] dt-bindings: iio: health: maxim,max30102: add max30101 Javier Carrasco
2024-03-22 2:09 ` Rob Herring
2024-03-24 13:41 ` Jonathan Cameron
@ 2024-03-24 13:46 ` Jonathan Cameron
2024-03-24 19:05 ` Javier Carrasco
2 siblings, 1 reply; 7+ messages in thread
From: Jonathan Cameron @ 2024-03-24 13:46 UTC (permalink / raw)
To: Javier Carrasco
Cc: Lars-Peter Clausen, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Matt Ranostay, linux-iio, devicetree, linux-kernel
On Thu, 21 Mar 2024 19:33:48 +0100
Javier Carrasco <javier.carrasco.cruz@gmail.com> wrote:
> The Maxim max30101 irs 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.
>
> Signed-off-by: Javier Carrasco <javier.carrasco.cruz@gmail.com>
Given there were no driver changes, is it fully compatible?
i.e. Should we have a fallback compatible here?
properties:
compatible:
oneOf:
- items:
- const: maxim,max30101
- const: maxim,max30105
- enum:
- maxim,max30102
- maxim,max30105
So that a DTS file could use
compatible = "maxim,max30101", "maxim,max30105"
and work with older kernels as well as new ones that understand the new ID?
> ---
> Documentation/devicetree/bindings/iio/health/maxim,max30102.yaml | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/Documentation/devicetree/bindings/iio/health/maxim,max30102.yaml b/Documentation/devicetree/bindings/iio/health/maxim,max30102.yaml
> index c13c10c8d65d..0e455809340f 100644
> --- a/Documentation/devicetree/bindings/iio/health/maxim,max30102.yaml
> +++ b/Documentation/devicetree/bindings/iio/health/maxim,max30102.yaml
> @@ -4,7 +4,7 @@
> $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 <matt.ranostay@konsulko.com>
> @@ -12,6 +12,7 @@ maintainers:
> properties:
> compatible:
> enum:
> + - maxim,max30101
> - maxim,max30102
> - maxim,max30105
>
>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 1/2] dt-bindings: iio: health: maxim,max30102: add max30101
2024-03-24 13:46 ` Jonathan Cameron
@ 2024-03-24 19:05 ` Javier Carrasco
0 siblings, 0 replies; 7+ messages in thread
From: Javier Carrasco @ 2024-03-24 19:05 UTC (permalink / raw)
To: Jonathan Cameron
Cc: Lars-Peter Clausen, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Matt Ranostay, linux-iio, devicetree, linux-kernel
On 3/24/24 14:46, Jonathan Cameron wrote:
> On Thu, 21 Mar 2024 19:33:48 +0100
> Javier Carrasco <javier.carrasco.cruz@gmail.com> wrote:
>
>> The Maxim max30101 irs 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.
>>
>> Signed-off-by: Javier Carrasco <javier.carrasco.cruz@gmail.com>
>
> Given there were no driver changes, is it fully compatible?
> i.e. Should we have a fallback compatible here?
>
> properties:
> compatible:
> oneOf:
> - items:
> - const: maxim,max30101
> - const: maxim,max30105
> - enum:
> - maxim,max30102
> - maxim,max30105
>
> So that a DTS file could use
> compatible = "maxim,max30101", "maxim,max30105"
> and work with older kernels as well as new ones that understand the new ID?
>
According to the manufacturer, it is fully compatible, and apart from
the pinout, I could not find any difference beyond the device description.
I like the idea of having a fallback compatible for older kernels, so I
will add it to v2 as you suggested.
Thanks and best regards,
Javier Carrasco
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2024-03-24 19:05 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-03-21 18:33 [PATCH 0/2] iio: health: max30102: add support for max30101 Javier Carrasco
2024-03-21 18:33 ` [PATCH 1/2] dt-bindings: iio: health: maxim,max30102: add max30101 Javier Carrasco
2024-03-22 2:09 ` Rob Herring
2024-03-24 13:41 ` Jonathan Cameron
2024-03-24 13:46 ` Jonathan Cameron
2024-03-24 19:05 ` Javier Carrasco
2024-03-21 18:33 ` [PATCH 2/2] iio: health: max30102: add support for max30101 Javier Carrasco
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).