public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] dt-bindings: mfd: bd71815: Fix rsense and typos
@ 2024-11-12 17:01 Matti Vaittinen
  2024-11-12 17:45 ` Conor Dooley
  2024-12-11 12:48 ` (subset) " Lee Jones
  0 siblings, 2 replies; 3+ messages in thread
From: Matti Vaittinen @ 2024-11-12 17:01 UTC (permalink / raw)
  To: Matti Vaittinen, Matti Vaittinen
  Cc: Lee Jones, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Matti Vaittinen, Andreas Kemnade, devicetree, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 3119 bytes --]

The sense resistor used for measuring currents is typically some tens of
milli Ohms. It has accidentally been documented to be tens of mega Ohms.
Fix the size of this resistor and a few copy-paste errors while at it.

Drop the unsuitable 'rohm,charger-sense-resistor-ohms' property (which
can't represent resistors smaller than one Ohm), and introduce a new
'rohm,charger-sense-resistor-micro-ohms' property with appropriate
minimum, maximum and default values instead.

Fixes: 4238dc1e6490 ("dt_bindings: mfd: Add ROHM BD71815 PMIC")
Signed-off-by: Matti Vaittinen <mazziesaccount@gmail.com>

---
The sense resistor property has not been used by upstream drivers, but
it is nevertheless good idea to keep it here for the sake of the
completenes. Furthermore, there may be a respin of the charger driver
RFC series coming as I am working on another PMIC variant with similar
charging block. Also, there is now an updstream dts with BD71828 PMIC,
which can be controlled with same downstream charger driver as BD71815.
---
 .../bindings/mfd/rohm,bd71815-pmic.yaml       | 20 +++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)

diff --git a/Documentation/devicetree/bindings/mfd/rohm,bd71815-pmic.yaml b/Documentation/devicetree/bindings/mfd/rohm,bd71815-pmic.yaml
index bb81307dc11b..4fc78efaa550 100644
--- a/Documentation/devicetree/bindings/mfd/rohm,bd71815-pmic.yaml
+++ b/Documentation/devicetree/bindings/mfd/rohm,bd71815-pmic.yaml
@@ -50,15 +50,15 @@ properties:
     minimum: 0
     maximum: 1
 
-  rohm,charger-sense-resistor-ohms:
-    minimum: 10000000
-    maximum: 50000000
+  rohm,charger-sense-resistor-micro-ohms:
+    minimum: 10000
+    maximum: 50000
     description: |
-      BD71827 and BD71828 have SAR ADC for measuring charging currents.
-      External sense resistor (RSENSE in data sheet) should be used. If
-      something other but 30MOhm resistor is used the resistance value
-      should be given here in Ohms.
-    default: 30000000
+      BD71815 has SAR ADC for measuring charging currents. External sense
+      resistor (RSENSE in data sheet) should be used. If something other
+      but a 30 mOhm resistor is used the resistance value should be given
+      here in micro Ohms.
+    default: 30000
 
   regulators:
     $ref: /schemas/regulator/rohm,bd71815-regulator.yaml
@@ -67,7 +67,7 @@ properties:
 
   gpio-reserved-ranges:
     description: |
-      Usage of BD71828 GPIO pins can be changed via OTP. This property can be
+      Usage of BD71815 GPIO pins can be changed via OTP. This property can be
       used to mark the pins which should not be configured for GPIO. Please see
       the ../gpio/gpio.txt for more information.
 
@@ -113,7 +113,7 @@ examples:
             gpio-controller;
             #gpio-cells = <2>;
 
-            rohm,charger-sense-resistor-ohms = <10000000>;
+            rohm,charger-sense-resistor-micro-ohms = <10000>;
 
             regulators {
                 buck1: buck1 {

base-commit: 2d5404caa8c7bb5c4e0435f94b28834ae5456623
-- 
2.47.0


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] dt-bindings: mfd: bd71815: Fix rsense and typos
  2024-11-12 17:01 [PATCH] dt-bindings: mfd: bd71815: Fix rsense and typos Matti Vaittinen
@ 2024-11-12 17:45 ` Conor Dooley
  2024-12-11 12:48 ` (subset) " Lee Jones
  1 sibling, 0 replies; 3+ messages in thread
From: Conor Dooley @ 2024-11-12 17:45 UTC (permalink / raw)
  To: Matti Vaittinen
  Cc: Matti Vaittinen, Lee Jones, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Andreas Kemnade, devicetree, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 747 bytes --]

On Tue, Nov 12, 2024 at 07:01:06PM +0200, Matti Vaittinen wrote:
> The sense resistor used for measuring currents is typically some tens of
> milli Ohms. It has accidentally been documented to be tens of mega Ohms.
> Fix the size of this resistor and a few copy-paste errors while at it.
> 
> Drop the unsuitable 'rohm,charger-sense-resistor-ohms' property (which
> can't represent resistors smaller than one Ohm), and introduce a new
> 'rohm,charger-sense-resistor-micro-ohms' property with appropriate
> minimum, maximum and default values instead.
> 
> Fixes: 4238dc1e6490 ("dt_bindings: mfd: Add ROHM BD71815 PMIC")
> Signed-off-by: Matti Vaittinen <mazziesaccount@gmail.com>

Acked-by: Conor Dooley <conor.dooley@microchip.com>

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: (subset) [PATCH] dt-bindings: mfd: bd71815: Fix rsense and typos
  2024-11-12 17:01 [PATCH] dt-bindings: mfd: bd71815: Fix rsense and typos Matti Vaittinen
  2024-11-12 17:45 ` Conor Dooley
@ 2024-12-11 12:48 ` Lee Jones
  1 sibling, 0 replies; 3+ messages in thread
From: Lee Jones @ 2024-12-11 12:48 UTC (permalink / raw)
  To: Matti Vaittinen, Matti Vaittinen
  Cc: Lee Jones, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Andreas Kemnade, devicetree, linux-kernel

On Tue, 12 Nov 2024 19:01:06 +0200, Matti Vaittinen wrote:
> The sense resistor used for measuring currents is typically some tens of
> milli Ohms. It has accidentally been documented to be tens of mega Ohms.
> Fix the size of this resistor and a few copy-paste errors while at it.
> 
> Drop the unsuitable 'rohm,charger-sense-resistor-ohms' property (which
> can't represent resistors smaller than one Ohm), and introduce a new
> 'rohm,charger-sense-resistor-micro-ohms' property with appropriate
> minimum, maximum and default values instead.
> 
> [...]

Applied, thanks!

[1/1] dt-bindings: mfd: bd71815: Fix rsense and typos
      commit: 4341de296cfb2c2e46bd770ae1c94867d6c97bf2

--
Lee Jones [李琼斯]


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-12-11 12:48 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-11-12 17:01 [PATCH] dt-bindings: mfd: bd71815: Fix rsense and typos Matti Vaittinen
2024-11-12 17:45 ` Conor Dooley
2024-12-11 12:48 ` (subset) " Lee Jones

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox