From patchwork Mon Jun 13 09:51:49 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Potin Lai X-Patchwork-Id: 12879254 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 0C9E1C43334 for ; Mon, 13 Jun 2022 09:58:13 +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:MIME-Version:List-Subscribe:List-Help: List-Post:List-Archive:List-Unsubscribe:List-Id: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=ZhN70Mxsi59pKP9huFQsSxt0okpPQ2dnHm0tLWDGRxw=; b=V0hODZScdoLYAK YqLPtEu5RomXA/5JEM5v0UHFTH1qm6gQeifz9lVEB+buLt+LnA9wIS+xxkSalmLGYXEtE122486cr mlbphjldwiDVAeuMEJ9FNzf+YH+VNeoVlIH7jIuR4LMPZ9ZGwGO2bWaSez5MkZvS8Zjgy3hrGVJWi A6TzlccPp8wOpNwNRbjdFDgF8jijyWpzK5VsV+jAj6Hf2ZMdRSqSn69kcFs4JtMJXg+v0NTFjQ6n4 R7T6VHKsyclHklFRTg87Xc8ttbn/pNEz1+yTXgI8hJGyHDn74fUqz1OOVStpkFk3UDSO21WP1MPBf b11o3raWPZ+otYppVPww==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1o0go8-002hCD-Ed; Mon, 13 Jun 2022 09:56:28 +0000 Received: from mail-pl1-x62c.google.com ([2607:f8b0:4864:20::62c]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1o0glq-002fzm-Ki for linux-arm-kernel@lists.infradead.org; Mon, 13 Jun 2022 09:54:08 +0000 Received: by mail-pl1-x62c.google.com with SMTP id u18so4677850plb.3 for ; Mon, 13 Jun 2022 02:54:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=u0NPneZZ9r0x4Kp8TclBRmjdl0tXAndSbSU1SBOWrP4=; b=aZRWYoBcDfcD6fB9QGEddxaw1as+HrnOVFyOdoq0/lJ7Xsy3XmVMhiUC3Dck89rqxg dQEXNHsXxoZsBMoNRVv/Mk7nL7nRICE9qlEhypAdGv8JP+CiPFz7fsrMRSrmRVzBYhqV 69k+OEhlN2HJIPP1Ntll+fh/tLs49QUl1L6nLH2l20o8Nkj2Exs1Pz39AN71391pNTeO Hh7BqBYYNWMDgd6BQkDsfORl4SaQaI2Nd1QlXAcIlstHkWFbf2sQALiDom25ttP6/EyA eo5QbnAOlicF6qcgGrJXJryjxKq85Xfe16a0lq44zoMpuYlj7+9bhRsk34LL0bqjmxAu xyvw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=u0NPneZZ9r0x4Kp8TclBRmjdl0tXAndSbSU1SBOWrP4=; b=hGLmFzgAQ5uqeIG3KbshKeFNI+Fw1A/vBxKqozEmCTM45CgAT+/9CGVc6+91g/M1Ta 86YItF81h01tVcZ2au6DQ5G0up5TM6nbXoeOQgTCHO/CjzbPZ+vI7y97vwGUOqZMtLdY fLimW31E+MiBEm9pI/IyeF4x27vg/CwIZg9gLVOiffLOsUTpFGUf9tlAdbIJI+KVnqza P8sz/ByKtYmACJ6kHnZTA4bE2Y+b2P1LJ7LnIuOvZbX5lAVHuCChePZD5bycCFccVDXy Ol+/fP0AuhmF5q2d6Lkj3N58AVNoRMtVUBYNMrS4AXOZB0MmPmQOlJNd0oMXNDtPraW1 RxRQ== X-Gm-Message-State: AOAM532NyZ4OdTnRJinTNL8TH45fMDIzAKL3YxfDtnCt4FdOfyquD4y9 XL/cuTQcQ2Hs5qX12esRrZbvo9CcpcdyehFl X-Google-Smtp-Source: ABdhPJyD4dRXQpY85ssRFCE8v1mSl/0QR8h2yF5BwpSNP0u5z+9EM62TKZRSwpmafayM8jgnpOo6gw== X-Received: by 2002:a17:902:e845:b0:163:ebca:a025 with SMTP id t5-20020a170902e84500b00163ebcaa025mr58149773plg.81.1655114044566; Mon, 13 Jun 2022 02:54:04 -0700 (PDT) Received: from potin-quanta.dhcpserver.local (125-228-123-29.hinet-ip.hinet.net. [125.228.123.29]) by smtp.gmail.com with ESMTPSA id 19-20020a170902e9d300b001639f038250sm4639754plk.220.2022.06.13.02.54.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 Jun 2022 02:54:04 -0700 (PDT) From: Potin Lai To: Rob Herring , Joel Stanley , Andrew Jeffery Cc: Patrick Williams , Potin Lai , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-aspeed@lists.ozlabs.org, linux-kernel@vger.kernel.org, Potin Lai Subject: [PATCH 3/4] ARM: dts: aspeed: bletchley: bind presence-sledX pins via gpio-keys Date: Mon, 13 Jun 2022 17:51:49 +0800 Message-Id: <20220613095150.21917-4-potin.lai.pt@gmail.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20220613095150.21917-1-potin.lai.pt@gmail.com> References: <20220613095150.21917-1-potin.lai.pt@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220613_025406_764577_CAF68E91 X-CRM114-Status: GOOD ( 10.25 ) 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: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Bind presence-sledX pins via gpio-keys driver to monitor and export GPIO pin values on DBUS using phosphor-gpio-presence service. Signed-off-by: Potin Lai --- .../dts/aspeed-bmc-facebook-bletchley.dts | 35 +++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/arch/arm/boot/dts/aspeed-bmc-facebook-bletchley.dts b/arch/arm/boot/dts/aspeed-bmc-facebook-bletchley.dts index ee33cc3efae4..7b6de9b51547 100644 --- a/arch/arm/boot/dts/aspeed-bmc-facebook-bletchley.dts +++ b/arch/arm/boot/dts/aspeed-bmc-facebook-bletchley.dts @@ -190,6 +190,41 @@ gpios = <&sled6_leds 1 GPIO_ACTIVE_LOW>; }; }; + + gpio-keys { + compatible = "gpio-keys"; + + presence-sled1 { + label = "presence-sled1"; + gpios = <&gpio0 ASPEED_GPIO(H, 2) GPIO_ACTIVE_LOW>; + linux,code = ; + }; + presence-sled2 { + label = "presence-sled2"; + gpios = <&gpio0 ASPEED_GPIO(H, 3) GPIO_ACTIVE_LOW>; + linux,code = ; + }; + presence-sled3 { + label = "presence-sled3"; + gpios = <&gpio0 ASPEED_GPIO(H, 4) GPIO_ACTIVE_LOW>; + linux,code = ; + }; + presence-sled4 { + label = "presence-sled4"; + gpios = <&gpio0 ASPEED_GPIO(H, 5) GPIO_ACTIVE_LOW>; + linux,code = ; + }; + presence-sled5 { + label = "presence-sled5"; + gpios = <&gpio0 ASPEED_GPIO(H, 6) GPIO_ACTIVE_LOW>; + linux,code = ; + }; + presence-sled6 { + label = "presence-sled6"; + gpios = <&gpio0 ASPEED_GPIO(H, 7) GPIO_ACTIVE_LOW>; + linux,code = ; + }; + }; }; &mac2 {