From: Patrick DELAUNAY <patrick.delaunay@foss.st.com>
To: Marek Vasut <marex@denx.de>, <u-boot@lists.denx.de>
Cc: Patrice Chotard <patrice.chotard@foss.st.com>
Subject: Re: [PATCH] ARM: dts: stm32: Configure Buck3 voltage per PMIC NVM on Avenger96
Date: Tue, 17 May 2022 17:32:15 +0200 [thread overview]
Message-ID: <9cd020e4-b5e8-cf1a-180d-6ee556dad878@foss.st.com> (raw)
In-Reply-To: <2c087855-c4a7-a66d-c504-d6f91f4afbbf@denx.de>
On 5/17/22 16:32, Marek Vasut wrote:
> On 5/17/22 15:43, Patrick DELAUNAY wrote:
>> Hi,
>
> Hi,
>
>>>>> +static int board_get_regulator_buck3_nvm_uv_av96(int *uv)
>>>>> +{
>>>>> + const void *fdt = gd->fdt_blob;
>>>>> + struct udevice *dev;
>>>>> + u8 bucks_vout = 0;
>>>>> + const char *prop;
>>>>> + int len, ret;
>>>>> +
>>>>> + /* Check whether this is Avenger96 board. */
>>>>> + prop = fdt_getprop(fdt, 0, "compatible", &len);
>>>>
>>>>
>>>> This API is not compatible with CONFIG_OF_LIVE
>>>>
>>>> consider replacement with ofnode_read_prop or with
>>>> of_machine_is_compatible, for example
>>>>
>>>> if (!of_machine_is_compatible(prop, "arrow,stm32mp15xx-avenger96"))
>>>> return -EINVAL;
>>>
>>> I explicitly don't want to use of_machine_is_compatible, I need to
>>> search for the avenger96 substring in the machine compatible, since
>>> the stm32mp15xx can be anything (15{1,3,7}{a,d}) and it might not
>>> even have the arrow prefix.
>>
>>
>> Ok, I check on existing DT and I found only on compatible with
>> "avenger96" string.
>>
>> arch/arm/dts/stm32mp15xx-dhcor-avenger96.dts:15:
>>
>> compatible = "arrow,stm32mp15xx-avenger96", "st,stm32mp15x";
>>
>> But you can forget my proposal with of_machine_is_compatible, consider:
>>
>> prop = ofnode_read_prop(ofnode_root(), "compatible", &len);
>>
>>
>> But it is just minor remark.
>
> There are multiple other fdt_getprop() calls in both board/st/ and
> board/dh , maybe if you want to do OF_LIVE enablement (do you?), let's
> convert them all at once ?
Ok. It is more a minor remark linked to checkpatch warning for all the
added code:
"Use the livetree API (dev_read_...)"
I let you handle OF_LIVE for your boards (code & defconfig),
FYI: it is already enable for STMicroelectronics boards (defconfig and
in driver, mach-stm32mp and board code).
>
>> Do you expect this patch for next pull-request for v2022.07 or for
>> next ?
>
> Ideally 2022.07.
Ok, I plan that.
Patrick
next prev parent reply other threads:[~2022-05-17 15:32 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-11 21:09 [PATCH] ARM: dts: stm32: Configure Buck3 voltage per PMIC NVM on Avenger96 Marek Vasut
2022-05-17 12:39 ` Patrick DELAUNAY
2022-05-17 12:53 ` Marek Vasut
2022-05-17 13:43 ` Patrick DELAUNAY
2022-05-17 14:32 ` Marek Vasut
2022-05-17 15:32 ` Patrick DELAUNAY [this message]
2022-05-17 15:52 ` Marek Vasut
2022-05-18 16:53 ` Patrick DELAUNAY
2022-05-18 17:03 ` Marek Vasut
2022-05-19 16:59 ` Patrick DELAUNAY
2022-05-20 7:20 ` Patrick DELAUNAY
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=9cd020e4-b5e8-cf1a-180d-6ee556dad878@foss.st.com \
--to=patrick.delaunay@foss.st.com \
--cc=marex@denx.de \
--cc=patrice.chotard@foss.st.com \
--cc=u-boot@lists.denx.de \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.