All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/3] Fix compilation issue on regulator_common file
@ 2025-12-10 21:24 Julien Stephan
  2025-12-10 21:24 ` [PATCH 1/3] power: regulator: common: remove unnecessary debug trace Julien Stephan
                   ` (3 more replies)
  0 siblings, 4 replies; 9+ messages in thread
From: Julien Stephan @ 2025-12-10 21:24 UTC (permalink / raw)
  To: u-boot
  Cc: Jaehoon Chung, Peng Fan, Tom Rini, Tanmay Kathpalia, Ye Li,
	Dragan Simic, Jonas Karlman, David Lechner,
	GSS_MTK_Uboot_upstream, Julien Stephan

Hello,

If CONFIG_DM_GPIO is not enabled, compilation of
drivers/power/regulator/regulator_common.c  fails with the following
errors:

aarch64-none-linux-gnu-ld: drivers/power/regulator/regulator_common.o: in function `regulator_common_of_to_plat':
<...>/u-boot/drivers/power/regulator/regulator_common.c:30: undefined reference to `gpio_request_by_name'
aarch64-none-linux-gnu-ld: drivers/power/regulator/regulator_common.o: in function `regulator_common_get_enable':
<...>/u-boot/drivers/power/regulator/regulator_common.c:57: undefined reference to `dm_gpio_get_value'
aarch64-none-linux-gnu-ld: drivers/power/regulator/regulator_common.o: in function `regulator_common_set_enable':
<...>/u-boot/drivers/power/regulator/regulator_common.c:92: undefined reference to `dm_gpio_set_value'
make: *** [Makefile:2029: u-boot] Error 139

Since the enable gpio is optional we can conditionally skip these calls.

While at it, use dm_gpio_is_valid() helper function in
regulator_common_get_enable, and remove a debug message that checkpatch
--strict complains about:

  WARNING: Unnecessary ftrace-like logging - prefer using ftrace

The 2 fixes are done before the compilation issue fix in order to easily
cherry-pick them if needed

Signed-off-by: Julien Stephan <jstephan@baylibre.com>
---
Julien Stephan (3):
      power: regulator: common: remove unnecessary debug trace
      power: regulator: common: use dm_gpio_is_valid helper
      power: regulator: common: fix compilation issue

 drivers/power/regulator/regulator_common.c | 89 +++++++++++++++---------------
 1 file changed, 45 insertions(+), 44 deletions(-)
---
base-commit: c5e6d2ab7eba68cbfb600cdc131c0c375ced2ec9
change-id: 20251209-power-regulator-fix-compilation-5232b0365c7b

Best regards,
-- 
Julien Stephan <jstephan@baylibre.com>


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

end of thread, other threads:[~2025-12-11 10:08 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-12-10 21:24 [PATCH 0/3] Fix compilation issue on regulator_common file Julien Stephan
2025-12-10 21:24 ` [PATCH 1/3] power: regulator: common: remove unnecessary debug trace Julien Stephan
2025-12-11  8:27   ` Peng Fan
2025-12-10 21:24 ` [PATCH 2/3] power: regulator: common: use dm_gpio_is_valid helper Julien Stephan
2025-12-11  8:29   ` Peng Fan
2025-12-10 21:24 ` [PATCH 3/3] power: regulator: common: fix compilation issue Julien Stephan
2025-12-11  8:33   ` Peng Fan
2025-12-10 21:38 ` [PATCH 0/3] Fix compilation issue on regulator_common file Tom Rini
2025-12-11  8:39   ` Peng Fan

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.