[{"id":1760773,"web_url":"http://patchwork.ozlabs.org/comment/1760773/","msgid":"<CACRpkdZxoHbM2T-McdinK3gJJ9uEq9hwX+mH=13s0AkGArhJFw@mail.gmail.com>","list_archive_url":null,"date":"2017-08-31T09:20:38","subject":"Re: [PATCHv3 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 Wed, Aug 30, 2017 at 6:10 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 pin and optionally the HPD pin are connected to GPIO pins.\n>\n> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>\n\nI usually refer to GPIO \"lines\" rather than \"pins\" for clarity.\nIt's because some systems also have pin control, and then it becomes\na bit muddy what is a pin.\n\n> +* HDMI CEC GPIO driver\n> +\n> +The HDMI CEC GPIO module supports CEC implementations where the CEC pin\n> +is hooked up to a pull-up GPIO pin and - optionally - the HPD pin is\n> +hooked up to a pull-down GPIO pin.\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_ACTIVE_HIGH>;\n> +       hpd-gpio = <&gpio 17 GPIO_ACTIVE_HIGH>;\n> +};\n\nSo what I understood from the driver is that the cec-gpio is maybe actually\nan open drain output line, so in that case it should be stated in the docs and\ncec-gpio  = <&gpio 7 GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN>\nor GPIO_LINE_OPEN_DRAIN if it is not also single-ended.\n\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=\"DhL1pKHo\"; dkim-atps=neutral"],"Received":["from vger.kernel.org (vger.kernel.org [209.132.180.67])\n\tby ozlabs.org (Postfix) with ESMTP id 3xjcL33Rf3z9s2G\n\tfor <incoming-dt@patchwork.ozlabs.org>;\n\tThu, 31 Aug 2017 19:20:43 +1000 (AEST)","(majordomo@vger.kernel.org) by vger.kernel.org via listexpand\n\tid S1751097AbdHaJUk (ORCPT\n\t<rfc822;incoming-dt@patchwork.ozlabs.org>);\n\tThu, 31 Aug 2017 05:20:40 -0400","from mail-oi0-f50.google.com ([209.85.218.50]:35105 \"EHLO\n\tmail-oi0-f50.google.com\" rhost-flags-OK-OK-OK-OK) by vger.kernel.org\n\twith ESMTP id S1750911AbdHaJUj (ORCPT\n\t<rfc822; devicetree@vger.kernel.org>); Thu, 31 Aug 2017 05:20:39 -0400","by mail-oi0-f50.google.com with SMTP id k77so1078351oib.2\n\tfor <devicetree@vger.kernel.org>;\n\tThu, 31 Aug 2017 02:20:38 -0700 (PDT)","by 10.157.58.74 with HTTP; Thu, 31 Aug 2017 02:20:38 -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=udRmv9VVnI4/lrCixgTQu/9pN4cQXYajxsKjvpIgt94=;\n\tb=DhL1pKHohQ+15DTgcyovTufxqwdbI/btUMqBy4aY2xxv+hupDrVifbUz3XpKpEtGj9\n\t1Wz56z9yhDH9L0K4clKvvAmfZnX2lDShKlpGRkOA18cqA00TFtA/2UIXa4R/laiDSiwx\n\tFgKbaV3Zy4aqFshDAN0M748ddhmM8rq38TsE4=","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=udRmv9VVnI4/lrCixgTQu/9pN4cQXYajxsKjvpIgt94=;\n\tb=s4pMP1i64CMcjTgLqFLXis1IqQdsyGX+ETkR2NpmyItdIy0Qgb5RWJAqMRyRPWHMNh\n\t4nVKFczeH37fO7hLyo5V3AnuP0kdHpmr03xUh1G3Av36dv8k5baqddXd5i3ewhQj8WhP\n\txvU3yjQM6BhNHVNZXSk2ZP2VPS7ULf1zW+Ov5cOgAg1yBle3X/xwHFq/N5+NVxa9Da8z\n\tRXx483ZUSmn5MlpdVpGY6ax38EtdLNZrhovTLxHVzOGOnw8UQ2Yo2XrJkT6+rxc1Xs+/\n\tiutgPcUNW41Fgo7dSK0T/4UWZ6cQLAULh1vmQi0WyRaGtYjhRwr8fAM222xeLnFrsw9z\n\tlLfA==","X-Gm-Message-State":"AHYfb5iUYTuUsaUBapKaCPMNkesqcxIbZrKj/EgFGPInMC+Q/u9Hk0R6\n\tBkpz7fKT78ZMurX5rTqb2/zWx825ZQKd","X-Received":"by 10.202.10.2 with SMTP id 2mr4883389oik.316.1504171238499; Thu,\n\t31 Aug 2017 02:20:38 -0700 (PDT)","MIME-Version":"1.0","In-Reply-To":"<20170830161044.26571-4-hverkuil@xs4all.nl>","References":"<20170830161044.26571-1-hverkuil@xs4all.nl>\n\t<20170830161044.26571-4-hverkuil@xs4all.nl>","From":"Linus Walleij <linus.walleij@linaro.org>","Date":"Thu, 31 Aug 2017 11:20:38 +0200","Message-ID":"<CACRpkdZxoHbM2T-McdinK3gJJ9uEq9hwX+mH=13s0AkGArhJFw@mail.gmail.com>","Subject":"Re: [PATCHv3 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\"devicetree@vger.kernel.org\" <devicetree@vger.kernel.org>,\n\tHans Verkuil <hans.verkuil@cisco.com>,\n\t\"open list:DRM PANEL DRIVERS\" <dri-devel@lists.freedesktop.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":1760817,"web_url":"http://patchwork.ozlabs.org/comment/1760817/","msgid":"<c80b4369-b592-228f-3781-d1a32af6278a@xs4all.nl>","list_archive_url":null,"date":"2017-08-31T10:31:13","subject":"Re: [PATCHv3 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 31/08/17 11:20, Linus Walleij wrote:\n> On Wed, Aug 30, 2017 at 6:10 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 pin and optionally the HPD pin are connected to GPIO pins.\n>>\n>> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>\n> \n> I usually refer to GPIO \"lines\" rather than \"pins\" for clarity.\n> It's because some systems also have pin control, and then it becomes\n> a bit muddy what is a pin.\n\nI'll change the terminology.\n\n>> +* HDMI CEC GPIO driver\n>> +\n>> +The HDMI CEC GPIO module supports CEC implementations where the CEC pin\n>> +is hooked up to a pull-up GPIO pin and - optionally - the HPD pin is\n>> +hooked up to a pull-down GPIO pin.\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_ACTIVE_HIGH>;\n>> +       hpd-gpio = <&gpio 17 GPIO_ACTIVE_HIGH>;\n>> +};\n> \n> So what I understood from the driver is that the cec-gpio is maybe actually\n> an open drain output line, so in that case it should be stated in the docs and\n> cec-gpio  = <&gpio 7 GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN>\n> or GPIO_LINE_OPEN_DRAIN if it is not also single-ended.\n\nYes, I agree, it's open drain. I'm not sure whether or not it is single-ended.\nI'm not sure what the difference is, and I have no electronics background.\n\nLooking at fwnode_get_named_gpiod() it seems that it has to be single-ended\nfor GPIO_OPEN_DRAIN to be set, so I am going with that. It works, so it is\nprobably right :-)\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 3xjdvY1B4zz9sQl\n\tfor <incoming-dt@patchwork.ozlabs.org>;\n\tThu, 31 Aug 2017 20:31:21 +1000 (AEST)","(majordomo@vger.kernel.org) by vger.kernel.org via listexpand\n\tid S1751301AbdHaKbT (ORCPT\n\t<rfc822;incoming-dt@patchwork.ozlabs.org>);\n\tThu, 31 Aug 2017 06:31:19 -0400","from lb2-smtp-cloud9.xs4all.net ([194.109.24.26]:52007 \"EHLO\n\tlb2-smtp-cloud9.xs4all.net\" rhost-flags-OK-OK-OK-OK)\n\tby vger.kernel.org with ESMTP id S1751127AbdHaKbS (ORCPT\n\t<rfc822; devicetree@vger.kernel.org>); Thu, 31 Aug 2017 06:31:18 -0400","from [192.168.1.10] ([80.101.105.217])\n\tby smtp-cloud9.xs4all.net with ESMTPA\n\tid nMkjdVWDidRLjnMkkdH4k5; Thu, 31 Aug 2017 12:31:17 +0200"],"Subject":"Re: [PATCHv3 3/5] dt-bindings: document the CEC GPIO bindings","To":"Linus Walleij <linus.walleij@linaro.org>","References":"<20170830161044.26571-1-hverkuil@xs4all.nl>\n\t<20170830161044.26571-4-hverkuil@xs4all.nl>\n\t<CACRpkdZxoHbM2T-McdinK3gJJ9uEq9hwX+mH=13s0AkGArhJFw@mail.gmail.com>","Cc":"\"linux-media@vger.kernel.org\" <linux-media@vger.kernel.org>,\n\t\"devicetree@vger.kernel.org\" <devicetree@vger.kernel.org>,\n\tHans Verkuil <hans.verkuil@cisco.com>,\n\t\"open list:DRM PANEL DRIVERS\" <dri-devel@lists.freedesktop.org>","From":"Hans Verkuil <hverkuil@xs4all.nl>","Message-ID":"<c80b4369-b592-228f-3781-d1a32af6278a@xs4all.nl>","Date":"Thu, 31 Aug 2017 12:31:13 +0200","User-Agent":"Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101\n\tThunderbird/45.7.1","MIME-Version":"1.0","In-Reply-To":"<CACRpkdZxoHbM2T-McdinK3gJJ9uEq9hwX+mH=13s0AkGArhJFw@mail.gmail.com>","Content-Type":"text/plain; charset=utf-8","Content-Transfer-Encoding":"7bit","X-CMAE-Envelope":"MS4wfLuoNjYd8kf1Os5l8/YsZ9uB291erpaBEyKI6AR7yYZV65oKAQkX4sY//wn3DRLJ1s7Vomfqma/zC0do4Bm4PpbDqRlFp86gVsEYOu7MYTx2ogyiIxrQ\n\tzSCfT+O8DIHyfzSAnOTILnLuy+ZUdhC5i9L+GmOMVYe0pLNR5Tg6dSjrFChzx22H8niB/LkqCWStQ0LaYZ5LyDjKUQ2uqhKloAwNmznWACtOQmRsWakUgBrb\n\t7Z0n+uGZLyXTkcztvE83rfwqXC72F8IDJyqPEr0kQxohRRiwFsJaD1Zx3JjS1yn8nDeBa+vRsQ2s4qiP2pr524nqu/wF8VZnYAt4bCtMq0Y=","Sender":"devicetree-owner@vger.kernel.org","Precedence":"bulk","List-ID":"<devicetree.vger.kernel.org>","X-Mailing-List":"devicetree@vger.kernel.org"}}]