From patchwork Thu Sep 22 10:12:09 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Quentin Schulz X-Patchwork-Id: 12984919 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 6069EC6FA86 for ; Thu, 22 Sep 2022 10:14:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=ys2Y4KTDqUwD0iO+09Ar9H+Y0xbi2vooKYE+ZedodTo=; b=YLHqhcn4gfpOdk JBQ5aD61reWPhOal8Ot4sOUJnD3vzY+BuVukxxyYU5XaijKzLLxNGWvNNaa6K2LH8ZdXq19TmZ82I FqwQj7apL4GfHnMkgZS/eDj2aOpTQ1nSKjXUQQBl5mUEQdRaejuPLQLyjOhqT0MbimT3uDRYDIMX8 iJ1pbQ9DXYV/txzBCTKolILqnRfRjXTt8X2cwe1+tVFzTQk3Uxnjd8oLnhTzDIwVaQ7I25idCdMqN UkagYhU79UnTa7VMqCPCAJRi0MmuMxHjo6daZqid+M5E/X1w7kntEPUBAJFPflbYkGFuAnIG2UI1E iIsp9/oXq2SmHyklluxQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1obJDH-00Er4r-Se; Thu, 22 Sep 2022 10:13:48 +0000 Received: from relay2-d.mail.gandi.net ([2001:4b98:dc4:8::222]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1obJCN-00EqZ3-FX; Thu, 22 Sep 2022 10:12:53 +0000 Received: (Authenticated sender: foss@0leil.net) by mail.gandi.net (Postfix) with ESMTPSA id BA06B40003; Thu, 22 Sep 2022 10:12:41 +0000 (UTC) From: Quentin Schulz To: Cc: robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, heiko@sntech.de, dmitry.torokhov@gmail.com, klaus.goger@theobroma-systems.com, foss+kernel@0leil.net, 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 Subject: [PATCH 1/3] Input: add `SW_BOOT_ALT` Date: Thu, 22 Sep 2022 12:12:09 +0200 Message-Id: <20220922101211.3215888-2-foss+kernel@0leil.net> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20220922101211.3215888-1-foss+kernel@0leil.net> References: <20220922101211.3215888-1-foss+kernel@0leil.net> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220922_031251_706250_A685F49F X-CRM114-Status: GOOD ( 13.40 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Quentin Schulz 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 --- 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) /*