[PATCH v2 03/16] hwmon: (mr75203) update Moortec PVT controller intel,vm-map property

Eliav Farber posted 16 patches 3 years, 7 months ago
There is a newer version of this series
[PATCH v2 03/16] hwmon: (mr75203) update Moortec PVT controller intel,vm-map property
Posted by Eliav Farber 3 years, 7 months ago
The "intel,vm-map property" is optional and not required.

Signed-off-by: Eliav Farber <farbere@amazon.com>
---
 Documentation/devicetree/bindings/hwmon/moortec,mr75203.yaml | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/Documentation/devicetree/bindings/hwmon/moortec,mr75203.yaml b/Documentation/devicetree/bindings/hwmon/moortec,mr75203.yaml
index 6f3e3c01f717..f9e849cc73e0 100644
--- a/Documentation/devicetree/bindings/hwmon/moortec,mr75203.yaml
+++ b/Documentation/devicetree/bindings/hwmon/moortec,mr75203.yaml
@@ -48,12 +48,12 @@ required:
   - compatible
   - reg
   - reg-names
-  - intel,vm-map
   - clocks
   - resets
   - "#thermal-sensor-cells"
 
-additionalProperties: false
+additionalProperties:
+  - intel,vm-map
 
 examples:
   - |
-- 
2.37.1
Re: [PATCH v2 03/16] hwmon: (mr75203) update Moortec PVT controller intel,vm-map property
Posted by Guenter Roeck 3 years, 7 months ago
On Wed, Aug 17, 2022 at 05:43:08AM +0000, Eliav Farber wrote:
> The "intel,vm-map property" is optional and not required.
> 
> Signed-off-by: Eliav Farber <farbere@amazon.com>

Ah. This patch should come first, before making associated
code changes, and there would need to be an explanation
_why_ it is not a mandatory property. Also, some action
is taken in the previous patches if the property is not
there. That indicates that the driver is expected to
use some defaults if the property is indeed not provided,
and that expected default should be documented.

Guenter

> ---
>  Documentation/devicetree/bindings/hwmon/moortec,mr75203.yaml | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/Documentation/devicetree/bindings/hwmon/moortec,mr75203.yaml b/Documentation/devicetree/bindings/hwmon/moortec,mr75203.yaml
> index 6f3e3c01f717..f9e849cc73e0 100644
> --- a/Documentation/devicetree/bindings/hwmon/moortec,mr75203.yaml
> +++ b/Documentation/devicetree/bindings/hwmon/moortec,mr75203.yaml
> @@ -48,12 +48,12 @@ required:
>    - compatible
>    - reg
>    - reg-names
> -  - intel,vm-map
>    - clocks
>    - resets
>    - "#thermal-sensor-cells"
>  
> -additionalProperties: false
> +additionalProperties:
> +  - intel,vm-map
>  
>  examples:
>    - |
Re: [PATCH v2 03/16] hwmon: (mr75203) update Moortec PVT controller intel, vm-map property
Posted by Farber, Eliav 3 years, 7 months ago
On 8/18/2022 10:47 PM, Guenter Roeck wrote:
> Ah. This patch should come first, before making associated
> code changes, and there would need to be an explanation
> _why_ it is not a mandatory property. Also, some action
> is taken in the previous patches if the property is not
> there. That indicates that the driver is expected to
> use some defaults if the property is indeed not provided,
> and that expected default should be documented. 
Ack.
I should have been more clear and explained that driver actually handles
the case that "intel,vm-map" does not exist (including an explicit comment
- "Incase intel,vm-map property is not defined ...") and that it is
actually optional.

--
Regards, Eliav