From: Jeff LaBundy <jeff@labundy.com>
To: Quentin Schulz <foss+kernel@0leil.net>
Cc: robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org,
heiko@sntech.de, dmitry.torokhov@gmail.com,
klaus.goger@theobroma-systems.com, devicetree@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org,
linux-input@vger.kernel.org,
Quentin Schulz <quentin.schulz@theobroma-systems.com>
Subject: Re: [PATCH 1/3] Input: add `SW_BOOT_ALT`
Date: Thu, 22 Sep 2022 12:20:06 -0500 [thread overview]
Message-ID: <YyyZRt5j180KzGqc@nixie71> (raw)
In-Reply-To: <20220922101211.3215888-2-foss+kernel@0leil.net>
Hi Quentin,
On Thu, Sep 22, 2022 at 12:12:09PM +0200, Quentin Schulz wrote:
> From: Quentin Schulz <quentin.schulz@theobroma-systems.com>
>
> This event code represents the firmware source to use at boot.
> Value 0 means using "standard" firmware source, value 1 means using
> "alternative" firmware source.
>
> For example, some hardware has the ability to force the BOOTROM to load
> the bootloader from a secondary firmware source (say SD card) instead of
> trying with the standard first and then the secondary. This event allows
> the userspace to know which firmware source was requested *in hardware*.
>
> Signed-off-by: Quentin Schulz <quentin.schulz@theobroma-systems.com>
This does not seem like the right approach, especially since the switch
can easily be flipped after the state is already latched.
If the bootloader needs to pass information to the kernel (boot source or
otherwise), a safer and more flexible approach is to share some variables
in eMMC, or pass information using the kernel cmdline.
> ---
> include/linux/mod_devicetable.h | 2 +-
> include/uapi/linux/input-event-codes.h | 3 ++-
> 2 files changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/include/linux/mod_devicetable.h b/include/linux/mod_devicetable.h
> index 549590e9c644..009e71376a61 100644
> --- a/include/linux/mod_devicetable.h
> +++ b/include/linux/mod_devicetable.h
> @@ -326,7 +326,7 @@ struct pcmcia_device_id {
> #define INPUT_DEVICE_ID_LED_MAX 0x0f
> #define INPUT_DEVICE_ID_SND_MAX 0x07
> #define INPUT_DEVICE_ID_FF_MAX 0x7f
> -#define INPUT_DEVICE_ID_SW_MAX 0x10
> +#define INPUT_DEVICE_ID_SW_MAX 0x11
> #define INPUT_DEVICE_ID_PROP_MAX 0x1f
>
> #define INPUT_DEVICE_ID_MATCH_BUS 1
> diff --git a/include/uapi/linux/input-event-codes.h b/include/uapi/linux/input-event-codes.h
> index dff8e7f17074..8cd2b58c81d7 100644
> --- a/include/uapi/linux/input-event-codes.h
> +++ b/include/uapi/linux/input-event-codes.h
> @@ -917,7 +917,8 @@
> #define SW_MUTE_DEVICE 0x0e /* set = device disabled */
> #define SW_PEN_INSERTED 0x0f /* set = pen inserted */
> #define SW_MACHINE_COVER 0x10 /* set = cover closed */
> -#define SW_MAX 0x10
> +#define SW_BOOT_ALT 0x11 /* set = alternative boot firmware source */
> +#define SW_MAX 0x11
> #define SW_CNT (SW_MAX+1)
>
> /*
> --
> 2.37.3
>
Kind regards,
Jeff LaBundy
next prev parent reply other threads:[~2022-09-22 17:20 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20220922101211.3215888-1-foss+kernel@0leil.net>
2022-09-22 10:12 ` [PATCH 1/3] Input: add `SW_BOOT_ALT` Quentin Schulz
2022-09-22 17:20 ` Jeff LaBundy [this message]
2022-09-23 8:25 ` Quentin Schulz
2022-09-23 17:19 ` Jeff LaBundy
2022-09-23 17:24 ` Dmitry Torokhov
2022-09-26 9:37 ` Quentin Schulz
2022-09-27 1:56 ` Jeff LaBundy
2022-09-27 8:51 ` Quentin Schulz
2022-09-27 12:57 ` Robin Murphy
2022-09-22 10:12 ` [PATCH 2/3] arm64: dts: rockchip: add PX30-µQ7 (Ringneck) SoM with Haikou baseboard Quentin Schulz
2022-09-22 11:56 ` Quentin Schulz
2022-09-22 12:45 ` Krzysztof Kozlowski
2022-09-23 9:55 ` Quentin Schulz
2022-09-23 10:28 ` Krzysztof Kozlowski
2022-09-22 10:12 ` [PATCH 3/3] dt-bindings: arm: rockchip: add Theobroma Systems PX30-µQ7 (Ringneck) with Haikou Quentin Schulz
2022-09-22 12:40 ` Krzysztof Kozlowski
2022-09-22 12:41 ` Krzysztof Kozlowski
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=YyyZRt5j180KzGqc@nixie71 \
--to=jeff@labundy.com \
--cc=devicetree@vger.kernel.org \
--cc=dmitry.torokhov@gmail.com \
--cc=foss+kernel@0leil.net \
--cc=heiko@sntech.de \
--cc=klaus.goger@theobroma-systems.com \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rockchip@lists.infradead.org \
--cc=quentin.schulz@theobroma-systems.com \
--cc=robh+dt@kernel.org \
/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;
as well as URLs for NNTP newsgroup(s).