[PATCH v5 03/16] power: sequencing: Add pwrseq_power_is_on()
Bartosz Golaszewski
brgl at kernel.org
Thu Jul 16 05:39:55 PDT 2026
On Thu, 16 Jul 2026 11:39:19 +0200, Chen-Yu Tsai <wenst at chromium.org> said:
> On Thu, Jul 16, 2026 at 4:14 PM Bartosz Golaszewski <brgl at kernel.org> 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
More information about the Linux-mediatek
mailing list