Re: [PATCH v5 03/16] power: sequencing: Add pwrseq_power_is_on()

Bartosz Golaszewski <[email protected]>
Newsgroups org.kernel.vger.linux-acpi,dev.linux.lists.driver-core,org.infradead.lists.linux-arm-kernel,org.infradead.lists.linux-mediatek,org.kernel.vger.linux-devicetree,org.kernel.vger.linux-kernel,org.kernel.vger.linux-pm,org.kernel.vger.linux-usb
Message-ID <CAMRc=Mcpu+k-zbY0bDf8q3_9o3qNsrt6uNCao5j3qQLnbjHYAQ@mail.gmail.com>
On Thu, 16 Jul 2026 11:39:19 +0200, Chen-Yu Tsai <[email protected]> said:
> On Thu, Jul 16, 2026 at 4:14 PM Bartosz Golaszewski <[email protected]> wrote:
>>

...

>>
>> There's one more use-case where the power state trully can be *unknown*.
>> Please look at the proposed new function from Loic[1]. Here we deal with
>> targets over which linux has no direct power control even though it may still
>> control some of its dependencies. This is where an UNKNOWN state may make
>> sense.
>>
>> This is where I also floated an idea of renaming pwrseq_power_on/off() to
>> pwrseq_vote_on/off() for better clarity of their purpose.
>
> OK. Would it make sense to revert to returning -EINVAL if the descriptor
> is NULL now, and then add a different error return value if !controllable
> in the future?
>

I don't think the latter part is needed. A non-controllable pwrseq descriptor
is still a valid object and has an address pointing to it. Returning -EINVAL
on NULL descriptors is probably all we need.

Bart
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.