From patchwork Fri Sep 13 12:30:55 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Marek_Beh=C3=BAn?= X-Patchwork-Id: 828516 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id DC0E01DA0EA; Fri, 13 Sep 2024 12:31:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1726230682; cv=none; b=PThQ3dTHoPbiRtiHcFESuOfKss7/+sZy7cag178eG9tRvKH8cxEv2oVVGicSobbgvrRhGiZQfV1vOLB/6LPbxDYDpU/lizWHE0XymjEx6cq6DpVlbXW1BdXi779o4pT6UEp+moq6g2PlgTcvRKrHEFAIYtlkdJJUfzkD0iobjLM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1726230682; c=relaxed/simple; bh=S/tehr0UqsyEPKT6uUh6GVtGPKIFAxLsm2v5FR1uRNw=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=jsFwNOAP+njFXHZD8gdpgR7Bz/hrfLRueaZWp7G/vn5QPiFeZbf4vmQl1V1E1A9FDZSFhxguG4eniJYRMNoAZNX1OqSguwAbvNB17p2lf8qlEsjmUtX3ugGMqBj+ACHBHrGUSxyExaYV+J8+eWOs7kXp2VcN1nLefsLNBfaOMts= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=ZXNndLZk; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="ZXNndLZk" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 05C1CC4CECF; Fri, 13 Sep 2024 12:31:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1726230681; bh=S/tehr0UqsyEPKT6uUh6GVtGPKIFAxLsm2v5FR1uRNw=; h=From:To:List-Id:Cc:Subject:Date:In-Reply-To:References:From; b=ZXNndLZkHlaUYcqiXmzw9nDdMZECWl/1D7iXu9HkNJYnFUXDPLXBkOel61xyI36xM XM4TH93uXrdxVib3n66Iq57jj7F1AcXgvf+7Z3PJlnljMEcnIBuwIhgCg9HEz1sxc8 vN9bWT9PLEksREFwu43SOdjIcN15kNu9xF7NPXKW9W/akMOyYDPxnIP2Od3zFX/fL/ cocA+5xIwSfNILVrwbN5UbN68vObO59chM7nrckt5bHxgWtd+fo+I9+VKI/ZYn+q+Z C15d4mIpBRxYhG52OmdzEu5ibYep2/omItZlmNbK9usSuYvAZVEXD4Px/B0vyHtNHZ XwZkWECyPvlLA== From: =?utf-8?q?Marek_Beh=C3=BAn?= To: Lee Jones Cc: Pavel Machek , linux-leds@vger.kernel.org, Arnd Bergmann , soc@kernel.org, Gregory CLEMENT , arm@kernel.org, Andy Shevchenko , Hans de Goede , =?utf-8?q?Ilpo_J=C3=A4rvinen?= , Andrew Lunn , Sebastian Hesselbarth , Rob Herring , Krzysztof Kozlowski , Conor Dooley , devicetree@vger.kernel.org, =?utf-8?q?M?= =?utf-8?q?arek_Beh=C3=BAn?= Subject: [PATCH leds v3 03/11] turris-omnia-mcu-interface.h: Add LED commands related definitions to global header Date: Fri, 13 Sep 2024 14:30:55 +0200 Message-ID: <20240913123103.21226-4-kabel@kernel.org> X-Mailer: git-send-email 2.44.2 In-Reply-To: <20240913123103.21226-1-kabel@kernel.org> References: <20240913123103.21226-1-kabel@kernel.org> Precedence: bulk X-Mailing-List: linux-leds@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Add definitions for contents of the OMNIA_CMD_LED_MODE and OMNIA_CMD_LED_STATE commands to the global turris-omnia-mcu-interface.h header. Signed-off-by: Marek BehĂșn --- include/linux/turris-omnia-mcu-interface.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/include/linux/turris-omnia-mcu-interface.h b/include/linux/turris-omnia-mcu-interface.h index b587549141cb..bac275b0ae42 100644 --- a/include/linux/turris-omnia-mcu-interface.h +++ b/include/linux/turris-omnia-mcu-interface.h @@ -239,6 +239,18 @@ enum omnia_int_e { OMNIA_INT_LAN5_LED1 = BIT(31), }; +enum omnia_cmd_led_mode_e { + OMNIA_CMD_LED_MODE_LED_MASK = GENMASK(3, 0), +#define OMNIA_CMD_LED_MODE_LED(_l) FIELD_PREP(OMNIA_CMD_LED_MODE_LED_MASK, _l) + OMNIA_CMD_LED_MODE_USER = BIT(4), +}; + +enum omnia_cmd_led_state_e { + OMNIA_CMD_LED_STATE_LED_MASK = GENMASK(3, 0), +#define OMNIA_CMD_LED_STATE_LED(_l) FIELD_PREP(OMNIA_CMD_LED_STATE_LED_MASK, _l) + OMNIA_CMD_LED_STATE_ON = BIT(4), +}; + enum omnia_cmd_poweroff_e { OMNIA_CMD_POWER_OFF_POWERON_BUTTON = BIT(0), OMNIA_CMD_POWER_OFF_MAGIC = 0xdead,