[{"id":1761034,"web_url":"http://patchwork.ozlabs.org/comment/1761034/","msgid":"<CACRpkdbpJ08t3XkzUsQUFZwvzCY5m1AYZ1f84LDmn-=tEV4U+A@mail.gmail.com>","list_archive_url":null,"date":"2017-08-31T14:07:35","subject":"Re: [PATCHv4 3/5] dt-bindings: document the CEC GPIO bindings","submitter":{"id":7055,"url":"http://patchwork.ozlabs.org/api/people/7055/","name":"Linus Walleij","email":"linus.walleij@linaro.org"},"content":"On Thu, Aug 31, 2017 at 1:01 PM, Hans Verkuil <hverkuil@xs4all.nl> wrote:\n\n> From: Hans Verkuil <hans.verkuil@cisco.com>\n>\n> Document the bindings for the cec-gpio module for hardware where the\n> CEC line and optionally the HPD line are connected to GPIO lines.\n>\n> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>\n\nReviewed-by: Linus Walleij <linus.walleij@linaro.org>\n\nYours,\nLinus Walleij\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>)","ozlabs.org;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=linaro.org header.i=@linaro.org\n\theader.b=\"Yt+/m0y7\"; dkim-atps=neutral"],"Received":["from vger.kernel.org (vger.kernel.org [209.132.180.67])\n\tby ozlabs.org (Postfix) with ESMTP id 3xjkj95P5wz9sD9\n\tfor <incoming-dt@patchwork.ozlabs.org>;\n\tFri,  1 Sep 2017 00:07:41 +1000 (AEST)","(majordomo@vger.kernel.org) by vger.kernel.org via listexpand\n\tid S1751641AbdHaOHj (ORCPT\n\t<rfc822;incoming-dt@patchwork.ozlabs.org>);\n\tThu, 31 Aug 2017 10:07:39 -0400","from mail-oi0-f47.google.com ([209.85.218.47]:33886 \"EHLO\n\tmail-oi0-f47.google.com\" rhost-flags-OK-OK-OK-OK) by vger.kernel.org\n\twith ESMTP id S1751639AbdHaOHg (ORCPT\n\t<rfc822; devicetree@vger.kernel.org>); Thu, 31 Aug 2017 10:07:36 -0400","by mail-oi0-f47.google.com with SMTP id w10so6352703oie.1\n\tfor <devicetree@vger.kernel.org>;\n\tThu, 31 Aug 2017 07:07:36 -0700 (PDT)","by 10.157.58.74 with HTTP; Thu, 31 Aug 2017 07:07:35 -0700 (PDT)"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google;\n\th=mime-version:in-reply-to:references:from:date:message-id:subject:to\n\t:cc; bh=LBNhmVP1uxpuneDKiOaWp4oFwsvwsIl+XTETsfRCAAI=;\n\tb=Yt+/m0y75nz0cyYm7oPnpYzufT6qf29ryrE+jILze3U0z7RQOLZ6dLLcgSo85OU9lN\n\t9QsVyI7Foc8OX25UALxFbyOV4buttnW2oobSHpKxeYkySEPcwWhWGVEC697lxWNSf26N\n\tAjQGCT3BFDEYezZ+Tw/pnTenLbKU8yrCCi5/4=","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:mime-version:in-reply-to:references:from:date\n\t:message-id:subject:to:cc;\n\tbh=LBNhmVP1uxpuneDKiOaWp4oFwsvwsIl+XTETsfRCAAI=;\n\tb=OJGO0R4jQKf+T6juJ3hBZWEsK6Tj26gnmU933UYzwzhehWwFb3jNLbhA5mK225ec2U\n\tUrBmz0xCr9421L5hGZAyuj6syfQeCfujWb0Ufcq3S7fnYbdSr3cc6i/eD5Fm4+H+x7HG\n\tWNKWV4PQLSz8LEGiRz4otWkTgGCrN7O0APFN3Mp5h4B2XAkFwLrRsjMhDwrxhcHhAPUM\n\tfPrkcT3jALjaNgNWCmXMkxDnjo6xwKKGz330R89r/gPFzNdrDmkboxCMJDgF3zL1YjhZ\n\tQ4IWbc4119Ve6HYqnSdM461l1CBj0lxrCltcNCnrhPVLqsy2oaT5XZ8ZmEp5FdOrRvTj\n\tmorw==","X-Gm-Message-State":"AHYfb5iL6FkvCVDS/uVxN/iUbHPA+Xep2zcIivZE0bFHjE9iBGGoG0Lc\n\tcnE00hKfFXbpStv/TScjOlwCRcBmwqZy","X-Google-Smtp-Source":"ADKCNb72+20rj6O3tK98y4DFsOZmPsYpaTPxm3aRMgHRg/6QlQnQbS+bGFnJN4+c7ZB6+i4Cr6Ef66sly6b/jq405l4=","X-Received":"by 10.202.252.201 with SMTP id\n\ta192mr5914471oii.273.1504188455689; \n\tThu, 31 Aug 2017 07:07:35 -0700 (PDT)","MIME-Version":"1.0","In-Reply-To":"<20170831110156.11018-4-hverkuil@xs4all.nl>","References":"<20170831110156.11018-1-hverkuil@xs4all.nl>\n\t<20170831110156.11018-4-hverkuil@xs4all.nl>","From":"Linus Walleij <linus.walleij@linaro.org>","Date":"Thu, 31 Aug 2017 16:07:35 +0200","Message-ID":"<CACRpkdbpJ08t3XkzUsQUFZwvzCY5m1AYZ1f84LDmn-=tEV4U+A@mail.gmail.com>","Subject":"Re: [PATCHv4 3/5] dt-bindings: document the CEC GPIO bindings","To":"Hans Verkuil <hverkuil@xs4all.nl>","Cc":"\"linux-media@vger.kernel.org\" <linux-media@vger.kernel.org>,\n\t\"open list:DRM PANEL DRIVERS\" <dri-devel@lists.freedesktop.org>,\n\t\"devicetree@vger.kernel.org\" <devicetree@vger.kernel.org>,\n\tHans Verkuil <hans.verkuil@cisco.com>","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":1766101,"web_url":"http://patchwork.ozlabs.org/comment/1766101/","msgid":"<4e7da7f9-4a54-975c-3fcb-7023bed8b6c6@xs4all.nl>","list_archive_url":null,"date":"2017-09-11T07:42:03","subject":"Re: [PATCHv4 3/5] dt-bindings: document the CEC GPIO bindings","submitter":{"id":723,"url":"http://patchwork.ozlabs.org/api/people/723/","name":"Hans Verkuil","email":"hverkuil@xs4all.nl"},"content":"Ping!\n\nStill waiting for an Ack from the devicetree devs so this can be merged for 4.15.\n\nRegards,\n\n\tHans\n\nOn 08/31/2017 01:01 PM, Hans Verkuil wrote:\n> From: Hans Verkuil <hans.verkuil@cisco.com>\n> \n> Document the bindings for the cec-gpio module for hardware where the\n> CEC line and optionally the HPD line are connected to GPIO lines.\n> \n> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>\n> ---\n>  .../devicetree/bindings/media/cec-gpio.txt         | 22 ++++++++++++++++++++++\n>  1 file changed, 22 insertions(+)\n>  create mode 100644 Documentation/devicetree/bindings/media/cec-gpio.txt\n> \n> diff --git a/Documentation/devicetree/bindings/media/cec-gpio.txt b/Documentation/devicetree/bindings/media/cec-gpio.txt\n> new file mode 100644\n> index 000000000000..db20a7452dbd\n> --- /dev/null\n> +++ b/Documentation/devicetree/bindings/media/cec-gpio.txt\n> @@ -0,0 +1,22 @@\n> +* HDMI CEC GPIO driver\n> +\n> +The HDMI CEC GPIO module supports CEC implementations where the CEC line\n> +is hooked up to a pull-up GPIO line and - optionally - the HPD line is\n> +hooked up to another GPIO line.\n> +\n> +Required properties:\n> +  - compatible: value must be \"cec-gpio\"\n> +  - cec-gpio: gpio that the CEC line is connected to\n> +\n> +Optional property:\n> +  - hpd-gpio: gpio that the HPD line is connected to\n> +\n> +Example for the Raspberry Pi 3 where the CEC line is connected to\n> +pin 26 aka BCM7 aka CE1 on the GPIO pin header and the HPD line is\n> +connected to pin 11 aka BCM17:\n> +\n> +cec-gpio@7 {\n> +       compatible = \"cec-gpio\";\n> +       cec-gpio = <&gpio 7 GPIO_OPEN_DRAIN>;\n> +       hpd-gpio = <&gpio 17 GPIO_ACTIVE_HIGH>;\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 3xrKdL2pWmz9s83\n\tfor <incoming-dt@patchwork.ozlabs.org>;\n\tMon, 11 Sep 2017 17:42:14 +1000 (AEST)","(majordomo@vger.kernel.org) by vger.kernel.org via listexpand\n\tid S1750999AbdIKHmL (ORCPT\n\t<rfc822;incoming-dt@patchwork.ozlabs.org>);\n\tMon, 11 Sep 2017 03:42:11 -0400","from lb3-smtp-cloud7.xs4all.net ([194.109.24.31]:38728 \"EHLO\n\tlb3-smtp-cloud7.xs4all.net\" rhost-flags-OK-OK-OK-OK)\n\tby vger.kernel.org with ESMTP id S1750954AbdIKHmK (ORCPT\n\t<rfc822; devicetree@vger.kernel.org>); Mon, 11 Sep 2017 03:42:10 -0400","from [192.168.2.10] ([212.251.195.8])\n\tby smtp-cloud7.xs4all.net with ESMTPA\n\tid rJM3dGyuAb2snrJM7d6Ame; Mon, 11 Sep 2017 09:42:09 +0200"],"Subject":"Re: [PATCHv4 3/5] dt-bindings: document the CEC GPIO bindings","From":"Hans Verkuil <hverkuil@xs4all.nl>","To":"linux-media@vger.kernel.org","Cc":"dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org,\n\tLinus Walleij <linus.walleij@linaro.org>,\n\tHans Verkuil <hans.verkuil@cisco.com>","References":"<20170831110156.11018-1-hverkuil@xs4all.nl>\n\t<20170831110156.11018-4-hverkuil@xs4all.nl>","Message-ID":"<4e7da7f9-4a54-975c-3fcb-7023bed8b6c6@xs4all.nl>","Date":"Mon, 11 Sep 2017 09:42:03 +0200","User-Agent":"Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101\n\tThunderbird/52.2.1","MIME-Version":"1.0","In-Reply-To":"<20170831110156.11018-4-hverkuil@xs4all.nl>","Content-Type":"text/plain; charset=utf-8","Content-Language":"en-US","Content-Transfer-Encoding":"7bit","X-CMAE-Envelope":"MS4wfPAtraDkTKSwFdLQhTk7lC/wV49TZ64uYPpIH98uEh5OeEvhhK8KxRxpEBo11Jl5B6z847b64UsKGKZB8Wj7pb00iHc7BXNd3LYOb98KrFeXZs8mcGu3\n\tymgcjwsn7DDTclZrRWgXpY+nyX8XYU60MFMvF6II4A9LGEMkEOKNgpsPJ1BY3Y3goKegNkfklDZ6MhDHlv1/zBXKBziCFUXLmuUbARmWwHPimfjnIc9Em4r/\n\tQMMcgC8eUck8zALGG3rfj3KhldjOKlsqOrBObHDvf/6OmMAcyfO6lYi9Vvds325p7DAmlh75qVI1l+XBA1wYP5MfBVwtrZ3L4iM0MqBqit/PVgGCW5hFHK2A\n\tm0qZQz+x","Sender":"devicetree-owner@vger.kernel.org","Precedence":"bulk","List-ID":"<devicetree.vger.kernel.org>","X-Mailing-List":"devicetree@vger.kernel.org"}},{"id":1766549,"web_url":"http://patchwork.ozlabs.org/comment/1766549/","msgid":"<CACRpkdY195waN-SY2sKNhVBmz9pwAdriLPY14bqH7RakT86sKg@mail.gmail.com>","list_archive_url":null,"date":"2017-09-11T20:56:04","subject":"Re: [PATCHv4 3/5] dt-bindings: document the CEC GPIO bindings","submitter":{"id":7055,"url":"http://patchwork.ozlabs.org/api/people/7055/","name":"Linus Walleij","email":"linus.walleij@linaro.org"},"content":"On Thu, Aug 31, 2017 at 1:01 PM, Hans Verkuil <hverkuil@xs4all.nl> wrote:\n\n> +       cec-gpio = <&gpio 7 GPIO_OPEN_DRAIN>;\n\nActually if you want to be 100% specific:\n\ncec-gpio = <&gpio 7 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>;\n\n(Parens are needed.)\n\nBut I'm not very picky about that, active high is implicit.\n\nYours,\nLinus Walleij\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>)","ozlabs.org;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=linaro.org header.i=@linaro.org\n\theader.b=\"Wpoa6C5X\"; dkim-atps=neutral"],"Received":["from vger.kernel.org (vger.kernel.org [209.132.180.67])\n\tby ozlabs.org (Postfix) with ESMTP id 3xrgFN1gjqz9sCZ\n\tfor <incoming-dt@patchwork.ozlabs.org>;\n\tTue, 12 Sep 2017 06:56:08 +1000 (AEST)","(majordomo@vger.kernel.org) by vger.kernel.org via listexpand\n\tid S1751308AbdIKU4G (ORCPT\n\t<rfc822;incoming-dt@patchwork.ozlabs.org>);\n\tMon, 11 Sep 2017 16:56:06 -0400","from mail-io0-f178.google.com ([209.85.223.178]:33819 \"EHLO\n\tmail-io0-f178.google.com\" rhost-flags-OK-OK-OK-OK) by vger.kernel.org\n\twith ESMTP id S1751119AbdIKU4G (ORCPT\n\t<rfc822; devicetree@vger.kernel.org>); Mon, 11 Sep 2017 16:56:06 -0400","by mail-io0-f178.google.com with SMTP id v36so21922181ioi.1\n\tfor <devicetree@vger.kernel.org>;\n\tMon, 11 Sep 2017 13:56:06 -0700 (PDT)","by 10.79.164.78 with HTTP; Mon, 11 Sep 2017 13:56:04 -0700 (PDT)"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google;\n\th=mime-version:in-reply-to:references:from:date:message-id:subject:to\n\t:cc; bh=GIc3w+L42aCp9CnM9yIdlHNf3g6uEYhpmY7aw8puwA0=;\n\tb=Wpoa6C5X2NZ5LwYjDxfLlpmtkcluwvbJwX5F6vkcM/4pY3y7Hw99eEdjKaAGIJZp2d\n\tkFjhYjN90ACUPNvZDdCnkDqPtoRs+6dGk5199ej21g073QyLr8ox3HScv16E101zPrIp\n\tbLO8qXwrdrpO/ZhJ87PdOhAmEL8pHZiJS1iUY=","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:mime-version:in-reply-to:references:from:date\n\t:message-id:subject:to:cc;\n\tbh=GIc3w+L42aCp9CnM9yIdlHNf3g6uEYhpmY7aw8puwA0=;\n\tb=mRsIMGQ1VZlOftjQp9WsvIJGKD7VPaG0O0EzLDrgb/dfDDCgOwDrsD3cyW0cFJQbHP\n\tjjpuqdI7Ia0Hs89FlEASskyJnvdP1veCrwx93W2ySERdl7mqYNUYXS/GaYwOxkJghs6i\n\tt5dNq9AQFm2v4/IQDULXH1DVIIU/i+0fRn4+5kg3OIaUUTG02KcsPuboYp9fNBRWMfe8\n\tLDUFl+J2DFuIWhcSUNcu0QhmCsb+omO0Te5MH+cIrPz9jIqDtNzZiPjI51wRVh80fBBb\n\tUDf2TqKThbsT66dhbeDdynzbSoUQZIb4i5lwsn1UCkEDKRMQAwNhryYI8Tff3ie8uwnC\n\tM2Ag==","X-Gm-Message-State":"AHPjjUgqztXLqBoeHOu3UD8elDfoyInKfCAjgGJttJAAlvl5HBZB7ZKX\n\tSdOE2pe5PXiYaxvRd+B/BMgm9nrk6IwJ","X-Google-Smtp-Source":"AOwi7QDJJmExOvLWLLAxOWFBOota7icRTSMyvc2z8tbg5pzUZjHw7vTWd5u23okY/kFMzBTz+lHxKpKlOQKR5VzoiSs=","X-Received":"by 10.107.83.8 with SMTP id h8mr17448601iob.104.1505163365649;\n\tMon, 11 Sep 2017 13:56:05 -0700 (PDT)","MIME-Version":"1.0","In-Reply-To":"<20170831110156.11018-4-hverkuil@xs4all.nl>","References":"<20170831110156.11018-1-hverkuil@xs4all.nl>\n\t<20170831110156.11018-4-hverkuil@xs4all.nl>","From":"Linus Walleij <linus.walleij@linaro.org>","Date":"Mon, 11 Sep 2017 22:56:04 +0200","Message-ID":"<CACRpkdY195waN-SY2sKNhVBmz9pwAdriLPY14bqH7RakT86sKg@mail.gmail.com>","Subject":"Re: [PATCHv4 3/5] dt-bindings: document the CEC GPIO bindings","To":"Hans Verkuil <hverkuil@xs4all.nl>","Cc":"\"linux-media@vger.kernel.org\" <linux-media@vger.kernel.org>,\n\t\"open list:DRM PANEL DRIVERS\" <dri-devel@lists.freedesktop.org>,\n\t\"devicetree@vger.kernel.org\" <devicetree@vger.kernel.org>,\n\tHans Verkuil <hans.verkuil@cisco.com>","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":1767135,"web_url":"http://patchwork.ozlabs.org/comment/1767135/","msgid":"<20170912144308.j53eclicbhay5dsz@rob-hp-laptop>","list_archive_url":null,"date":"2017-09-12T14:43:08","subject":"Re: [PATCHv4 3/5] dt-bindings: document the CEC GPIO bindings","submitter":{"id":62529,"url":"http://patchwork.ozlabs.org/api/people/62529/","name":"Rob Herring (Arm)","email":"robh@kernel.org"},"content":"On Thu, Aug 31, 2017 at 01:01:54PM +0200, Hans Verkuil wrote:\n> From: Hans Verkuil <hans.verkuil@cisco.com>\n> \n> Document the bindings for the cec-gpio module for hardware where the\n> CEC line and optionally the HPD line are connected to GPIO lines.\n> \n> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>\n> ---\n>  .../devicetree/bindings/media/cec-gpio.txt         | 22 ++++++++++++++++++++++\n>  1 file changed, 22 insertions(+)\n>  create mode 100644 Documentation/devicetree/bindings/media/cec-gpio.txt\n> \n> diff --git a/Documentation/devicetree/bindings/media/cec-gpio.txt b/Documentation/devicetree/bindings/media/cec-gpio.txt\n> new file mode 100644\n> index 000000000000..db20a7452dbd\n> --- /dev/null\n> +++ b/Documentation/devicetree/bindings/media/cec-gpio.txt\n> @@ -0,0 +1,22 @@\n> +* HDMI CEC GPIO driver\n> +\n> +The HDMI CEC GPIO module supports CEC implementations where the CEC line\n> +is hooked up to a pull-up GPIO line and - optionally - the HPD line is\n> +hooked up to another GPIO line.\n> +\n> +Required properties:\n> +  - compatible: value must be \"cec-gpio\"\n> +  - cec-gpio: gpio that the CEC line is connected to\n\ncec-gpios\n\n> +\n> +Optional property:\n> +  - hpd-gpio: gpio that the HPD line is connected to\n\nhpd-gpios\n\nHowever, HPD is already part of the HDMI connector binding. Having it in \n2 places would be wrong.\n\nI think we should have either:\n\nhdmi-connector {\n\tcompatible = 'hdmi-connector-a\";\n\thpd-gpios = <...>;\n\tcec-gpios = <...>;\n\tports {\n\t\t// port to HDMI controller\n\t...\n\t};\n};\n\nOr:\n\nhdmi-connector {\n        compatible = 'hdmi-connector-a\";\n        hpd-gpios = <...>;\n        cec = <&cec>;\n        ... \n};\n\ncec: cec-gpio {\n\tcompatible = \"cec-gpio\";\n\tcec-gpios = <...>;\n};\n\nMy preference is probably the former. The latter just helps create a \ndevice to bind to a driver, but DT is not the only way to create \ndevices. Then again, if you have a phandle to real CEC controllers in \nthe HDMI connector node, it may make sense to do the same thing with \ncec-gpio. \n\n> +\n> +Example for the Raspberry Pi 3 where the CEC line is connected to\n> +pin 26 aka BCM7 aka CE1 on the GPIO pin header and the HPD line is\n> +connected to pin 11 aka BCM17:\n> +\n> +cec-gpio@7 {\n\nunit address is not valid. Build your dts's with W=2.\n\n> +       compatible = \"cec-gpio\";\n> +       cec-gpio = <&gpio 7 GPIO_OPEN_DRAIN>;\n> +       hpd-gpio = <&gpio 17 GPIO_ACTIVE_HIGH>;\n> +};\n> -- \n> 2.14.1\n> \n> --\n> To unsubscribe from this list: send the line \"unsubscribe devicetree\" in\n> the body of a message to majordomo@vger.kernel.org\n> More majordomo info at  http://vger.kernel.org/majordomo-info.html\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 3xs6wc6Fx1z9sNV\n\tfor <incoming-dt@patchwork.ozlabs.org>;\n\tWed, 13 Sep 2017 00:43:12 +1000 (AEST)","(majordomo@vger.kernel.org) by vger.kernel.org via listexpand\n\tid S1751411AbdILOnL (ORCPT\n\t<rfc822;incoming-dt@patchwork.ozlabs.org>);\n\tTue, 12 Sep 2017 10:43:11 -0400","from mail-io0-f194.google.com ([209.85.223.194]:35877 \"EHLO\n\tmail-io0-f194.google.com\" rhost-flags-OK-OK-OK-OK) by vger.kernel.org\n\twith ESMTP id S1751398AbdILOnK (ORCPT\n\t<rfc822; devicetree@vger.kernel.org>); Tue, 12 Sep 2017 10:43:10 -0400","by mail-io0-f194.google.com with SMTP id n69so5272059ioi.3;\n\tTue, 12 Sep 2017 07:43:10 -0700 (PDT)","from localhost (216-188-254-6.dyn.grandenetworks.net.\n\t[216.188.254.6]) by smtp.gmail.com with ESMTPSA id\n\tv75sm9446051oia.57.2017.09.12.07.43.08\n\t(version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256);\n\tTue, 12 Sep 2017 07:43:09 -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=3p40+IjJ0xP+GOSyMEyZQrVUB58n7uqwQlx8BX3TIWE=;\n\tb=FkaOS69yE6TxlyTeukpbVKb+vlXMGWuPvEwGy9hfTQsISfHD0SQLNxSzqBuMyfcQ3+\n\tyb6VKIsSgv8vBZY8a6beOpWcqhrJaUOKytZHIASKBL/unzDCqDHreI7vqbkGcxpTQwPf\n\tVR2p5iJaa5gy2x7zojDk5Ef9rYxQnShY7asf2KDz8mF2kG/A96d9JJGwaJ0zIrNbRFzU\n\tdFiIYc5oC3EeJb9Pe7Ya8eOzTEnQiYLdAdr+nSz25C9M0FKdjgwITiJAhoyFyqK9sphO\n\thNG/tOdfR1skDCaNddUyJ9OBe4w/BBd2W5KuSnGqmKIS6sFKDy8hv/f/p8xZZWfmO2Fw\n\tKCew==","X-Gm-Message-State":"AHPjjUh6xQNhhWn4Izp6xiY2YqngjZssUSxxA6VjNMUY3hTJxdvTO/9Y\n\t9acqkEWhbnsYwA==","X-Google-Smtp-Source":"AOwi7QACCucW4IfriAa0LNMrAiWgdJKwkn4TrzUlt/p5ZAILEfzMQDEH8OnruOO9g4eM91Dlqjui/A==","X-Received":"by 10.202.75.193 with SMTP id y184mr8381566oia.8.1505227389706; \n\tTue, 12 Sep 2017 07:43:09 -0700 (PDT)","Date":"Tue, 12 Sep 2017 09:43:08 -0500","From":"Rob Herring <robh@kernel.org>","To":"Hans Verkuil <hverkuil@xs4all.nl>","Cc":"linux-media@vger.kernel.org, dri-devel@lists.freedesktop.org,\n\tdevicetree@vger.kernel.org, Linus Walleij <linus.walleij@linaro.org>, \n\tHans Verkuil <hans.verkuil@cisco.com>","Subject":"Re: [PATCHv4 3/5] dt-bindings: document the CEC GPIO bindings","Message-ID":"<20170912144308.j53eclicbhay5dsz@rob-hp-laptop>","References":"<20170831110156.11018-1-hverkuil@xs4all.nl>\n\t<20170831110156.11018-4-hverkuil@xs4all.nl>","MIME-Version":"1.0","Content-Type":"text/plain; charset=us-ascii","Content-Disposition":"inline","In-Reply-To":"<20170831110156.11018-4-hverkuil@xs4all.nl>","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":1767670,"web_url":"http://patchwork.ozlabs.org/comment/1767670/","msgid":"<30a2fa9d-1aa9-84c1-7842-05167eee73d3@xs4all.nl>","list_archive_url":null,"date":"2017-09-13T08:21:07","subject":"Re: [PATCHv4 3/5] dt-bindings: document the CEC GPIO bindings","submitter":{"id":723,"url":"http://patchwork.ozlabs.org/api/people/723/","name":"Hans Verkuil","email":"hverkuil@xs4all.nl"},"content":"On 09/12/2017 04:43 PM, Rob Herring wrote:\n> On Thu, Aug 31, 2017 at 01:01:54PM +0200, Hans Verkuil wrote:\n>> From: Hans Verkuil <hans.verkuil@cisco.com>\n>>\n>> Document the bindings for the cec-gpio module for hardware where the\n>> CEC line and optionally the HPD line are connected to GPIO lines.\n>>\n>> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>\n>> ---\n>>  .../devicetree/bindings/media/cec-gpio.txt         | 22 ++++++++++++++++++++++\n>>  1 file changed, 22 insertions(+)\n>>  create mode 100644 Documentation/devicetree/bindings/media/cec-gpio.txt\n>>\n>> diff --git a/Documentation/devicetree/bindings/media/cec-gpio.txt b/Documentation/devicetree/bindings/media/cec-gpio.txt\n>> new file mode 100644\n>> index 000000000000..db20a7452dbd\n>> --- /dev/null\n>> +++ b/Documentation/devicetree/bindings/media/cec-gpio.txt\n>> @@ -0,0 +1,22 @@\n>> +* HDMI CEC GPIO driver\n>> +\n>> +The HDMI CEC GPIO module supports CEC implementations where the CEC line\n>> +is hooked up to a pull-up GPIO line and - optionally - the HPD line is\n>> +hooked up to another GPIO line.\n>> +\n>> +Required properties:\n>> +  - compatible: value must be \"cec-gpio\"\n>> +  - cec-gpio: gpio that the CEC line is connected to\n> \n> cec-gpios\n\nWill change.\n\n> \n>> +\n>> +Optional property:\n>> +  - hpd-gpio: gpio that the HPD line is connected to\n> \n> hpd-gpios\n\nWill change.\n\n> \n> However, HPD is already part of the HDMI connector binding. Having it in \n> 2 places would be wrong.\n\nNo. This is not an HDMI receiver/transmitter. There are two use-cases for this\ndriver:\n\n1) For HDMI receivers/transmitters that connect the CEC pin of an HDMI connector\n   to a GPIO pin. In that case the HPD goes to the HDMI transmitter/receiver and\n   not to this driver. As you say, that would not make any sense.\n\n   But currently no such devices are in the kernel (I know they exist, though).\n   Once such a driver would appear in the kernel then these bindings need to be\n   extended with an hdmi-phandle.\n\n2) This driver is used for debugging CEC like this:\n\n\thttps://hverkuil.home.xs4all.nl/rpi3-cec.jpg\n\n   Here the CEC pin of an HDMI breakout connector is hooked up to a Raspberry Pi\n   GPIO pin and the RPi monitors it. It's a cheap but very effective CEC analyzer.\n   In this use-case it is very helpful to also monitor the HPD pin since some\n   displays do weird things with the HPD and knowing the state of the HPD helps\n   a lot when debugging CEC problems. It's optional and it only monitors the pin.\n\n   Actually, there does not have to be an HDMI connector involved at all: you can\n   make two cec-gpio instances and just connect the two GPIO pins together in\n   order to emulate two CEC adapters and play with that.\n\n> \n> I think we should have either:\n> \n> hdmi-connector {\n> \tcompatible = 'hdmi-connector-a\";\n> \thpd-gpios = <...>;\n> \tcec-gpios = <...>;\n> \tports {\n> \t\t// port to HDMI controller\n> \t...\n> \t};\n> };\n> \n> Or:\n> \n> hdmi-connector {\n>         compatible = 'hdmi-connector-a\";\n>         hpd-gpios = <...>;\n>         cec = <&cec>;\n>         ... \n> };\n> \n> cec: cec-gpio {\n> \tcompatible = \"cec-gpio\";\n> \tcec-gpios = <...>;\n> };\n> \n> My preference is probably the former. The latter just helps create a \n> device to bind to a driver, but DT is not the only way to create \n> devices. Then again, if you have a phandle to real CEC controllers in \n> the HDMI connector node, it may make sense to do the same thing with \n> cec-gpio. \n> \n>> +\n>> +Example for the Raspberry Pi 3 where the CEC line is connected to\n>> +pin 26 aka BCM7 aka CE1 on the GPIO pin header and the HPD line is\n>> +connected to pin 11 aka BCM17:\n>> +\n>> +cec-gpio@7 {\n> \n> unit address is not valid. Build your dts's with W=2.\n\nI'll do that.\n\n> \n>> +       compatible = \"cec-gpio\";\n>> +       cec-gpio = <&gpio 7 GPIO_OPEN_DRAIN>;\n>> +       hpd-gpio = <&gpio 17 GPIO_ACTIVE_HIGH>;\n>> +};\n>> -- \n>> 2.14.1\n\nRegards,\n\n\tHans\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 3xsZPV1HzTz9s7g\n\tfor <incoming-dt@patchwork.ozlabs.org>;\n\tWed, 13 Sep 2017 18:21:18 +1000 (AEST)","(majordomo@vger.kernel.org) by vger.kernel.org via listexpand\n\tid S1751238AbdIMIVP (ORCPT\n\t<rfc822;incoming-dt@patchwork.ozlabs.org>);\n\tWed, 13 Sep 2017 04:21:15 -0400","from lb3-smtp-cloud8.xs4all.net ([194.109.24.29]:60278 \"EHLO\n\tlb3-smtp-cloud8.xs4all.net\" rhost-flags-OK-OK-OK-OK)\n\tby vger.kernel.org with ESMTP id S1750776AbdIMIVN (ORCPT\n\t<rfc822; devicetree@vger.kernel.org>); Wed, 13 Sep 2017 04:21:13 -0400","from [192.168.2.10] ([212.251.195.8])\n\tby smtp-cloud8.xs4all.net with ESMTPA\n\tid s2uxd0zzhcQyLs2v0dxRAV; Wed, 13 Sep 2017 10:21:12 +0200"],"Subject":"Re: [PATCHv4 3/5] dt-bindings: document the CEC GPIO bindings","To":"Rob Herring <robh@kernel.org>","Cc":"linux-media@vger.kernel.org, dri-devel@lists.freedesktop.org,\n\tdevicetree@vger.kernel.org, Linus Walleij <linus.walleij@linaro.org>, \n\tHans Verkuil <hans.verkuil@cisco.com>","References":"<20170831110156.11018-1-hverkuil@xs4all.nl>\n\t<20170831110156.11018-4-hverkuil@xs4all.nl>\n\t<20170912144308.j53eclicbhay5dsz@rob-hp-laptop>","From":"Hans Verkuil <hverkuil@xs4all.nl>","Message-ID":"<30a2fa9d-1aa9-84c1-7842-05167eee73d3@xs4all.nl>","Date":"Wed, 13 Sep 2017 10:21:07 +0200","User-Agent":"Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101\n\tThunderbird/52.2.1","MIME-Version":"1.0","In-Reply-To":"<20170912144308.j53eclicbhay5dsz@rob-hp-laptop>","Content-Type":"text/plain; charset=utf-8","Content-Language":"en-US","Content-Transfer-Encoding":"7bit","X-CMAE-Envelope":"MS4wfPrmRGOaEyoJFI/GNPUdZpCVxv4UkQ3+Q8Q1gp/keA+Tp5KCJT6BFatx06qTz6I/J+oJDXdzf/gR6/dalnPXyeZWhCpG1IkCKp9nEajha5AbDjpKouwX\n\tUAFpvq2MhUjbHKJwyoVbgqJ3pMO9r/8RxfxKpszKaiFWyKcw6iR3hFQqLfJviYVKER6U78nnXINYecJVwrqpDy3TrzS3Yo7IDNXvtnf5wwXVh9SQtBC/4JwQ\n\tuTmZl6O+ARuq2p8c3xg3Lo54+Ja8EpVGokQX7MdfMaq5iEMAgIjjEfZyLIJzaEcF","Sender":"devicetree-owner@vger.kernel.org","Precedence":"bulk","List-ID":"<devicetree.vger.kernel.org>","X-Mailing-List":"devicetree@vger.kernel.org"}},{"id":1769048,"web_url":"http://patchwork.ozlabs.org/comment/1769048/","msgid":"<89739d22-bce2-e31e-fd00-5e7c2fae2148@xs4all.nl>","list_archive_url":null,"date":"2017-09-15T08:40:53","subject":"Re: [PATCHv4 3/5] dt-bindings: document the CEC GPIO bindings","submitter":{"id":723,"url":"http://patchwork.ozlabs.org/api/people/723/","name":"Hans Verkuil","email":"hverkuil@xs4all.nl"},"content":"Hi Rob,\n\nOn 09/13/17 10:21, Hans Verkuil wrote:\n> On 09/12/2017 04:43 PM, Rob Herring wrote:\n>> On Thu, Aug 31, 2017 at 01:01:54PM +0200, Hans Verkuil wrote:\n>>> From: Hans Verkuil <hans.verkuil@cisco.com>\n>>>\n>>> Document the bindings for the cec-gpio module for hardware where the\n>>> CEC line and optionally the HPD line are connected to GPIO lines.\n>>>\n>>> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>\n>>> ---\n>>>  .../devicetree/bindings/media/cec-gpio.txt         | 22 ++++++++++++++++++++++\n>>>  1 file changed, 22 insertions(+)\n>>>  create mode 100644 Documentation/devicetree/bindings/media/cec-gpio.txt\n>>>\n>>> diff --git a/Documentation/devicetree/bindings/media/cec-gpio.txt b/Documentation/devicetree/bindings/media/cec-gpio.txt\n>>> new file mode 100644\n>>> index 000000000000..db20a7452dbd\n>>> --- /dev/null\n>>> +++ b/Documentation/devicetree/bindings/media/cec-gpio.txt\n>>> @@ -0,0 +1,22 @@\n>>> +* HDMI CEC GPIO driver\n>>> +\n>>> +The HDMI CEC GPIO module supports CEC implementations where the CEC line\n>>> +is hooked up to a pull-up GPIO line and - optionally - the HPD line is\n>>> +hooked up to another GPIO line.\n>>> +\n>>> +Required properties:\n>>> +  - compatible: value must be \"cec-gpio\"\n>>> +  - cec-gpio: gpio that the CEC line is connected to\n>>\n>> cec-gpios\n> \n> Will change.\n> \n>>\n>>> +\n>>> +Optional property:\n>>> +  - hpd-gpio: gpio that the HPD line is connected to\n>>\n>> hpd-gpios\n> \n> Will change.\n> \n>>\n>> However, HPD is already part of the HDMI connector binding. Having it in \n>> 2 places would be wrong.\n> \n> No. This is not an HDMI receiver/transmitter. There are two use-cases for this\n> driver:\n> \n> 1) For HDMI receivers/transmitters that connect the CEC pin of an HDMI connector\n>    to a GPIO pin. In that case the HPD goes to the HDMI transmitter/receiver and\n>    not to this driver. As you say, that would not make any sense.\n> \n>    But currently no such devices are in the kernel (I know they exist, though).\n>    Once such a driver would appear in the kernel then these bindings need to be\n>    extended with an hdmi-phandle.\n> \n> 2) This driver is used for debugging CEC like this:\n> \n> \thttps://hverkuil.home.xs4all.nl/rpi3-cec.jpg\n> \n>    Here the CEC pin of an HDMI breakout connector is hooked up to a Raspberry Pi\n>    GPIO pin and the RPi monitors it. It's a cheap but very effective CEC analyzer.\n>    In this use-case it is very helpful to also monitor the HPD pin since some\n>    displays do weird things with the HPD and knowing the state of the HPD helps\n>    a lot when debugging CEC problems. It's optional and it only monitors the pin.\n> \n>    Actually, there does not have to be an HDMI connector involved at all: you can\n>    make two cec-gpio instances and just connect the two GPIO pins together in\n>    order to emulate two CEC adapters and play with that.\n\nIs it OK to define a binding but not (yet) implement it? I have seen that in other\nbindings (well, OK, one other binding :-) ). If that is fine, then I can write the\nfollowing:\n\n----------------------------------------------------------------\nRequired properties:\n  - compatible: value must be \"cec-gpio\".\n  - cec-gpios: gpio that the CEC line is connected to.\n\nIf the CEC line is associated with an HDMI receiver/transmitter, then the following\nproperty is also required:\n\n  - hdmi-phandle - phandle to the HDMI controller, see also cec.txt.\n\nIf the CEC line is not associated with an HDMI receiver/transmitter, then the\nfollowing property is optional:\n\n  - hpd-gpios: gpio that the HPD line is connected to.\n----------------------------------------------------------------\n\nI have plans to support hdmi-phandle in the driver, but that probably won't be ready\nin time for 4.15.\n\nRegards,\n\n\tHans\n\n> \n>>\n>> I think we should have either:\n>>\n>> hdmi-connector {\n>> \tcompatible = 'hdmi-connector-a\";\n>> \thpd-gpios = <...>;\n>> \tcec-gpios = <...>;\n>> \tports {\n>> \t\t// port to HDMI controller\n>> \t...\n>> \t};\n>> };\n>>\n>> Or:\n>>\n>> hdmi-connector {\n>>         compatible = 'hdmi-connector-a\";\n>>         hpd-gpios = <...>;\n>>         cec = <&cec>;\n>>         ... \n>> };\n>>\n>> cec: cec-gpio {\n>> \tcompatible = \"cec-gpio\";\n>> \tcec-gpios = <...>;\n>> };\n>>\n>> My preference is probably the former. The latter just helps create a \n>> device to bind to a driver, but DT is not the only way to create \n>> devices. Then again, if you have a phandle to real CEC controllers in \n>> the HDMI connector node, it may make sense to do the same thing with \n>> cec-gpio. \n>>\n>>> +\n>>> +Example for the Raspberry Pi 3 where the CEC line is connected to\n>>> +pin 26 aka BCM7 aka CE1 on the GPIO pin header and the HPD line is\n>>> +connected to pin 11 aka BCM17:\n>>> +\n>>> +cec-gpio@7 {\n>>\n>> unit address is not valid. Build your dts's with W=2.\n> \n> I'll do that.\n> \n>>\n>>> +       compatible = \"cec-gpio\";\n>>> +       cec-gpio = <&gpio 7 GPIO_OPEN_DRAIN>;\n>>> +       hpd-gpio = <&gpio 17 GPIO_ACTIVE_HIGH>;\n>>> +};\n>>> -- \n>>> 2.14.1\n> \n> Regards,\n> \n> \tHans\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 3xtplJ6KpPz9sPr\n\tfor <incoming-dt@patchwork.ozlabs.org>;\n\tFri, 15 Sep 2017 18:41:00 +1000 (AEST)","(majordomo@vger.kernel.org) by vger.kernel.org via listexpand\n\tid S1751171AbdIOIk7 (ORCPT\n\t<rfc822;incoming-dt@patchwork.ozlabs.org>);\n\tFri, 15 Sep 2017 04:40:59 -0400","from lb1-smtp-cloud7.xs4all.net ([194.109.24.24]:50486 \"EHLO\n\tlb1-smtp-cloud7.xs4all.net\" rhost-flags-OK-OK-OK-OK)\n\tby vger.kernel.org with ESMTP id S1751164AbdIOIk7 (ORCPT\n\t<rfc822; devicetree@vger.kernel.org>); Fri, 15 Sep 2017 04:40:59 -0400","from [IPv6:2001:420:44c1:2579:908a:81eb:e23:78c6]\n\t([IPv6:2001:420:44c1:2579:908a:81eb:e23:78c6])\n\tby smtp-cloud7.xs4all.net with ESMTPA\n\tid smBBdU5mRG5oqsmBFdsX9U; Fri, 15 Sep 2017 10:40:57 +0200"],"Subject":"Re: [PATCHv4 3/5] dt-bindings: document the CEC GPIO bindings","From":"Hans Verkuil <hverkuil@xs4all.nl>","To":"Rob Herring <robh@kernel.org>","Cc":"linux-media@vger.kernel.org, dri-devel@lists.freedesktop.org,\n\tdevicetree@vger.kernel.org, Linus Walleij <linus.walleij@linaro.org>, \n\tHans Verkuil <hans.verkuil@cisco.com>","References":"<20170831110156.11018-1-hverkuil@xs4all.nl>\n\t<20170831110156.11018-4-hverkuil@xs4all.nl>\n\t<20170912144308.j53eclicbhay5dsz@rob-hp-laptop>\n\t<30a2fa9d-1aa9-84c1-7842-05167eee73d3@xs4all.nl>","Message-ID":"<89739d22-bce2-e31e-fd00-5e7c2fae2148@xs4all.nl>","Date":"Fri, 15 Sep 2017 10:40:53 +0200","User-Agent":"Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101\n\tThunderbird/52.2.1","MIME-Version":"1.0","In-Reply-To":"<30a2fa9d-1aa9-84c1-7842-05167eee73d3@xs4all.nl>","Content-Type":"text/plain; charset=utf-8","Content-Language":"en-US","Content-Transfer-Encoding":"7bit","X-CMAE-Envelope":"MS4wfMsfR11y/21YwBwu+sUUbxupJTJ0YNBuq2UM8lwiNy8Sa1+Tjh3XxFY9h5TRVsDkOR2PTksML8UKBkp7vwvYBhDRPL0AL/dcnKGpT1t14BUhSA0TzgTD\n\tiOiYstSYbRSNC2zfGS7UFMnAw7dQLrdkI9LoREZoVaCwJ6PKw3ZCuZjpJv33MMi5zUS4ynekvjtvBk4eNDOitpcZoMRzgJBq5949DjlNjudkLRZWPz4l4gPQ\n\tCT/FrwyAsGWcOm6WwgF359HEiCz0I90HCU9wyGIMH3xB0jY51MclYmUBQLZG+0Da1I18Q/S9fUu4uBPu5mxV29vFI6dW1UQ3ZYIQ6Dtb9cvAP592rK+SUxml\n\tpDOZsdHZIP+aKtQhfcO/NLJTLzK5P57yclbzV3CoOqZq4oKTNCw=","Sender":"devicetree-owner@vger.kernel.org","Precedence":"bulk","List-ID":"<devicetree.vger.kernel.org>","X-Mailing-List":"devicetree@vger.kernel.org"}},{"id":1769348,"web_url":"http://patchwork.ozlabs.org/comment/1769348/","msgid":"<CAL_JsqKZcXMFPrU548LoeS6qnjHKv_5P-8U_VyUPqt=_1LygUw@mail.gmail.com>","list_archive_url":null,"date":"2017-09-15T18:14:21","subject":"Re: [PATCHv4 3/5] dt-bindings: document the CEC GPIO bindings","submitter":{"id":62529,"url":"http://patchwork.ozlabs.org/api/people/62529/","name":"Rob Herring (Arm)","email":"robh@kernel.org"},"content":"On Fri, Sep 15, 2017 at 3:40 AM, Hans Verkuil <hverkuil@xs4all.nl> wrote:\n> Hi Rob,\n>\n> On 09/13/17 10:21, Hans Verkuil wrote:\n>> On 09/12/2017 04:43 PM, Rob Herring wrote:\n>>> On Thu, Aug 31, 2017 at 01:01:54PM +0200, Hans Verkuil wrote:\n>>>> From: Hans Verkuil <hans.verkuil@cisco.com>\n>>>>\n>>>> Document the bindings for the cec-gpio module for hardware where the\n>>>> CEC line and optionally the HPD line are connected to GPIO lines.\n>>>>\n>>>> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>\n>>>> ---\n>>>>  .../devicetree/bindings/media/cec-gpio.txt         | 22 ++++++++++++++++++++++\n>>>>  1 file changed, 22 insertions(+)\n>>>>  create mode 100644 Documentation/devicetree/bindings/media/cec-gpio.txt\n>>>>\n>>>> diff --git a/Documentation/devicetree/bindings/media/cec-gpio.txt b/Documentation/devicetree/bindings/media/cec-gpio.txt\n>>>> new file mode 100644\n>>>> index 000000000000..db20a7452dbd\n>>>> --- /dev/null\n>>>> +++ b/Documentation/devicetree/bindings/media/cec-gpio.txt\n>>>> @@ -0,0 +1,22 @@\n>>>> +* HDMI CEC GPIO driver\n>>>> +\n>>>> +The HDMI CEC GPIO module supports CEC implementations where the CEC line\n>>>> +is hooked up to a pull-up GPIO line and - optionally - the HPD line is\n>>>> +hooked up to another GPIO line.\n>>>> +\n>>>> +Required properties:\n>>>> +  - compatible: value must be \"cec-gpio\"\n>>>> +  - cec-gpio: gpio that the CEC line is connected to\n>>>\n>>> cec-gpios\n>>\n>> Will change.\n>>\n>>>\n>>>> +\n>>>> +Optional property:\n>>>> +  - hpd-gpio: gpio that the HPD line is connected to\n>>>\n>>> hpd-gpios\n>>\n>> Will change.\n>>\n>>>\n>>> However, HPD is already part of the HDMI connector binding. Having it in\n>>> 2 places would be wrong.\n>>\n>> No. This is not an HDMI receiver/transmitter. There are two use-cases for this\n>> driver:\n>>\n>> 1) For HDMI receivers/transmitters that connect the CEC pin of an HDMI connector\n>>    to a GPIO pin. In that case the HPD goes to the HDMI transmitter/receiver and\n>>    not to this driver. As you say, that would not make any sense.\n>>\n>>    But currently no such devices are in the kernel (I know they exist, though).\n>>    Once such a driver would appear in the kernel then these bindings need to be\n>>    extended with an hdmi-phandle.\n>>\n>> 2) This driver is used for debugging CEC like this:\n>>\n>>       https://hverkuil.home.xs4all.nl/rpi3-cec.jpg\n>>\n>>    Here the CEC pin of an HDMI breakout connector is hooked up to a Raspberry Pi\n>>    GPIO pin and the RPi monitors it. It's a cheap but very effective CEC analyzer.\n>>    In this use-case it is very helpful to also monitor the HPD pin since some\n>>    displays do weird things with the HPD and knowing the state of the HPD helps\n>>    a lot when debugging CEC problems. It's optional and it only monitors the pin.\n>>\n>>    Actually, there does not have to be an HDMI connector involved at all: you can\n>>    make two cec-gpio instances and just connect the two GPIO pins together in\n>>    order to emulate two CEC adapters and play with that.\n>\n> Is it OK to define a binding but not (yet) implement it? I have seen that in other\n> bindings (well, OK, one other binding :-) ). If that is fine, then I can write the\n> following:\n\nIt's preferred over adding a property one by one.\n\n>\n> ----------------------------------------------------------------\n> Required properties:\n>   - compatible: value must be \"cec-gpio\".\n>   - cec-gpios: gpio that the CEC line is connected to.\n>\n> If the CEC line is associated with an HDMI receiver/transmitter, then the following\n> property is also required:\n>\n>   - hdmi-phandle - phandle to the HDMI controller, see also cec.txt.\n>\n> If the CEC line is not associated with an HDMI receiver/transmitter, then the\n> following property is optional:\n>\n>   - hpd-gpios: gpio that the HPD line is connected to.\n> ----------------------------------------------------------------\n\nYes, this seems fine.\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>)","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 3xv3TK5Hjyz9s7h\n\tfor <incoming-dt@patchwork.ozlabs.org>;\n\tSat, 16 Sep 2017 04:14:45 +1000 (AEST)","(majordomo@vger.kernel.org) by vger.kernel.org via listexpand\n\tid S1751364AbdIOSOo (ORCPT\n\t<rfc822;incoming-dt@patchwork.ozlabs.org>);\n\tFri, 15 Sep 2017 14:14:44 -0400","from mail.kernel.org ([198.145.29.99]:48082 \"EHLO mail.kernel.org\"\n\trhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP\n\tid S1751201AbdIOSOn (ORCPT <rfc822;devicetree@vger.kernel.org>);\n\tFri, 15 Sep 2017 14:14:43 -0400","from mail-qk0-f177.google.com (mail-qk0-f177.google.com\n\t[209.85.220.177])\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 B343321456;\n\tFri, 15 Sep 2017 18:14:42 +0000 (UTC)","by mail-qk0-f177.google.com with SMTP id b82so2814400qkc.4;\n\tFri, 15 Sep 2017 11:14:42 -0700 (PDT)","by 10.12.209.75 with HTTP; Fri, 15 Sep 2017 11:14:21 -0700 (PDT)"],"DMARC-Filter":"OpenDMARC Filter v1.3.2 mail.kernel.org B343321456","X-Gm-Message-State":"AHPjjUjXxms78PkYmf8tVT2QhAMXZp/nFpjv0h1KGfnRSdfXobOnPe08\n\tWmg8mpo0T4fBgy0zXzvCZm758lt5CuXifwOosQ==","X-Google-Smtp-Source":"AOwi7QCCIGegsh7z6SakJrwuDQq3PKTJaBSH0MJczygF+4fUOBbQ3bPq4Q/v5ucio5Wfhdfwg184o6hjIfcBJCWCnLA=","X-Received":"by 10.55.10.76 with SMTP id 73mr8490746qkk.205.1505499281866;\n\tFri, 15 Sep 2017 11:14:41 -0700 (PDT)","MIME-Version":"1.0","In-Reply-To":"<89739d22-bce2-e31e-fd00-5e7c2fae2148@xs4all.nl>","References":"<20170831110156.11018-1-hverkuil@xs4all.nl>\n\t<20170831110156.11018-4-hverkuil@xs4all.nl>\n\t<20170912144308.j53eclicbhay5dsz@rob-hp-laptop>\n\t<30a2fa9d-1aa9-84c1-7842-05167eee73d3@xs4all.nl>\n\t<89739d22-bce2-e31e-fd00-5e7c2fae2148@xs4all.nl>","From":"Rob Herring <robh@kernel.org>","Date":"Fri, 15 Sep 2017 13:14:21 -0500","X-Gmail-Original-Message-ID":"<CAL_JsqKZcXMFPrU548LoeS6qnjHKv_5P-8U_VyUPqt=_1LygUw@mail.gmail.com>","Message-ID":"<CAL_JsqKZcXMFPrU548LoeS6qnjHKv_5P-8U_VyUPqt=_1LygUw@mail.gmail.com>","Subject":"Re: [PATCHv4 3/5] dt-bindings: document the CEC GPIO bindings","To":"Hans Verkuil <hverkuil@xs4all.nl>","Cc":"\"linux-media@vger.kernel.org\" <linux-media@vger.kernel.org>,\n\tdri-devel <dri-devel@lists.freedesktop.org>,\n\t\"devicetree@vger.kernel.org\" <devicetree@vger.kernel.org>,\n\tLinus Walleij <linus.walleij@linaro.org>,\n\tHans Verkuil <hans.verkuil@cisco.com>","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"}}]