[PATCH v2 2/3] mtd: spi-nor: support vcc-supply regulator
Tudor Ambarus
tudor.ambarus at linaro.org
Tue Oct 29 02:50:07 PDT 2024
On 10/7/24 8:50 AM, Michael Walle wrote:
> Hi,
>
>>>> + ret = devm_regulator_get_enable(dev, "vcc");
>>>> + if (ret)
>>>> + return ret;
>>>> +
>>>
>>> What happens if the SPI-NOR doesn't have a "vcc" regulator?
>>
>> ...the SPI-NOR will use the dummy regulator.
>
> Which then prints a warning "using dummy regulator". Is that the
> usual way to go?
> I mean the regulator is actually mandatory because it is the main
> voltage rail for the flash. To get rid of the warning one can add a
> fixed-regulator (which is correct anyway). But OTOH, the device tree
I think it's fine to have the warning. It will help people write a
better device tree.
> lists it as optional (marking it as required isn't an option either
> because virtually all device trees won't have that property).
>
> -michael
More information about the linux-mtd
mailing list