Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp1566612ybe; Mon, 2 Sep 2019 23:49:18 -0700 (PDT) X-Google-Smtp-Source: APXvYqzFXEBkmIUvBEFvZnA2hck+1s3zK5/S6Ewfs/Wecv4o84WzpYwAD9EczC2Xs38Kh/TvZgZj X-Received: by 2002:a17:902:a586:: with SMTP id az6mr31542642plb.298.1567493357974; Mon, 02 Sep 2019 23:49:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567493357; cv=none; d=google.com; s=arc-20160816; b=eNwTZg+Vk+gIt23Qd6tnBZ5s14icjGJmcqC71jI7oBfWazLB0Hn1LJPEguG5omJO5D 1H2BEA68g3U6x/+LBJVXTByFExewTl1A09Ai+/6C3BXSnaMDkYWYJSTmz+fYooElNw9H 0pCn5hROssheNzox2E4Ai3StP6/veubqk43rKSuITQ53M6H8Y3kUZPOeskT43yX6tDex 50b+/h0iW/Pr5Cf1qpM3zoDFPZ3D9LvK2Ao3gGmewN52kDvl+Hh4CW0hKpp0sVzpvuLy 7/znoLeGNJ7JV5L9HthxL4OFAfXghbxM2RjC1Qi/Jbz+4jJNAQfdo02RTmhdJ9XcKFim FFFQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=aAs6fH8YSfcVLfDJnxaO2N4nGbbVGXsL4Idvfh4/LLo=; b=ZkvochynLuwqD5vFz/t89eKGoGTrMUmzXbvRQsdvhjqcQMUWzvOVXW3IMGqJ+5zCnc i2lkhEtyyWAjr6EDI6o2eSDnh9P2zJC+zPITdPa6yf3QhsnUt6N6nO17sTzBy319qtX2 AMseT3C9kuEmLkjUjrKM7OOFp6A2iSsUKJLVTnFTXo2YN5eRvUaOX2hosnfVogql2Q4s AFHpF8dd94Hyu4aRApu9UwnNnt4fDFoJ8kXvWdJ48Mdy7ZKYX0AZpovK72474D/9F7k0 H6l3gOfCv59OtjwtJ653x3ioyNVL4Yz+oZfypw1dezfSy7CZEor3qYC43XEO4sMoCrZG H1hg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o7si13598136pgi.127.2019.09.02.23.49.01; Mon, 02 Sep 2019 23:49:17 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726743AbfICGsD (ORCPT + 99 others); Tue, 3 Sep 2019 02:48:03 -0400 Received: from metis.ext.pengutronix.de ([85.220.165.71]:49119 "EHLO metis.ext.pengutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726016AbfICGsD (ORCPT ); Tue, 3 Sep 2019 02:48:03 -0400 Received: from soja.hi.pengutronix.de ([2001:67c:670:100:3ad5:47ff:feaf:13da]) by metis.ext.pengutronix.de with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1i52bf-00046q-DR; Tue, 03 Sep 2019 08:47:59 +0200 Subject: Re: [PATCH V2 1/5] dt-bindings: fsl: scu: add scu power key binding To: Anson Huang , "robh+dt@kernel.org" , "mark.rutland@arm.com" , "shawnguo@kernel.org" , "s.hauer@pengutronix.de" , "kernel@pengutronix.de" , "festevam@gmail.com" , "catalin.marinas@arm.com" , "will@kernel.org" , "dmitry.torokhov@gmail.com" , Aisheng Dong , "ulf.hansson@linaro.org" , Andy Duan , Peng Fan , Daniel Baluta , Leonard Crestez , "mripard@kernel.org" , "olof@lixom.net" , "arnd@arndb.de" , "jagan@amarulasolutions.com" , "bjorn.andersson@linaro.org" , "dinguyen@kernel.org" , "marcin.juszkiewicz@linaro.org" , "stefan@agner.ch" , "gregkh@linuxfoundation.org" , "andriy.shevchenko@linux.intel.com" , "yuehaibing@huawei.com" , "tglx@linutronix.de" , "ronald@innovation.ch" , "m.felsch@pengutronix.de" , Jacky Bai , "devicetree@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" , "linux-input@vger.kernel.org" Cc: dl-linux-imx References: <1567519424-32271-1-git-send-email-Anson.Huang@nxp.com> <21d2e400-976a-35c3-6875-4cc0c476fdf2@pengutronix.de> From: Oleksij Rempel Message-ID: <7c3b6ae3-9f22-11f8-2464-79d02ac656f3@pengutronix.de> Date: Tue, 3 Sep 2019 08:47:57 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-SA-Exim-Connect-IP: 2001:67c:670:100:3ad5:47ff:feaf:13da X-SA-Exim-Mail-From: o.rempel@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 03.09.19 08:37, Anson Huang wrote: > Hi, Oleksij > >> On 03.09.19 16:03, Anson Huang wrote: >>> NXP i.MX8QXP is an ARMv8 SoC with a Cortex-M4 core inside as system >>> controller, the system controller is in charge of system power, clock >>> and power key event etc. management, Linux kernel has to communicate >>> with system controller via MU (message unit) IPC to get power key >>> event, add binding doc for i.MX system controller power key driver. >>> >>> Signed-off-by: Anson Huang >>> --- >>> Changes since V1: >>> - remove "wakeup-source" property, as it is NOT needed for SCU >> interrupt; >>> - remove "status" in example. >>> --- >>> .../devicetree/bindings/arm/freescale/fsl,scu.txt | 14 >> ++++++++++++++ >>> 1 file changed, 14 insertions(+) >>> >>> diff --git >>> a/Documentation/devicetree/bindings/arm/freescale/fsl,scu.txt >>> b/Documentation/devicetree/bindings/arm/freescale/fsl,scu.txt >>> index c149fad..f93e2e4 100644 >>> --- a/Documentation/devicetree/bindings/arm/freescale/fsl,scu.txt >>> +++ b/Documentation/devicetree/bindings/arm/freescale/fsl,scu.txt >>> @@ -157,6 +157,15 @@ Required properties: >>> Optional properties: >>> - timeout-sec: contains the watchdog timeout in seconds. >>> >>> +Power key bindings based on SCU Message Protocol >>> +------------------------------------------------------------ >>> + >>> +Required properties: >>> +- compatible: should be: >>> + "fsl,imx8qxp-sc-pwrkey" >>> + followed by "fsl,imx-sc-pwrkey"; >>> +- linux,keycodes: See >>> +Documentation/devicetree/bindings/input/keys.txt >> >> linux,keycodes is required parameter. So, this kay cab be anything. Why the >> compatible is called pwrkey? Probably it is better to call it "*-sc-key" > > This key is kind of special, it is ON/OFF button which is designed for power key > purpose, it has HW function such as long pressing it would shutdown the system power, > so we always use it as power key, NOT general key, does it make sense? I assume, OF devs will argue: DT is describing hardware not software. On other hand, software will get notification about assertion/deassertion of this key. So, it is just normal key. If, for some reason, it will trigger world destruction, if it is pressed too long... probably no body cares. You can provide fsl,imx-sc-key as additional compatible. In case linux will need some quirks, we still can fall back to more precise compatible "fsl,imx8qxp-sc-pwrkey". Kind regards, Oleksij Rempel -- Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |