[{"id":1772213,"web_url":"http://patchwork.ozlabs.org/comment/1772213/","msgid":"<20170920205301.v6gpmhll4pdpuyxv@rob-hp-laptop>","list_archive_url":null,"date":"2017-09-20T20:53:01","subject":"Re: [PATCH v4 2/5] dt-bindings: input: Add document bindings for\n\tmtk-pmic-keys","submitter":{"id":62529,"url":"http://patchwork.ozlabs.org/api/people/62529/","name":"Rob Herring (Arm)","email":"robh@kernel.org"},"content":"On Sun, Sep 17, 2017 at 04:00:49PM +0800, Chen Zhong wrote:\n> This patch adds the device tree binding documentation for the MediaTek\n> pmic keys found on PMIC MT6397/MT6323.\n> \n> Signed-off-by: Chen Zhong <chen.zhong@mediatek.com>\n> ---\n>  .../devicetree/bindings/input/mtk-pmic-keys.txt    |   41 ++++++++++++++++++++\n>  1 file changed, 41 insertions(+)\n>  create mode 100644 Documentation/devicetree/bindings/input/mtk-pmic-keys.txt\n> \n> diff --git a/Documentation/devicetree/bindings/input/mtk-pmic-keys.txt b/Documentation/devicetree/bindings/input/mtk-pmic-keys.txt\n> new file mode 100644\n> index 0000000..fd48ff7\n> --- /dev/null\n> +++ b/Documentation/devicetree/bindings/input/mtk-pmic-keys.txt\n> @@ -0,0 +1,41 @@\n> +MediaTek MT6397/MT6323 PMIC Keys Device Driver\n> +\n> +There are two key functions provided by MT6397/MT6323 PMIC, pwrkey\n> +and homekey. The key functions are defined as the subnode of the function\n> +node provided by MT6397/MT6323 PMIC that is being defined as one kind\n> +of Muti-Function Device (MFD)\n> +\n> +For MT6397/MT6323 MFD bindings see:\n> +Documentation/devicetree/bindings/mfd/mt6397.txt\n> +\n> +Required properties:\n> +- compatible: \"mediatek,mt6397-keys\" or \"mediatek,mt6323-keys\"\n> +- linux,keycodes: Specifies the numeric keycode values to\n> +\tbe used for reporting keys presses. The array can\n> +\tcontain up to 2 entries.\n> +\n> +Optional Properties:\n> +- mediatek,wakeup-keys: Specifies each key can be used as a wakeup source\n> +\tor not. This can be customized depends on board design.\n\nI think this should be a common property if we're going to put into DT. \nSomething like \"wakeup-scancodes\" to be clear the values are the raw \nscancodes. Alternatively, we could list Linux keycodes instead with \nsomething like \"linux,wakeup-keycodes\".\n\n> +- wakeup-source: PMIC keys can be used as wakeup sources.\n\nJust \"See ../power/wakeup-source.txt\" for the description.\n\n> +- mediatek,long-press-mode: Long press key shutdown setting, 1 for\n> +\tpwrkey only, 2 for pwrkey/homekey together, others for disabled.\n> +- debounce-interval: Long press key shutdown debouncing interval time\n> +\tin seconds. 0/1/2/3 for 8/11/14/5 seconds. If not specified defaults to 0.\n\nThis property units should be in milliseconds. However, this doesn't \nsound like debounce filtering time if 5-14 seconds. That sounds like \nforced power off time (i.e. for a hung device). This also should be \ncommon. I imagine we already have some drivers with similar properties.\n\nRob\n--\nTo unsubscribe from this list: send the line \"unsubscribe devicetree\" in\nthe body of a message to majordomo@vger.kernel.org\nMore majordomo info at  http://vger.kernel.org/majordomo-info.html","headers":{"Return-Path":"<devicetree-owner@vger.kernel.org>","X-Original-To":"incoming-dt@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming-dt@bilbo.ozlabs.org","Authentication-Results":"ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=vger.kernel.org\n\t(client-ip=209.132.180.67; helo=vger.kernel.org;\n\tenvelope-from=devicetree-owner@vger.kernel.org; receiver=<UNKNOWN>)","Received":["from vger.kernel.org (vger.kernel.org [209.132.180.67])\n\tby ozlabs.org (Postfix) with ESMTP id 3xyBpK25d8z9sNr\n\tfor <incoming-dt@patchwork.ozlabs.org>;\n\tThu, 21 Sep 2017 06:55:21 +1000 (AEST)","(majordomo@vger.kernel.org) by vger.kernel.org via listexpand\n\tid S1752245AbdITUyw (ORCPT\n\t<rfc822;incoming-dt@patchwork.ozlabs.org>);\n\tWed, 20 Sep 2017 16:54:52 -0400","from mail-pf0-f194.google.com ([209.85.192.194]:36572 \"EHLO\n\tmail-pf0-f194.google.com\" rhost-flags-OK-OK-OK-OK) by vger.kernel.org\n\twith ESMTP id S1752013AbdITUxE (ORCPT\n\t<rfc822; devicetree@vger.kernel.org>); Wed, 20 Sep 2017 16:53:04 -0400","by mail-pf0-f194.google.com with SMTP id f84so1629963pfj.3;\n\tWed, 20 Sep 2017 13:53:03 -0700 (PDT)","from localhost ([2620:0:1000:fd28:e83d:5428:912b:b325])\n\tby smtp.gmail.com with ESMTPSA id\n\ti87sm8919948pfi.184.2017.09.20.13.53.02\n\t(version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256);\n\tWed, 20 Sep 2017 13:53:02 -0700 (PDT)"],"X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:date:from:to:cc:subject:message-id:references\n\t:mime-version:content-disposition:in-reply-to:user-agent;\n\tbh=p7rzwOwz+PPIcNUy2nd32crkSVDz+lLk9lRY5wQag+s=;\n\tb=IzUsAQGQ3rAhwmtCfuKHnPnFNeX2gvGNBZR0EUL5w8JTtUfr2RlK9G1iQ+Q8GY52sC\n\tDjlIU2lQ3SoNzKIgV/B/bezvzn7OkfCsd5/FpHGJ4zZr1WRPKismhHpMJ6h6IGP9Kpoq\n\tWcVj8WA2FGon8dAhDHS1R1hXTeMZzbhPvxMNCMAfZtMLXzyKMMDC9oF5PkZm36RkTpEY\n\tcHvN2vwZo/wPHx5HSg50GeslmDIkUOByMg7nSP9aChiLocKMk7b5HXKgDM2pXuPUsT8s\n\txsFp1K5iHr1MV+Rlovamo2XsPD+a407oYNVsSTwhqWyEhS9WB5D+bCYVo5rWaQ/h4d3m\n\t4uyw==","X-Gm-Message-State":"AHPjjUjii8nqWojYkhfWj3oHSOuW7uvYFDIVuQkkAiKz3SMdNIJTDdFc\n\tMRXuOg1VzDEjovN4ubOOEQ==","X-Google-Smtp-Source":"AOwi7QA1LCd1aDDBo93LxknMyC4rD3BPxLhxFrIanYqLHX4lVgBGlRICmyT0CQD+rpMobWZg+sqapg==","X-Received":"by 10.98.53.196 with SMTP id c187mr3497152pfa.38.1505940783280; \n\tWed, 20 Sep 2017 13:53:03 -0700 (PDT)","Date":"Wed, 20 Sep 2017 15:53:01 -0500","From":"Rob Herring <robh@kernel.org>","To":"Chen Zhong <chen.zhong@mediatek.com>","Cc":"Dmitry Torokhov <dmitry.torokhov@gmail.com>,\n\tLee Jones <lee.jones@linaro.org>,\n\tAlexandre Belloni <alexandre.belloni@free-electrons.com>,\n\tMark Rutland <mark.rutland@arm.com>,\n\tMatthias Brugger <matthias.bgg@gmail.com>,\n\tEddie Huang <eddie.huang@mediatek.com>,\n\tAlessandro Zummo <a.zummo@towertech.it>,\n\tAndi Shyti <andi.shyti@samsung.com>,\n\tJaechul Lee <jcsing.lee@samsung.com>, \n\tKrzysztof Kozlowski <krzk@kernel.org>,\n\tLinus Walleij <linus.walleij@linaro.org>,\n\tlinux-input@vger.kernel.org, devicetree@vger.kernel.org,\n\tlinux-arm-kernel@lists.infradead.org,\n\tlinux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org,\n\tlinux-rtc@vger.kernel.org","Subject":"Re: [PATCH v4 2/5] dt-bindings: input: Add document bindings for\n\tmtk-pmic-keys","Message-ID":"<20170920205301.v6gpmhll4pdpuyxv@rob-hp-laptop>","References":"<1505635252-27716-1-git-send-email-chen.zhong@mediatek.com>\n\t<1505635252-27716-3-git-send-email-chen.zhong@mediatek.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=us-ascii","Content-Disposition":"inline","In-Reply-To":"<1505635252-27716-3-git-send-email-chen.zhong@mediatek.com>","User-Agent":"NeoMutt/20170113 (1.7.2)","Sender":"devicetree-owner@vger.kernel.org","Precedence":"bulk","List-ID":"<devicetree.vger.kernel.org>","X-Mailing-List":"devicetree@vger.kernel.org"}},{"id":1772246,"web_url":"http://patchwork.ozlabs.org/comment/1772246/","msgid":"<20170920211413.GA36148@dtor-ws>","list_archive_url":null,"date":"2017-09-20T21:14:13","subject":"Re: [PATCH v4 2/5] dt-bindings: input: Add document bindings for\n\tmtk-pmic-keys","submitter":{"id":695,"url":"http://patchwork.ozlabs.org/api/people/695/","name":"Dmitry Torokhov","email":"dmitry.torokhov@gmail.com"},"content":"On Wed, Sep 20, 2017 at 03:53:01PM -0500, Rob Herring wrote:\n> On Sun, Sep 17, 2017 at 04:00:49PM +0800, Chen Zhong wrote:\n> > This patch adds the device tree binding documentation for the MediaTek\n> > pmic keys found on PMIC MT6397/MT6323.\n> > \n> > Signed-off-by: Chen Zhong <chen.zhong@mediatek.com>\n> > ---\n> >  .../devicetree/bindings/input/mtk-pmic-keys.txt    |   41 ++++++++++++++++++++\n> >  1 file changed, 41 insertions(+)\n> >  create mode 100644 Documentation/devicetree/bindings/input/mtk-pmic-keys.txt\n> > \n> > diff --git a/Documentation/devicetree/bindings/input/mtk-pmic-keys.txt b/Documentation/devicetree/bindings/input/mtk-pmic-keys.txt\n> > new file mode 100644\n> > index 0000000..fd48ff7\n> > --- /dev/null\n> > +++ b/Documentation/devicetree/bindings/input/mtk-pmic-keys.txt\n> > @@ -0,0 +1,41 @@\n> > +MediaTek MT6397/MT6323 PMIC Keys Device Driver\n> > +\n> > +There are two key functions provided by MT6397/MT6323 PMIC, pwrkey\n> > +and homekey. The key functions are defined as the subnode of the function\n> > +node provided by MT6397/MT6323 PMIC that is being defined as one kind\n> > +of Muti-Function Device (MFD)\n> > +\n> > +For MT6397/MT6323 MFD bindings see:\n> > +Documentation/devicetree/bindings/mfd/mt6397.txt\n> > +\n> > +Required properties:\n> > +- compatible: \"mediatek,mt6397-keys\" or \"mediatek,mt6323-keys\"\n> > +- linux,keycodes: Specifies the numeric keycode values to\n> > +\tbe used for reporting keys presses. The array can\n> > +\tcontain up to 2 entries.\n> > +\n> > +Optional Properties:\n> > +- mediatek,wakeup-keys: Specifies each key can be used as a wakeup source\n> > +\tor not. This can be customized depends on board design.\n> \n> I think this should be a common property if we're going to put into DT. \n> Something like \"wakeup-scancodes\" to be clear the values are the raw \n> scancodes. Alternatively, we could list Linux keycodes instead with \n> something like \"linux,wakeup-keycodes\".\n\nShould we go the gpio-keys way and describe keys as sub-nodes, possibly\nusing address as index?\n\n\t\tmt6397keys: mt6397keys {\n\t\t\t...\n\n\t\t\tpower@0 {\n\t\t\t\tlinux,code = <116>;\n\t\t\t\twakeup-source;\n\t\t\t};\n\n\t\t\thome@1 {\n\t\t\t\tlinux,code = <...>;\n\t\t\t};\n\t\t};\n\nThanks.","headers":{"Return-Path":"<devicetree-owner@vger.kernel.org>","X-Original-To":"incoming-dt@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming-dt@bilbo.ozlabs.org","Authentication-Results":["ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=vger.kernel.org\n\t(client-ip=209.132.180.67; helo=vger.kernel.org;\n\tenvelope-from=devicetree-owner@vger.kernel.org; receiver=<UNKNOWN>)","ozlabs.org;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tunprotected) header.d=gmail.com header.i=@gmail.com\n\theader.b=\"B1WgD9yW\"; dkim-atps=neutral"],"Received":["from vger.kernel.org (vger.kernel.org [209.132.180.67])\n\tby ozlabs.org (Postfix) with ESMTP id 3xyCDD5jmCz9sNr\n\tfor <incoming-dt@patchwork.ozlabs.org>;\n\tThu, 21 Sep 2017 07:14:20 +1000 (AEST)","(majordomo@vger.kernel.org) by vger.kernel.org via listexpand\n\tid S1751408AbdITVOT (ORCPT\n\t<rfc822;incoming-dt@patchwork.ozlabs.org>);\n\tWed, 20 Sep 2017 17:14:19 -0400","from mail-pf0-f193.google.com ([209.85.192.193]:34508 \"EHLO\n\tmail-pf0-f193.google.com\" rhost-flags-OK-OK-OK-OK) by vger.kernel.org\n\twith ESMTP id S1751387AbdITVOR (ORCPT\n\t<rfc822; devicetree@vger.kernel.org>); Wed, 20 Sep 2017 17:14:17 -0400","by mail-pf0-f193.google.com with SMTP id g65so1650456pfe.1;\n\tWed, 20 Sep 2017 14:14:17 -0700 (PDT)","from dtor-ws ([2620:0:1000:1611:9cd6:fc06:bad5:847])\n\tby smtp.gmail.com with ESMTPSA id\n\tp85sm9920997pfj.47.2017.09.20.14.14.15\n\t(version=TLS1_2 cipher=AES128-SHA bits=128/128);\n\tWed, 20 Sep 2017 14:14:16 -0700 (PDT)"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;\n\th=date:from:to:cc:subject:message-id:references:mime-version\n\t:content-disposition:in-reply-to:user-agent;\n\tbh=7plhGDW4S9Ri0Gsa+TgknLsDNPeO5iboDzjAeH7OTPs=;\n\tb=B1WgD9yWaNjdYpM6pPnvffWMpecEQmKt4CndkGunAojgiEr1B0SfRY92leesgN2BP5\n\tIAPGJP5vMkbYrTSEg3NOEdh8Ipn5NgRtJHlRKrQLxXQ8SRozUB0oT3LZ8mI1BsJR+yW6\n\tc1dQSO1P6QwjkJkWrIpZvLfRL4yJwhjI6TMg4LU7RPWenaoMC8uuvkr3mxrdeKdttNgW\n\t805Q+6IUuOammBmwziy58gMw6g30KySSYpw4dSbkd0JsSfiX9SRqhhTakht0O8ii5pcl\n\t9V8mswGTgtfjN8RDp4Vo3WsUZF4ugc3vVrAca/LDV1N6VqZO6rRu0a+cZ4D5qn0YRFPK\n\tLEgw==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:date:from:to:cc:subject:message-id:references\n\t:mime-version:content-disposition:in-reply-to:user-agent;\n\tbh=7plhGDW4S9Ri0Gsa+TgknLsDNPeO5iboDzjAeH7OTPs=;\n\tb=tzKu6hSrpf8FxshZZU40uHex3+IKoEkBt/k1IvSBu6lhpdhyxMKJwu5mBWeOiX680q\n\tBIL2aiozjYl1wB9r5/av8iDitvMVzgLbw0AHYM7mvOLH7TfL52r1INXi2IkF1D/ko/8b\n\tmA/0Y568ObNojQ6fwMK9jFWhGLirGqBFm+OFbuV/p1eO6cciULBhfKZQuIgori7dDlGw\n\t3zjobL4E+81uxrjIbtTbilaEfv0PX99PmFExhfrj8dzQ/UTLiNWBAMyYG/UiAOTwYZVR\n\t/XvpJY9ucJoGtrwrystnlCNuEsS+X6rY1oF3tsCOALDuNNc66154/1dRbqjuLrc5CExv\n\t00EQ==","X-Gm-Message-State":"AHPjjUgfwGvZn1bau19BZPS5sea7dRrkRxn00+G4u1YvAm7IPoktnIIT\n\tVmnTt++XrS5yPMc1XClNWBM=","X-Google-Smtp-Source":"AOwi7QDi7AiBmErqwVsjKjR0F1VgtUvuZ3MYqI9h7ldhDOki/wvI7fwlZ8NwyeGAQD2WDhOid3cp8g==","X-Received":"by 10.98.102.149 with SMTP id s21mr3421739pfj.294.1505942056717; \n\tWed, 20 Sep 2017 14:14:16 -0700 (PDT)","Date":"Wed, 20 Sep 2017 14:14:13 -0700","From":"Dmitry Torokhov <dmitry.torokhov@gmail.com>","To":"Rob Herring <robh@kernel.org>","Cc":"Chen Zhong <chen.zhong@mediatek.com>, Lee Jones <lee.jones@linaro.org>, \n\tAlexandre Belloni <alexandre.belloni@free-electrons.com>,\n\tMark Rutland <mark.rutland@arm.com>,\n\tMatthias Brugger <matthias.bgg@gmail.com>,\n\tEddie Huang <eddie.huang@mediatek.com>,\n\tAlessandro Zummo <a.zummo@towertech.it>,\n\tAndi Shyti <andi.shyti@samsung.com>,\n\tJaechul Lee <jcsing.lee@samsung.com>, \n\tKrzysztof Kozlowski <krzk@kernel.org>,\n\tLinus Walleij <linus.walleij@linaro.org>,\n\tlinux-input@vger.kernel.org, devicetree@vger.kernel.org,\n\tlinux-arm-kernel@lists.infradead.org,\n\tlinux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org,\n\tlinux-rtc@vger.kernel.org","Subject":"Re: [PATCH v4 2/5] dt-bindings: input: Add document bindings for\n\tmtk-pmic-keys","Message-ID":"<20170920211413.GA36148@dtor-ws>","References":"<1505635252-27716-1-git-send-email-chen.zhong@mediatek.com>\n\t<1505635252-27716-3-git-send-email-chen.zhong@mediatek.com>\n\t<20170920205301.v6gpmhll4pdpuyxv@rob-hp-laptop>","MIME-Version":"1.0","Content-Type":"text/plain; charset=us-ascii","Content-Disposition":"inline","In-Reply-To":"<20170920205301.v6gpmhll4pdpuyxv@rob-hp-laptop>","User-Agent":"Mutt/1.5.21 (2010-09-15)","Sender":"devicetree-owner@vger.kernel.org","Precedence":"bulk","List-ID":"<devicetree.vger.kernel.org>","X-Mailing-List":"devicetree@vger.kernel.org"}},{"id":1773988,"web_url":"http://patchwork.ozlabs.org/comment/1773988/","msgid":"<1506148695.19409.10.camel@mhfsdcap03>","list_archive_url":null,"date":"2017-09-23T06:38:15","subject":"Re: [PATCH v4 2/5] dt-bindings: input: Add document bindings for\n\tmtk-pmic-keys","submitter":{"id":72090,"url":"http://patchwork.ozlabs.org/api/people/72090/","name":"Chen Zhong","email":"chen.zhong@mediatek.com"},"content":"On Wed, 2017-09-20 at 15:53 -0500, Rob Herring wrote:\n> On Sun, Sep 17, 2017 at 04:00:49PM +0800, Chen Zhong wrote:\n> > This patch adds the device tree binding documentation for the MediaTek\n> > pmic keys found on PMIC MT6397/MT6323.\n> > \n> > Signed-off-by: Chen Zhong <chen.zhong@mediatek.com>\n> > ---\n> >  .../devicetree/bindings/input/mtk-pmic-keys.txt    |   41 ++++++++++++++++++++\n> >  1 file changed, 41 insertions(+)\n> >  create mode 100644 Documentation/devicetree/bindings/input/mtk-pmic-keys.txt\n> > \n> > diff --git a/Documentation/devicetree/bindings/input/mtk-pmic-keys.txt b/Documentation/devicetree/bindings/input/mtk-pmic-keys.txt\n> > new file mode 100644\n> > index 0000000..fd48ff7\n> > --- /dev/null\n> > +++ b/Documentation/devicetree/bindings/input/mtk-pmic-keys.txt\n> > @@ -0,0 +1,41 @@\n> > +MediaTek MT6397/MT6323 PMIC Keys Device Driver\n> > +\n> > +There are two key functions provided by MT6397/MT6323 PMIC, pwrkey\n> > +and homekey. The key functions are defined as the subnode of the function\n> > +node provided by MT6397/MT6323 PMIC that is being defined as one kind\n> > +of Muti-Function Device (MFD)\n> > +\n> > +For MT6397/MT6323 MFD bindings see:\n> > +Documentation/devicetree/bindings/mfd/mt6397.txt\n> > +\n> > +Required properties:\n> > +- compatible: \"mediatek,mt6397-keys\" or \"mediatek,mt6323-keys\"\n> > +- linux,keycodes: Specifies the numeric keycode values to\n> > +\tbe used for reporting keys presses. The array can\n> > +\tcontain up to 2 entries.\n> > +\n> > +Optional Properties:\n> > +- mediatek,wakeup-keys: Specifies each key can be used as a wakeup source\n> > +\tor not. This can be customized depends on board design.\n> \n> I think this should be a common property if we're going to put into DT. \n> Something like \"wakeup-scancodes\" to be clear the values are the raw \n> scancodes. Alternatively, we could list Linux keycodes instead with \n> something like \"linux,wakeup-keycodes\".\n> \n> > +- wakeup-source: PMIC keys can be used as wakeup sources.\n> \n> Just \"See ../power/wakeup-source.txt\" for the description.\n> \n> > +- mediatek,long-press-mode: Long press key shutdown setting, 1 for\n> > +\tpwrkey only, 2 for pwrkey/homekey together, others for disabled.\n> > +- debounce-interval: Long press key shutdown debouncing interval time\n> > +\tin seconds. 0/1/2/3 for 8/11/14/5 seconds. If not specified defaults to 0.\n> \n> This property units should be in milliseconds. However, this doesn't \n> sound like debounce filtering time if 5-14 seconds. That sounds like \n> forced power off time (i.e. for a hung device). This also should be \n> common. I imagine we already have some drivers with similar properties.\n\nHi Rob,\n\nI searched in kernel documents and found a similar usage in\n\"ti,palmas-pwrbutton.txt\"\n\"- ti,palmas-long-press-seconds: Duration in seconds which the power\n  button should be kept pressed for Palmas to power off automatically.\"\n\nCould I just wrote it like this?\nmediatek,long-press-seconds = <0>;\n\nAnd for the wakeup source part, how about Dmitry's suggestion? \nThe whole device node would be:\n\nmt6397keys: mt6397keys {\n\tcompatible = \"mediatek,mt6397-keys\";\n\tmediatek,long-press-mode = <1>;\n\tmediatek,long-press-seconds = <0>;\n\t\n\tpower@0 {\n\t\tlinux,code = <116>;\n\t\twakeup-source;\n\t};\n\n\thome@0 {\n\t\tlinux,code = <114>;\n\t};\n};\n\nThank you.\n\n> \n> Rob\n\n\n--\nTo unsubscribe from this list: send the line \"unsubscribe devicetree\" in\nthe body of a message to majordomo@vger.kernel.org\nMore majordomo info at  http://vger.kernel.org/majordomo-info.html","headers":{"Return-Path":"<devicetree-owner@vger.kernel.org>","X-Original-To":"incoming-dt@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming-dt@bilbo.ozlabs.org","Authentication-Results":"ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=vger.kernel.org\n\t(client-ip=209.132.180.67; helo=vger.kernel.org;\n\tenvelope-from=devicetree-owner@vger.kernel.org; receiver=<UNKNOWN>)","Received":["from vger.kernel.org (vger.kernel.org [209.132.180.67])\n\tby ozlabs.org (Postfix) with ESMTP id 3xzgf938NLz9tX8\n\tfor <incoming-dt@patchwork.ozlabs.org>;\n\tSat, 23 Sep 2017 16:38:25 +1000 (AEST)","(majordomo@vger.kernel.org) by vger.kernel.org via listexpand\n\tid S1750762AbdIWGiW (ORCPT\n\t<rfc822;incoming-dt@patchwork.ozlabs.org>);\n\tSat, 23 Sep 2017 02:38:22 -0400","from mailgw02.mediatek.com ([210.61.82.184]:30235 \"EHLO\n\tmailgw02.mediatek.com\" rhost-flags-OK-FAIL-OK-FAIL) by\n\tvger.kernel.org with ESMTP id S1750738AbdIWGiV (ORCPT\n\t<rfc822; devicetree@vger.kernel.org>); Sat, 23 Sep 2017 02:38:21 -0400","from mtkexhb01.mediatek.inc [(172.21.101.102)] by\n\tmailgw02.mediatek.com (envelope-from <chen.zhong@mediatek.com>)\n\t(mhqrelay.mediatek.com ESMTP with TLS)\n\twith ESMTP id 346689485; Sat, 23 Sep 2017 14:38:17 +0800","from MTKCAS32.mediatek.inc (172.27.4.184) by\n\tmtkmbs08n1.mediatek.inc\n\t(172.21.101.55) with Microsoft SMTP Server (TLS) id 15.0.1210.3;\n\tSat, 23 Sep 2017 14:37:40 +0800","from [10.17.3.153] (10.17.3.153) by MTKCAS32.mediatek.inc\n\t(172.27.4.170) with Microsoft SMTP Server id 15.0.1210.3 via Frontend\n\tTransport; Sat, 23 Sep 2017 14:38:05 +0800"],"X-UUID":"c462223de84c448895455dc5bab6b1ee-20170923","Message-ID":"<1506148695.19409.10.camel@mhfsdcap03>","Subject":"Re: [PATCH v4 2/5] dt-bindings: input: Add document bindings for\n\tmtk-pmic-keys","From":"Chen Zhong <chen.zhong@mediatek.com>","To":"Rob Herring <robh@kernel.org>","CC":"Dmitry Torokhov <dmitry.torokhov@gmail.com>,\n\tLee Jones <lee.jones@linaro.org>,\n\tAlexandre Belloni <alexandre.belloni@free-electrons.com>,\n\tMark Rutland <mark.rutland@arm.com>,\n\tMatthias Brugger <matthias.bgg@gmail.com>,\n\t\"Eddie Huang\" <eddie.huang@mediatek.com>,\n\tAlessandro Zummo <a.zummo@towertech.it>,\n\tAndi Shyti <andi.shyti@samsung.com>,\n\tJaechul Lee <jcsing.lee@samsung.com>, \n\tKrzysztof Kozlowski <krzk@kernel.org>,\n\tLinus Walleij <linus.walleij@linaro.org>,\n\t<linux-input@vger.kernel.org>, <devicetree@vger.kernel.org>,\n\t<linux-arm-kernel@lists.infradead.org>,\n\t<linux-mediatek@lists.infradead.org>,\n\t<linux-kernel@vger.kernel.org>, <linux-rtc@vger.kernel.org>","Date":"Sat, 23 Sep 2017 14:38:15 +0800","In-Reply-To":"<20170920205301.v6gpmhll4pdpuyxv@rob-hp-laptop>","References":"<1505635252-27716-1-git-send-email-chen.zhong@mediatek.com>\n\t<1505635252-27716-3-git-send-email-chen.zhong@mediatek.com>\n\t<20170920205301.v6gpmhll4pdpuyxv@rob-hp-laptop>","Content-Type":"text/plain; charset=\"UTF-8\"","X-Mailer":"Evolution 3.2.3-0ubuntu6 ","Content-Transfer-Encoding":"7bit","MIME-Version":"1.0","X-MTK":"N","Sender":"devicetree-owner@vger.kernel.org","Precedence":"bulk","List-ID":"<devicetree.vger.kernel.org>","X-Mailing-List":"devicetree@vger.kernel.org"}},{"id":1773992,"web_url":"http://patchwork.ozlabs.org/comment/1773992/","msgid":"<1506149223.19409.11.camel@mhfsdcap03>","list_archive_url":null,"date":"2017-09-23T06:47:03","subject":"Re: [PATCH v4 2/5] dt-bindings: input: Add document bindings for\n\tmtk-pmic-keys","submitter":{"id":72090,"url":"http://patchwork.ozlabs.org/api/people/72090/","name":"Chen Zhong","email":"chen.zhong@mediatek.com"},"content":"Sorry for the typo.\n\nOn Sat, 2017-09-23 at 14:38 +0800, Chen Zhong wrote:\n> On Wed, 2017-09-20 at 15:53 -0500, Rob Herring wrote:\n> > On Sun, Sep 17, 2017 at 04:00:49PM +0800, Chen Zhong wrote:\n> > > This patch adds the device tree binding documentation for the MediaTek\n> > > pmic keys found on PMIC MT6397/MT6323.\n> > > \n> > > Signed-off-by: Chen Zhong <chen.zhong@mediatek.com>\n> > > ---\n> > >  .../devicetree/bindings/input/mtk-pmic-keys.txt    |   41 ++++++++++++++++++++\n> > >  1 file changed, 41 insertions(+)\n> > >  create mode 100644 Documentation/devicetree/bindings/input/mtk-pmic-keys.txt\n> > > \n> > > diff --git a/Documentation/devicetree/bindings/input/mtk-pmic-keys.txt b/Documentation/devicetree/bindings/input/mtk-pmic-keys.txt\n> > > new file mode 100644\n> > > index 0000000..fd48ff7\n> > > --- /dev/null\n> > > +++ b/Documentation/devicetree/bindings/input/mtk-pmic-keys.txt\n> > > @@ -0,0 +1,41 @@\n> > > +MediaTek MT6397/MT6323 PMIC Keys Device Driver\n> > > +\n> > > +There are two key functions provided by MT6397/MT6323 PMIC, pwrkey\n> > > +and homekey. The key functions are defined as the subnode of the function\n> > > +node provided by MT6397/MT6323 PMIC that is being defined as one kind\n> > > +of Muti-Function Device (MFD)\n> > > +\n> > > +For MT6397/MT6323 MFD bindings see:\n> > > +Documentation/devicetree/bindings/mfd/mt6397.txt\n> > > +\n> > > +Required properties:\n> > > +- compatible: \"mediatek,mt6397-keys\" or \"mediatek,mt6323-keys\"\n> > > +- linux,keycodes: Specifies the numeric keycode values to\n> > > +\tbe used for reporting keys presses. The array can\n> > > +\tcontain up to 2 entries.\n> > > +\n> > > +Optional Properties:\n> > > +- mediatek,wakeup-keys: Specifies each key can be used as a wakeup source\n> > > +\tor not. This can be customized depends on board design.\n> > \n> > I think this should be a common property if we're going to put into DT. \n> > Something like \"wakeup-scancodes\" to be clear the values are the raw \n> > scancodes. Alternatively, we could list Linux keycodes instead with \n> > something like \"linux,wakeup-keycodes\".\n> > \n> > > +- wakeup-source: PMIC keys can be used as wakeup sources.\n> > \n> > Just \"See ../power/wakeup-source.txt\" for the description.\n> > \n> > > +- mediatek,long-press-mode: Long press key shutdown setting, 1 for\n> > > +\tpwrkey only, 2 for pwrkey/homekey together, others for disabled.\n> > > +- debounce-interval: Long press key shutdown debouncing interval time\n> > > +\tin seconds. 0/1/2/3 for 8/11/14/5 seconds. If not specified defaults to 0.\n> > \n> > This property units should be in milliseconds. However, this doesn't \n> > sound like debounce filtering time if 5-14 seconds. That sounds like \n> > forced power off time (i.e. for a hung device). This also should be \n> > common. I imagine we already have some drivers with similar properties.\n> \n> Hi Rob,\n> \n> I searched in kernel documents and found a similar usage in\n> \"ti,palmas-pwrbutton.txt\"\n> \"- ti,palmas-long-press-seconds: Duration in seconds which the power\n>   button should be kept pressed for Palmas to power off automatically.\"\n> \n> Could I just wrote it like this?\n> mediatek,long-press-seconds = <0>;\n> \n> And for the wakeup source part, how about Dmitry's suggestion? \n> The whole device node would be:\n> \n> mt6397keys: mt6397keys {\n> \tcompatible = \"mediatek,mt6397-keys\";\n> \tmediatek,long-press-mode = <1>;\n> \tmediatek,long-press-seconds = <0>;\n> \t\n> \tpower@0 {\n> \t\tlinux,code = <116>;\n> \t\twakeup-source;\n> \t};\n> \n> \thome@0 {\nshould be home@1 {\n> \t\tlinux,code = <114>;\n> \t};\n> };\n> \n> Thank you.\n> \n> > \n> > Rob\n> \n\n\n--\nTo unsubscribe from this list: send the line \"unsubscribe devicetree\" in\nthe body of a message to majordomo@vger.kernel.org\nMore majordomo info at  http://vger.kernel.org/majordomo-info.html","headers":{"Return-Path":"<devicetree-owner@vger.kernel.org>","X-Original-To":"incoming-dt@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming-dt@bilbo.ozlabs.org","Authentication-Results":"ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=vger.kernel.org\n\t(client-ip=209.132.180.67; helo=vger.kernel.org;\n\tenvelope-from=devicetree-owner@vger.kernel.org; receiver=<UNKNOWN>)","Received":["from vger.kernel.org (vger.kernel.org [209.132.180.67])\n\tby ozlabs.org (Postfix) with ESMTP id 3xzgrs5GK5z9tX5\n\tfor <incoming-dt@patchwork.ozlabs.org>;\n\tSat, 23 Sep 2017 16:47:41 +1000 (AEST)","(majordomo@vger.kernel.org) by vger.kernel.org via listexpand\n\tid S1750778AbdIWGrN (ORCPT\n\t<rfc822;incoming-dt@patchwork.ozlabs.org>);\n\tSat, 23 Sep 2017 02:47:13 -0400","from mailgw01.mediatek.com ([210.61.82.183]:1203 \"EHLO\n\tmailgw01.mediatek.com\" rhost-flags-OK-FAIL-OK-FAIL) by\n\tvger.kernel.org with ESMTP id S1750738AbdIWGrM (ORCPT\n\t<rfc822; devicetree@vger.kernel.org>); Sat, 23 Sep 2017 02:47:12 -0400","from mtkcas06.mediatek.inc [(172.21.101.30)] by\n\tmailgw01.mediatek.com (envelope-from <chen.zhong@mediatek.com>)\n\t(mhqrelay.mediatek.com ESMTP with TLS)\n\twith ESMTP id 1015364596; Sat, 23 Sep 2017 14:47:04 +0800","from MTKCAS36.mediatek.inc (172.27.4.186) by\n\tmtkmbs08n1.mediatek.inc\n\t(172.21.101.55) with Microsoft SMTP Server (TLS) id 15.0.1210.3;\n\tSat, 23 Sep 2017 14:46:28 +0800","from [10.17.3.153] (10.17.3.153) by MTKCAS36.mediatek.inc\n\t(172.27.4.170) with Microsoft SMTP Server id 15.0.1210.3 via Frontend\n\tTransport; Sat, 23 Sep 2017 14:46:12 +0800"],"X-UUID":"f46b35281ff74165a4ea4b20f1705736-20170923","Message-ID":"<1506149223.19409.11.camel@mhfsdcap03>","Subject":"Re: [PATCH v4 2/5] dt-bindings: input: Add document bindings for\n\tmtk-pmic-keys","From":"Chen Zhong <chen.zhong@mediatek.com>","To":"Rob Herring <robh@kernel.org>","CC":"Dmitry Torokhov <dmitry.torokhov@gmail.com>,\n\tLee Jones <lee.jones@linaro.org>,\n\tAlexandre Belloni <alexandre.belloni@free-electrons.com>,\n\tMark Rutland <mark.rutland@arm.com>,\n\tMatthias Brugger <matthias.bgg@gmail.com>,\n\t\"Eddie Huang\" <eddie.huang@mediatek.com>,\n\tAlessandro Zummo <a.zummo@towertech.it>,\n\tAndi Shyti <andi.shyti@samsung.com>,\n\tJaechul Lee <jcsing.lee@samsung.com>, \n\tKrzysztof Kozlowski <krzk@kernel.org>,\n\tLinus Walleij <linus.walleij@linaro.org>,\n\t<linux-input@vger.kernel.org>, <devicetree@vger.kernel.org>,\n\t<linux-arm-kernel@lists.infradead.org>,\n\t<linux-mediatek@lists.infradead.org>,\n\t<linux-kernel@vger.kernel.org>, <linux-rtc@vger.kernel.org>","Date":"Sat, 23 Sep 2017 14:47:03 +0800","In-Reply-To":"<1506148695.19409.10.camel@mhfsdcap03>","References":"<1505635252-27716-1-git-send-email-chen.zhong@mediatek.com>\n\t<1505635252-27716-3-git-send-email-chen.zhong@mediatek.com>\n\t<20170920205301.v6gpmhll4pdpuyxv@rob-hp-laptop>\n\t<1506148695.19409.10.camel@mhfsdcap03>","Content-Type":"text/plain; charset=\"UTF-8\"","X-Mailer":"Evolution 3.2.3-0ubuntu6 ","Content-Transfer-Encoding":"7bit","MIME-Version":"1.0","X-MTK":"N","Sender":"devicetree-owner@vger.kernel.org","Precedence":"bulk","List-ID":"<devicetree.vger.kernel.org>","X-Mailing-List":"devicetree@vger.kernel.org"}},{"id":1774400,"web_url":"http://patchwork.ozlabs.org/comment/1774400/","msgid":"<CAL_JsqJZtn7YLn6o9mQMPD+kuseKLbfKe+JiY=1BosqnVqi5Kw@mail.gmail.com>","list_archive_url":null,"date":"2017-09-25T04:11:24","subject":"Re: [PATCH v4 2/5] dt-bindings: input: Add document bindings for\n\tmtk-pmic-keys","submitter":{"id":62529,"url":"http://patchwork.ozlabs.org/api/people/62529/","name":"Rob Herring (Arm)","email":"robh@kernel.org"},"content":"On Sat, Sep 23, 2017 at 1:47 AM, Chen Zhong <chen.zhong@mediatek.com> wrote:\n> Sorry for the typo.\n>\n> On Sat, 2017-09-23 at 14:38 +0800, Chen Zhong wrote:\n>> On Wed, 2017-09-20 at 15:53 -0500, Rob Herring wrote:\n>> > On Sun, Sep 17, 2017 at 04:00:49PM +0800, Chen Zhong wrote:\n>> > > This patch adds the device tree binding documentation for the MediaTek\n>> > > pmic keys found on PMIC MT6397/MT6323.\n>> > >\n>> > > Signed-off-by: Chen Zhong <chen.zhong@mediatek.com>\n>> > > ---\n>> > >  .../devicetree/bindings/input/mtk-pmic-keys.txt    |   41 ++++++++++++++++++++\n>> > >  1 file changed, 41 insertions(+)\n>> > >  create mode 100644 Documentation/devicetree/bindings/input/mtk-pmic-keys.txt\n>> > >\n>> > > diff --git a/Documentation/devicetree/bindings/input/mtk-pmic-keys.txt b/Documentation/devicetree/bindings/input/mtk-pmic-keys.txt\n>> > > new file mode 100644\n>> > > index 0000000..fd48ff7\n>> > > --- /dev/null\n>> > > +++ b/Documentation/devicetree/bindings/input/mtk-pmic-keys.txt\n>> > > @@ -0,0 +1,41 @@\n>> > > +MediaTek MT6397/MT6323 PMIC Keys Device Driver\n>> > > +\n>> > > +There are two key functions provided by MT6397/MT6323 PMIC, pwrkey\n>> > > +and homekey. The key functions are defined as the subnode of the function\n>> > > +node provided by MT6397/MT6323 PMIC that is being defined as one kind\n>> > > +of Muti-Function Device (MFD)\n>> > > +\n>> > > +For MT6397/MT6323 MFD bindings see:\n>> > > +Documentation/devicetree/bindings/mfd/mt6397.txt\n>> > > +\n>> > > +Required properties:\n>> > > +- compatible: \"mediatek,mt6397-keys\" or \"mediatek,mt6323-keys\"\n>> > > +- linux,keycodes: Specifies the numeric keycode values to\n>> > > + be used for reporting keys presses. The array can\n>> > > + contain up to 2 entries.\n>> > > +\n>> > > +Optional Properties:\n>> > > +- mediatek,wakeup-keys: Specifies each key can be used as a wakeup source\n>> > > + or not. This can be customized depends on board design.\n>> >\n>> > I think this should be a common property if we're going to put into DT.\n>> > Something like \"wakeup-scancodes\" to be clear the values are the raw\n>> > scancodes. Alternatively, we could list Linux keycodes instead with\n>> > something like \"linux,wakeup-keycodes\".\n>> >\n>> > > +- wakeup-source: PMIC keys can be used as wakeup sources.\n>> >\n>> > Just \"See ../power/wakeup-source.txt\" for the description.\n>> >\n>> > > +- mediatek,long-press-mode: Long press key shutdown setting, 1 for\n>> > > + pwrkey only, 2 for pwrkey/homekey together, others for disabled.\n>> > > +- debounce-interval: Long press key shutdown debouncing interval time\n>> > > + in seconds. 0/1/2/3 for 8/11/14/5 seconds. If not specified defaults to 0.\n>> >\n>> > This property units should be in milliseconds. However, this doesn't\n>> > sound like debounce filtering time if 5-14 seconds. That sounds like\n>> > forced power off time (i.e. for a hung device). This also should be\n>> > common. I imagine we already have some drivers with similar properties.\n>>\n>> Hi Rob,\n>>\n>> I searched in kernel documents and found a similar usage in\n>> \"ti,palmas-pwrbutton.txt\"\n>> \"- ti,palmas-long-press-seconds: Duration in seconds which the power\n>>   button should be kept pressed for Palmas to power off automatically.\"\n>>\n>> Could I just wrote it like this?\n>> mediatek,long-press-seconds = <0>;\n\nThat doesn't really tell what the long press does. How about\n\"power-off-time-sec\"? Surprisingly we don't have a common keyboard\nbinding doc, so please start one and document it there. Then just\nrefer to it.\n\n>>\n>> And for the wakeup source part, how about Dmitry's suggestion?\n\nIt's fine for me.\n\n>> The whole device node would be:\n>>\n>> mt6397keys: mt6397keys {\n>>       compatible = \"mediatek,mt6397-keys\";\n>>       mediatek,long-press-mode = <1>;\n>>       mediatek,long-press-seconds = <0>;\n>>\n>>       power@0 {\n>>               linux,code = <116>;\n\nlinux,keycodes\n\nAlso, you either need a reg property with \"0\" or drop the unit address.\n\n>>               wakeup-source;\n>>       };\n>>\n>>       home@0 {\n> should be home@1 {\n>>               linux,code = <114>;\n>>       };\n>> };\n>>\n>> Thank you.\n>>\n>> >\n>> > Rob\n>>\n>\n>\n--\nTo unsubscribe from this list: send the line \"unsubscribe devicetree\" in\nthe body of a message to majordomo@vger.kernel.org\nMore majordomo info at  http://vger.kernel.org/majordomo-info.html","headers":{"Return-Path":"<devicetree-owner@vger.kernel.org>","X-Original-To":"incoming-dt@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming-dt@bilbo.ozlabs.org","Authentication-Results":["ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=vger.kernel.org\n\t(client-ip=209.132.180.67; helo=vger.kernel.org;\n\tenvelope-from=devicetree-owner@vger.kernel.org; receiver=<UNKNOWN>)","mail.kernel.org;\n\tdmarc=none (p=none dis=none) header.from=kernel.org","mail.kernel.org;\n\tspf=none smtp.mailfrom=robh@kernel.org"],"Received":["from vger.kernel.org (vger.kernel.org [209.132.180.67])\n\tby ozlabs.org (Postfix) with ESMTP id 3y0rJ65YSZz9t3R\n\tfor <incoming-dt@patchwork.ozlabs.org>;\n\tMon, 25 Sep 2017 14:11:50 +1000 (AEST)","(majordomo@vger.kernel.org) by vger.kernel.org via listexpand\n\tid S1753043AbdIYELt (ORCPT\n\t<rfc822;incoming-dt@patchwork.ozlabs.org>);\n\tMon, 25 Sep 2017 00:11:49 -0400","from mail.kernel.org ([198.145.29.99]:55110 \"EHLO mail.kernel.org\"\n\trhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP\n\tid S1750978AbdIYELr (ORCPT <rfc822;devicetree@vger.kernel.org>);\n\tMon, 25 Sep 2017 00:11:47 -0400","from mail-qt0-f180.google.com (mail-qt0-f180.google.com\n\t[209.85.216.180])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128\n\tbits)) (No client certificate requested)\n\tby mail.kernel.org (Postfix) with ESMTPSA id 63073218B3;\n\tMon, 25 Sep 2017 04:11:46 +0000 (UTC)","by mail-qt0-f180.google.com with SMTP id i13so5668441qtc.11;\n\tSun, 24 Sep 2017 21:11:46 -0700 (PDT)","by 10.12.209.75 with HTTP; Sun, 24 Sep 2017 21:11:24 -0700 (PDT)"],"DMARC-Filter":"OpenDMARC Filter v1.3.2 mail.kernel.org 63073218B3","X-Gm-Message-State":"AHPjjUjq1ePzNLbM+umG346B1dWDtPHB4nHLcuV961UjTPUYKmiJ3KPU\n\tixultuYRn7Q8K2NkWR+lGOw0KuWarmGXRe6bJQ==","X-Google-Smtp-Source":"AOwi7QBZQQ6jmzxxbOXZvnyyPWNbliVac7JAUsc1jZ25uAAlncBiJg/+X7nNF0GcFZoceXUWxHvafcf55Z/FJH1oSNA=","X-Received":"by 10.200.26.211 with SMTP id h19mr9379154qtk.341.1506312705482; \n\tSun, 24 Sep 2017 21:11:45 -0700 (PDT)","MIME-Version":"1.0","In-Reply-To":"<1506149223.19409.11.camel@mhfsdcap03>","References":"<1505635252-27716-1-git-send-email-chen.zhong@mediatek.com>\n\t<1505635252-27716-3-git-send-email-chen.zhong@mediatek.com>\n\t<20170920205301.v6gpmhll4pdpuyxv@rob-hp-laptop>\n\t<1506148695.19409.10.camel@mhfsdcap03>\n\t<1506149223.19409.11.camel@mhfsdcap03>","From":"Rob Herring <robh@kernel.org>","Date":"Sun, 24 Sep 2017 23:11:24 -0500","X-Gmail-Original-Message-ID":"<CAL_JsqJZtn7YLn6o9mQMPD+kuseKLbfKe+JiY=1BosqnVqi5Kw@mail.gmail.com>","Message-ID":"<CAL_JsqJZtn7YLn6o9mQMPD+kuseKLbfKe+JiY=1BosqnVqi5Kw@mail.gmail.com>","Subject":"Re: [PATCH v4 2/5] dt-bindings: input: Add document bindings for\n\tmtk-pmic-keys","To":"Chen Zhong <chen.zhong@mediatek.com>","Cc":"Dmitry Torokhov <dmitry.torokhov@gmail.com>,\n\tLee Jones <lee.jones@linaro.org>,\n\tAlexandre Belloni <alexandre.belloni@free-electrons.com>,\n\tMark Rutland <mark.rutland@arm.com>,\n\tMatthias Brugger <matthias.bgg@gmail.com>,\n\tEddie Huang <eddie.huang@mediatek.com>,\n\tAlessandro Zummo <a.zummo@towertech.it>,\n\tAndi Shyti <andi.shyti@samsung.com>,\n\tJaechul Lee <jcsing.lee@samsung.com>, \n\tKrzysztof Kozlowski <krzk@kernel.org>,\n\tLinus Walleij <linus.walleij@linaro.org>,\n\t\"linux-input@vger.kernel.org\" <linux-input@vger.kernel.org>,\n\t\"devicetree@vger.kernel.org\" <devicetree@vger.kernel.org>,\n\t\"linux-arm-kernel@lists.infradead.org\" \n\t<linux-arm-kernel@lists.infradead.org>,\n\tlinux-mediatek@lists.infradead.org, \n\t\"linux-kernel@vger.kernel.org\" <linux-kernel@vger.kernel.org>,\n\tlinux-rtc@vger.kernel.org","Content-Type":"text/plain; charset=\"UTF-8\"","Sender":"devicetree-owner@vger.kernel.org","Precedence":"bulk","List-ID":"<devicetree.vger.kernel.org>","X-Mailing-List":"devicetree@vger.kernel.org"}},{"id":1774498,"web_url":"http://patchwork.ozlabs.org/comment/1774498/","msgid":"<1506327256.19409.16.camel@mhfsdcap03>","list_archive_url":null,"date":"2017-09-25T08:14:16","subject":"Re: [PATCH v4 2/5] dt-bindings: input: Add document bindings for\n\tmtk-pmic-keys","submitter":{"id":72090,"url":"http://patchwork.ozlabs.org/api/people/72090/","name":"Chen Zhong","email":"chen.zhong@mediatek.com"},"content":"On Sun, 2017-09-24 at 23:11 -0500, Rob Herring wrote:\n> On Sat, Sep 23, 2017 at 1:47 AM, Chen Zhong <chen.zhong@mediatek.com> wrote:\n> > Sorry for the typo.\n> >\n> > On Sat, 2017-09-23 at 14:38 +0800, Chen Zhong wrote:\n> >> On Wed, 2017-09-20 at 15:53 -0500, Rob Herring wrote:\n> >> > On Sun, Sep 17, 2017 at 04:00:49PM +0800, Chen Zhong wrote:\n> >> > > This patch adds the device tree binding documentation for the MediaTek\n> >> > > pmic keys found on PMIC MT6397/MT6323.\n> >> > >\n> >> > > Signed-off-by: Chen Zhong <chen.zhong@mediatek.com>\n> >> > > ---\n> >> > >  .../devicetree/bindings/input/mtk-pmic-keys.txt    |   41 ++++++++++++++++++++\n> >> > >  1 file changed, 41 insertions(+)\n> >> > >  create mode 100644 Documentation/devicetree/bindings/input/mtk-pmic-keys.txt\n> >> > >\n> >> > > diff --git a/Documentation/devicetree/bindings/input/mtk-pmic-keys.txt b/Documentation/devicetree/bindings/input/mtk-pmic-keys.txt\n> >> > > new file mode 100644\n> >> > > index 0000000..fd48ff7\n> >> > > --- /dev/null\n> >> > > +++ b/Documentation/devicetree/bindings/input/mtk-pmic-keys.txt\n> >> > > @@ -0,0 +1,41 @@\n> >> > > +MediaTek MT6397/MT6323 PMIC Keys Device Driver\n> >> > > +\n> >> > > +There are two key functions provided by MT6397/MT6323 PMIC, pwrkey\n> >> > > +and homekey. The key functions are defined as the subnode of the function\n> >> > > +node provided by MT6397/MT6323 PMIC that is being defined as one kind\n> >> > > +of Muti-Function Device (MFD)\n> >> > > +\n> >> > > +For MT6397/MT6323 MFD bindings see:\n> >> > > +Documentation/devicetree/bindings/mfd/mt6397.txt\n> >> > > +\n> >> > > +Required properties:\n> >> > > +- compatible: \"mediatek,mt6397-keys\" or \"mediatek,mt6323-keys\"\n> >> > > +- linux,keycodes: Specifies the numeric keycode values to\n> >> > > + be used for reporting keys presses. The array can\n> >> > > + contain up to 2 entries.\n> >> > > +\n> >> > > +Optional Properties:\n> >> > > +- mediatek,wakeup-keys: Specifies each key can be used as a wakeup source\n> >> > > + or not. This can be customized depends on board design.\n> >> >\n> >> > I think this should be a common property if we're going to put into DT.\n> >> > Something like \"wakeup-scancodes\" to be clear the values are the raw\n> >> > scancodes. Alternatively, we could list Linux keycodes instead with\n> >> > something like \"linux,wakeup-keycodes\".\n> >> >\n> >> > > +- wakeup-source: PMIC keys can be used as wakeup sources.\n> >> >\n> >> > Just \"See ../power/wakeup-source.txt\" for the description.\n> >> >\n> >> > > +- mediatek,long-press-mode: Long press key shutdown setting, 1 for\n> >> > > + pwrkey only, 2 for pwrkey/homekey together, others for disabled.\n> >> > > +- debounce-interval: Long press key shutdown debouncing interval time\n> >> > > + in seconds. 0/1/2/3 for 8/11/14/5 seconds. If not specified defaults to 0.\n> >> >\n> >> > This property units should be in milliseconds. However, this doesn't\n> >> > sound like debounce filtering time if 5-14 seconds. That sounds like\n> >> > forced power off time (i.e. for a hung device). This also should be\n> >> > common. I imagine we already have some drivers with similar properties.\n> >>\n> >> Hi Rob,\n> >>\n> >> I searched in kernel documents and found a similar usage in\n> >> \"ti,palmas-pwrbutton.txt\"\n> >> \"- ti,palmas-long-press-seconds: Duration in seconds which the power\n> >>   button should be kept pressed for Palmas to power off automatically.\"\n> >>\n> >> Could I just wrote it like this?\n> >> mediatek,long-press-seconds = <0>;\n> \n> That doesn't really tell what the long press does. How about\n> \"power-off-time-sec\"? Surprisingly we don't have a common keyboard\n> binding doc, so please start one and document it there. Then just\n> refer to it.\n> \n\nOK, I will add a common document named \"keys.txt\" and put the long press\nproperty \"power-off-time-sec\" there as a common property.\n\n> >>\n> >> And for the wakeup source part, how about Dmitry's suggestion?\n> \n> It's fine for me.\n> \n> >> The whole device node would be:\n> >>\n> >> mt6397keys: mt6397keys {\n> >>       compatible = \"mediatek,mt6397-keys\";\n> >>       mediatek,long-press-mode = <1>;\n> >>       mediatek,long-press-seconds = <0>;\n> >>\n> >>       power@0 {\n> >>               linux,code = <116>;\n> \n> linux,keycodes\n> \n> Also, you either need a reg property with \"0\" or drop the unit address.\n\nThere is no need to add reg property here, I'll drop the unit address.\n\nThank you.\n> \n> >>               wakeup-source;\n> >>       };\n> >>\n> >>       home@0 {\n> > should be home@1 {\n> >>               linux,code = <114>;\n> >>       };\n> >> };\n> >>\n> >> Thank you.\n> >>\n> >> >\n> >> > Rob\n> >>\n> >\n> >\n\n\n--\nTo unsubscribe from this list: send the line \"unsubscribe devicetree\" in\nthe body of a message to majordomo@vger.kernel.org\nMore majordomo info at  http://vger.kernel.org/majordomo-info.html","headers":{"Return-Path":"<devicetree-owner@vger.kernel.org>","X-Original-To":"incoming-dt@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming-dt@bilbo.ozlabs.org","Authentication-Results":"ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=vger.kernel.org\n\t(client-ip=209.132.180.67; helo=vger.kernel.org;\n\tenvelope-from=devicetree-owner@vger.kernel.org; receiver=<UNKNOWN>)","Received":["from vger.kernel.org (vger.kernel.org [209.132.180.67])\n\tby ozlabs.org (Postfix) with ESMTP id 3y0xhN73ZVz9t5c\n\tfor <incoming-dt@patchwork.ozlabs.org>;\n\tMon, 25 Sep 2017 18:14:44 +1000 (AEST)","(majordomo@vger.kernel.org) by vger.kernel.org via listexpand\n\tid S1751880AbdIYIO1 (ORCPT\n\t<rfc822;incoming-dt@patchwork.ozlabs.org>);\n\tMon, 25 Sep 2017 04:14:27 -0400","from mailgw02.mediatek.com ([210.61.82.184]:49463 \"EHLO\n\tmailgw02.mediatek.com\" rhost-flags-OK-FAIL-OK-FAIL) by\n\tvger.kernel.org with ESMTP id S1751408AbdIYIOY (ORCPT\n\t<rfc822; devicetree@vger.kernel.org>); Mon, 25 Sep 2017 04:14:24 -0400","from mtkcas07.mediatek.inc [(172.21.101.84)] by\n\tmailgw02.mediatek.com (envelope-from <chen.zhong@mediatek.com>)\n\t(mhqrelay.mediatek.com ESMTP with TLS)\n\twith ESMTP id 557830102; Mon, 25 Sep 2017 16:14:18 +0800","from MTKCAS32.mediatek.inc (172.27.4.184) by\n\tmtkmbs08n2.mediatek.inc\n\t(172.21.101.56) with Microsoft SMTP Server (TLS) id 15.0.1210.3;\n\tMon, 25 Sep 2017 16:13:48 +0800","from [10.17.3.153] (10.17.3.153) by MTKCAS32.mediatek.inc\n\t(172.27.4.170) with Microsoft SMTP Server id 15.0.1210.3 via Frontend\n\tTransport; Mon, 25 Sep 2017 16:14:04 +0800"],"X-UUID":"4d3a56592afc40ba93b7276f3766322c-20170925","Message-ID":"<1506327256.19409.16.camel@mhfsdcap03>","Subject":"Re: [PATCH v4 2/5] dt-bindings: input: Add document bindings for\n\tmtk-pmic-keys","From":"Chen Zhong <chen.zhong@mediatek.com>","To":"Rob Herring <robh@kernel.org>","CC":"Dmitry Torokhov <dmitry.torokhov@gmail.com>,\n\tLee Jones <lee.jones@linaro.org>,\n\tAlexandre Belloni <alexandre.belloni@free-electrons.com>,\n\tMark Rutland <mark.rutland@arm.com>,\n\tMatthias Brugger <matthias.bgg@gmail.com>,\n\t\"Eddie Huang\" <eddie.huang@mediatek.com>,\n\tAlessandro Zummo <a.zummo@towertech.it>,\n\tAndi Shyti <andi.shyti@samsung.com>,\n\tJaechul Lee <jcsing.lee@samsung.com>, \n\tKrzysztof Kozlowski <krzk@kernel.org>,\n\tLinus Walleij <linus.walleij@linaro.org>,\n\t\"linux-input@vger.kernel.org\" <linux-input@vger.kernel.org>,\n\t\"devicetree@vger.kernel.org\" <devicetree@vger.kernel.org>,\n\t\"linux-arm-kernel@lists.infradead.org\" \n\t<linux-arm-kernel@lists.infradead.org>,\n\t<linux-mediatek@lists.infradead.org>,\n\t\"linux-kernel@vger.kernel.org\" <linux-kernel@vger.kernel.org>,\n\t<linux-rtc@vger.kernel.org>","Date":"Mon, 25 Sep 2017 16:14:16 +0800","In-Reply-To":"<CAL_JsqJZtn7YLn6o9mQMPD+kuseKLbfKe+JiY=1BosqnVqi5Kw@mail.gmail.com>","References":"<1505635252-27716-1-git-send-email-chen.zhong@mediatek.com>\n\t<1505635252-27716-3-git-send-email-chen.zhong@mediatek.com>\n\t<20170920205301.v6gpmhll4pdpuyxv@rob-hp-laptop>\n\t<1506148695.19409.10.camel@mhfsdcap03>\n\t<1506149223.19409.11.camel@mhfsdcap03>\n\t<CAL_JsqJZtn7YLn6o9mQMPD+kuseKLbfKe+JiY=1BosqnVqi5Kw@mail.gmail.com>","Content-Type":"text/plain; charset=\"UTF-8\"","X-Mailer":"Evolution 3.2.3-0ubuntu6 ","Content-Transfer-Encoding":"7bit","MIME-Version":"1.0","X-MTK":"N","Sender":"devicetree-owner@vger.kernel.org","Precedence":"bulk","List-ID":"<devicetree.vger.kernel.org>","X-Mailing-List":"devicetree@vger.kernel.org"}}]