Linux Power Management development
 help / color / mirror / Atom feed
* [PATCH v2 0/2] iio: adc: rzt2h: Make POWER_SEQUENCING dependency optional
@ 2026-11-26  8:11 Chen-Yu Tsai
  2026-11-26  8:11 ` [PATCH v2 1/2] power: sequencing: Allow desc=NULL in enable/disable stub functions Chen-Yu Tsai
  2026-11-26  8:11 ` [PATCH v2 2/2] iio: adc: rzt2h: depend on POWER_SEQUENCING instead of selecting it Chen-Yu Tsai
  0 siblings, 2 replies; 6+ messages in thread
From: Chen-Yu Tsai @ 2026-11-26  8:11 UTC (permalink / raw)
  To: Bartosz Golaszewski, Cosmin Tanislav, Jonathan Cameron,
	David Lechner, Nuno Sá, Andy Shevchenko
  Cc: Chen-Yu Tsai, linux-pm, linux-iio, linux-renesas-soc,
	Lad Prabhakar, Geert Uytterhoeven

Hi folks,

This is v2 of making the POWER_SEQUENCING dependency for RZT2H_ADC optional.

Changes since v1:
- Added blank lines before return statements in patch 1 (Bartosz)
- Collected Biju's Reviewed-by tag on patch 1
- Link to v1:
  https://lore.kernel.org/all/20261123113755.3033436-1-wenst@chromium.org/

Commit bdfc454e8567 ("iio: adc: rzt2h: Add support for RZ/V2H(P) SoC")
in the IIO tree added power sequencing support to the rzt2h_adc driver
and made rzt2h_adc select POWER_SEQUENCING. When combined with the
in-flight USB core power sequencing integration [1], this introduces a
recursive Kconfig dependency:

	error: recursive dependency detected!
		symbol USB depends on POWER_SEQUENCING
		symbol POWER_SEQUENCING is selected by RZT2H_ADC
		symbol RZT2H_ADC depends on IIO
		symbol IIO is implied by HID_MCP2221
		symbol HID_MCP2221 depends on USB_HID
		symbol USB_HID depends on USB

Since RZ/T2H and RZ/N2H do not use a power sequencer, rzt2h_adc does not
strictly require POWER_SEQUENCING at build time and can use an optional
dependency instead. However, rzt2h_adc calls pwrseq_{enable,disable}()
unconditionally in its runtime PM callbacks with adc->pwrseq == NULL on
RZ/T2H and RZ/N2H, whereas the !CONFIG_POWER_SEQUENCING stubs currently
return -ENOSYS even for a NULL descriptor.

Patch 1 aligns the pwrseq_{enable,disable}() stubs with the core
implementation so they act as no-ops (returning 0) when desc is NULL.

Patch 2 switches rzt2h_adc from selecting POWER_SEQUENCING to an
optional dependency on it.

Patch 2 relies on patch 1 at runtime when POWER_SEQUENCING=n on RZ/T2H
and RZ/N2H. On v1, Bartosz noted he would "prefer to pick up patch 1/2
and provide an immutable branch to the IIO subsystem".


Thanks
ChenYu

[1] https://lore.kernel.org/all/20260916075745.3549953-1-wenst@chromium.org/


Chen-Yu Tsai (2):
  power: sequencing: Allow desc=NULL in enable/disable stub functions
  iio: adc: rzt2h: depend on POWER_SEQUENCING instead of selecting it

 drivers/iio/adc/Kconfig         | 2 +-
 include/linux/pwrseq/consumer.h | 6 ++++++
 2 files changed, 7 insertions(+), 1 deletion(-)

-- 
2.56.1.839.g22a8290db9-goog


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2026-11-26 12:39 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-26  8:11 [PATCH v2 0/2] iio: adc: rzt2h: Make POWER_SEQUENCING dependency optional Chen-Yu Tsai
2026-11-26  8:11 ` [PATCH v2 1/2] power: sequencing: Allow desc=NULL in enable/disable stub functions Chen-Yu Tsai
2026-11-26 11:45   ` Lad, Prabhakar
2026-11-26 12:39     ` Wolfram Sang
2026-11-26  8:11 ` [PATCH v2 2/2] iio: adc: rzt2h: depend on POWER_SEQUENCING instead of selecting it Chen-Yu Tsai
2026-11-26 11:52   ` Lad, Prabhakar

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox