public inbox for devicetree@vger.kernel.org
 help / color / mirror / Atom feed
From: Svyatoslav Ryhel <clamor95@gmail.com>
To: Guenter Roeck <linux@roeck-us.net>,
	Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Cc: Jean Delvare <jdelvare@suse.com>,
	Rob Herring <robh+dt@kernel.org>,
	Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
	Liam Girdwood <lgirdwood@gmail.com>,
	Mark Brown <broonie@kernel.org>,
	linux-hwmon@vger.kernel.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v1 1/2] dt-bindings: hwmon: ina2xx: add supply property
Date: Wed, 08 Mar 2023 13:54:14 +0200	[thread overview]
Message-ID: <0BB6AD07-D102-4DF2-ADBD-C1A6473A1019@gmail.com> (raw)
In-Reply-To: <2b012916-3955-6c4a-a74b-1e86eaa19485@roeck-us.net>



8 березня 2023 р. 13:35:46 GMT+02:00, Guenter Roeck <linux@roeck-us.net> написав(-ла):
>On 3/8/23 02:32, Svyatoslav Ryhel wrote:
>> ср, 8 бер. 2023 р. о 12:27 Krzysztof Kozlowski
>> <krzysztof.kozlowski@linaro.org> пише:
>>> 
>>> On 08/03/2023 10:40, Svyatoslav Ryhel wrote:
>>>> Add supply property.
>>> 
>>> You have entire commit msg to explain and give background, but instead
>>> there is just sentence duplicating subject. And since you did not
>>> explain anything, we have questions... like: INA238 does not have VDD,
>>> so this does not look correct.
>>> 
>> 
>> This is why a regulator is not mandatory. If ina238 does not have vdd
>> then one who needs ina238 may omit this prop. How about looking from
>> this perspective?
>> 
>
>If a chip does not have VDD, the driver should not even try to get it
>for that chip. INS238 is supported by a different driver, so that does
>not require special code, but it needs to be spelled out in the devicetree
>bindings. Devicetree has a means to specify if a property is valid for
>a given device.
>
>Having said this, as it turns out, _none_ of the chips supported by
>the ina2xx and the ina238 drivers have VDD. All of them have Vs, and
>all but INA219 have Vbus. The bindings don't even explain which one
>of those is supposed to refer to "VDD".
>

So you refer to vdd as to a real name. Now I understand this misunderstand. Regulator I am interested in is Vs. Since you confirmed that Vs is supported by all ina2xx there should be no contraversions further.

>Also, regulator_get_optional() returns -ENODEV if CONFIG_REGULATOR
>is not enabled, so it isn't entirely optional. We can not suddenly fail
>to load the driver on systems with CONFIG_REGULATOR=n, so some conditional
>code will unfortunately be necessary.
>
>Guenter
>

Hm, then Lars-Peter Clausen suggestion should be applicable in this case.

>>> 
>>> Best regards,
>>> Krzysztof
>>> 
>> 
>> Best regards,
>> Svyatoslav R.
>

  reply	other threads:[~2023-03-08 11:55 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-08  9:40 [PATCH v1 0/2] Add optional power supply for INA2XX Svyatoslav Ryhel
2023-03-08  9:40 ` [PATCH v1 1/2] dt-bindings: hwmon: ina2xx: add supply property Svyatoslav Ryhel
2023-03-08 10:27   ` Krzysztof Kozlowski
2023-03-08 10:32     ` Svyatoslav Ryhel
2023-03-08 10:36       ` Krzysztof Kozlowski
2023-03-08 11:35       ` Guenter Roeck
2023-03-08 11:54         ` Svyatoslav Ryhel [this message]
2023-03-08 12:54   ` Mark Brown
2023-03-08 12:58     ` Svyatoslav Ryhel
2023-03-08 13:13       ` Krzysztof Kozlowski
2023-03-08 13:46       ` Mark Brown
2023-03-08 14:01         ` Svyatoslav Ryhel
2023-03-08 14:37           ` Krzysztof Kozlowski
2023-03-08 14:38           ` Mark Brown
2023-03-08  9:40 ` [PATCH v1 2/2] hwmon: ina2xx: add optional regulator support Svyatoslav Ryhel
2023-03-08 10:25   ` Krzysztof Kozlowski
2023-03-08 10:35     ` Svyatoslav Ryhel
2023-03-08 10:37       ` Krzysztof Kozlowski
2023-03-08 11:13       ` Guenter Roeck
2023-03-08 11:19         ` Svyatoslav Ryhel
2023-03-08 11:32           ` Lars-Peter Clausen

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=0BB6AD07-D102-4DF2-ADBD-C1A6473A1019@gmail.com \
    --to=clamor95@gmail.com \
    --cc=broonie@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=jdelvare@suse.com \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=krzysztof.kozlowski@linaro.org \
    --cc=lgirdwood@gmail.com \
    --cc=linux-hwmon@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@roeck-us.net \
    --cc=robh+dt@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