From: Andre Przywara <andre.przywara@arm.com>
To: Arnaud Ferraris <arnaud.ferraris@collabora.com>
Cc: u-boot@lists.denx.de, Jagan Teki <jagan@amarulasolutions.com>,
Samuel Holland <samuel@sholland.org>,
Maxime Ripard <mripard@kernel.org>
Subject: Re: [PATCH 1/2] board: sunxi: enable status LED early
Date: Tue, 7 Sep 2021 00:46:44 +0100 [thread overview]
Message-ID: <20210907004644.290710e8@slackpad.fritz.box> (raw)
In-Reply-To: <20210906205753.176175-2-arnaud.ferraris@collabora.com>
On Mon, 6 Sep 2021 22:57:52 +0200
Arnaud Ferraris <arnaud.ferraris@collabora.com> wrote:
Hi Arnaud,
> For some systems, such as the PinePhone, there is no way for the end
> user to make sure the system is indeed booting before the boot script is
> executed, which takes several seconds. Therefore, it can be useful to
> provide early visual feedback as soon as possible.
>
> In order achieve this goal, this patch initializes the status LED (if
> configured) in the SPL.
Thanks for sending this, it looks much better than the previous
attempt on the list from earlier this year.
> Signed-off-by: Arnaud Ferraris <arnaud.ferraris@collabora.com>
> ---
> board/sunxi/board.c | 7 +++++++
> 1 file changed, 7 insertions(+)
>
> diff --git a/board/sunxi/board.c b/board/sunxi/board.c
> index 1a46100e40..6e0bf5fbf9 100644
> --- a/board/sunxi/board.c
> +++ b/board/sunxi/board.c
> @@ -46,6 +46,9 @@
> #include <spl.h>
> #include <sy8106a.h>
> #include <asm/setup.h>
> +#if defined(CONFIG_LED_STATUS) && defined(CONFIG_SPL_DRIVERS_MISC)
> +#include <status_led.h>
status_led.h already guards for CONFIG_LED_STATUS, so you can just
unconditionally include this here, no #ifdefs needed.
> +#endif
>
> #if defined CONFIG_VIDEO_LCD_PANEL_I2C && !(defined CONFIG_SPL_BUILD)
> /* So that we can use pin names in Kconfig and sunxi_name_to_gpio() */
> @@ -672,6 +675,10 @@ void sunxi_board_init(void)
> {
> int power_failed = 0;
>
> +#if defined(CONFIG_LED_STATUS) && defined(CONFIG_SPL_DRIVERS_MISC)
Unfortunately status_led.h doesn't define a dummy prototype for this,
so we need the #ifdef CONFIG_LED_STATUS. But I don't think you need
CONFIG_SPL_DRIVERS_MISC here. If that should only trigger in the SPL, use:
if (IS_ENABLED(CONFIG_SPL_BUILD))
status_led_init();
Cheers,
Andre
> + status_led_init();
> +#endif
> +
> #ifdef CONFIG_SY8106A_POWER
> power_failed = sy8106a_set_vout1(CONFIG_SY8106A_VOUT1_VOLT);
> #endif
next prev parent reply other threads:[~2021-09-06 23:47 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-09-06 20:57 [PATCH] PinePhone: enable LED on boot for improved visual feedback Arnaud Ferraris
2021-09-06 20:57 ` [PATCH 1/2] board: sunxi: enable status LED early Arnaud Ferraris
2021-09-06 23:46 ` Andre Przywara [this message]
2021-09-07 11:41 ` Arnaud Ferraris
2021-09-07 22:42 ` Andre Przywara
2021-09-06 20:57 ` [PATCH 2/2] pinephone_defconfig: add support for early-boot status LED Arnaud Ferraris
2021-09-06 23:46 ` Andre Przywara
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210907004644.290710e8@slackpad.fritz.box \
--to=andre.przywara@arm.com \
--cc=arnaud.ferraris@collabora.com \
--cc=jagan@amarulasolutions.com \
--cc=mripard@kernel.org \
--cc=samuel@sholland.org \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox