[PATCH v4 03/14] power: sequencing: Add pwrseq_power_is_on()
Andy Shevchenko
andriy.shevchenko at linux.intel.com
Thu Jul 9 03:33:47 PDT 2026
On Thu, Jul 09, 2026 at 05:57:08PM +0800, Chen-Yu Tsai wrote:
> The power sequencing consumer API already does power on state tracking
> internally. Expose the state to consumers through pwrseq_power_is_on()
> so that they don't have to reimplement it locally.
...
> Side question: I wonder if making the !POWER_SEQUENCING return success
> would make developers' lives better? At least that is what the clk and
"the clk... mistakenly do."
> regulator consumer APIs do.
When the clock is optional, that is justified, but for non-optional cases it
makes life actually harder (see for IS_ERR_OR_NULL() checks against
devm_clk_*() cases, which Krzysztof targets this cycle to eliminate).
That said, if the pwrseq desc can be NULL and the API tolerates that,
then it might make sense, otherwise it has to return an error.
--
With Best Regards,
Andy Shevchenko
More information about the Linux-mediatek
mailing list