mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Matti Vaittinen <mazziesaccount@gmail.com>
To: Andreas Kemnade <andreas@kemnade.info>,
	lee@kernel.org, robh@kernel.org, krzk+dt@kernel.org,
	conor+dt@kernel.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org
Cc: sre@kernel.org
Subject: Re: [PATCH] dt-bindings: mfd: bd71828: Use charger resistor in mOhm instead of MOhm
Date: Tue, 29 Oct 2024 15:00:45 +0200	[thread overview]
Message-ID: <65fbbdec-3746-4f8c-b3a4-46ab29938339@gmail.com> (raw)
In-Reply-To: <20241029111112.33386-1-andreas@kemnade.info>

On 29/10/2024 13:11, Andreas Kemnade wrote:
> Apparently there was some confusion regarding milliohm vs. megaohm.
> (m/M). Use microohms to be able to properly specify the charger
> resistor like other drivers do. This is not used yet by mainline code
> yet. Specify a current sense resistor in milliohms range rathes then
> megaohms range in the examples.
> 
> CC: sre@kernel.org
> Reported-by: Matti Vaittinen <mazziesaccount@gmail.com>
> Closes: https://lore.kernel.org/imx/6dcd724a-a55c-4cba-a45b-21e76b1973b0@gmail.com/T/#mf590875a9f4d3955cd1041d7196ff0c65c0a7e9d
> Signed-off-by: Andreas Kemnade <andreas@kemnade.info>

Thanks a ton Andreas :) Maybe a
Fixes: 1af5332fcf7c ("dt-bindings: mfd: Document ROHM BD71828 bindings")
as well?

[I just pushed something like this (but untested) in my repo - but I 
missed updating the example!]

Reviewed-by: Matti Vaittinen <mazziesaccount@gmail.com>

> ---
>   .../devicetree/bindings/mfd/rohm,bd71828-pmic.yaml  | 13 +++++++------
>   1 file changed, 7 insertions(+), 6 deletions(-)
> 
> diff --git a/Documentation/devicetree/bindings/mfd/rohm,bd71828-pmic.yaml b/Documentation/devicetree/bindings/mfd/rohm,bd71828-pmic.yaml
> index fa17686a64f7..09e7d68e92bf 100644
> --- a/Documentation/devicetree/bindings/mfd/rohm,bd71828-pmic.yaml
> +++ b/Documentation/devicetree/bindings/mfd/rohm,bd71828-pmic.yaml
> @@ -55,14 +55,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
> +    default: 30000
>       description: |
>         BD71827 and BD71828 have SAR ADC for measuring charging currents.
>         External sense resistor (RSENSE in data sheet) should be used. If some
> -      other but 30MOhm resistor is used the resistance value should be given
> -      here in Ohms.
> +      other but 30mOhm resistor is used the resistance value should be given
> +      here in microohms.
>   
>     regulators:
>       $ref: /schemas/regulator/rohm,bd71828-regulator.yaml
> @@ -114,7 +115,7 @@ examples:
>               #gpio-cells = <2>;
>               gpio-reserved-ranges = <0 1>, <2 1>;
>   
> -            rohm,charger-sense-resistor-ohms = <10000000>;
> +            rohm,charger-sense-resistor-micro-ohms = <10000>;
>   
>               regulators {
>                   buck1: BUCK1 {


  reply	other threads:[~2024-10-29 13:00 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-29 11:11 Andreas Kemnade
2024-10-29 13:00 ` Matti Vaittinen [this message]
2024-11-01 19:27 ` Rob Herring
2024-11-04  6:06   ` Matti Vaittinen
2024-11-11 10:31     ` Andreas Kemnade
2024-11-12  5:42       ` Matti Vaittinen
2024-11-04  9:00   ` Andreas Kemnade

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=65fbbdec-3746-4f8c-b3a4-46ab29938339@gmail.com \
    --to=mazziesaccount@gmail.com \
    --cc=andreas@kemnade.info \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=krzk+dt@kernel.org \
    --cc=lee@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=robh@kernel.org \
    --cc=sre@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®