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

Javier Carrasco posted 2 patches 1 year, 10 months ago
There is a newer version of this series
[PATCH 1/2] dt-bindings: iio: health: maxim,max30102: add max30101
Posted by Javier Carrasco 1 year, 10 months ago
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
Re: [PATCH 1/2] dt-bindings: iio: health: maxim,max30102: add max30101
Posted by Jonathan Cameron 1 year, 10 months ago
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
>  
>
Re: [PATCH 1/2] dt-bindings: iio: health: maxim,max30102: add max30101
Posted by Javier Carrasco 1 year, 10 months ago
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
Re: [PATCH 1/2] dt-bindings: iio: health: maxim,max30102: add max30101
Posted by Jonathan Cameron 1 year, 10 months ago
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
>  
>
Re: [PATCH 1/2] dt-bindings: iio: health: maxim,max30102: add max30101
Posted by Rob Herring 1 year, 10 months ago
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>