From patchwork Fri Jan 11 15:18:55 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Rosin X-Patchwork-Id: 10761345 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id B13396C5 for ; Sun, 13 Jan 2019 16:53:03 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9E3A32889E for ; Sun, 13 Jan 2019 16:53:03 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9294D28995; Sun, 13 Jan 2019 16:53:03 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id AA0222889E for ; Sun, 13 Jan 2019 16:53:02 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 5D7F86E151; Sun, 13 Jan 2019 16:52:58 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from EUR04-HE1-obe.outbound.protection.outlook.com (mail-eopbgr70113.outbound.protection.outlook.com [40.107.7.113]) by gabe.freedesktop.org (Postfix) with ESMTPS id 76FE66F762 for ; Fri, 11 Jan 2019 15:18:58 +0000 (UTC) Received: from AM6PR02MB4470.eurprd02.prod.outlook.com (20.177.191.218) by AM6PR02MB3735.eurprd02.prod.outlook.com (52.134.113.24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1516.13; Fri, 11 Jan 2019 15:18:55 +0000 Received: from AM6PR02MB4470.eurprd02.prod.outlook.com ([fe80::e5f3:a239:2ec4:4453]) by AM6PR02MB4470.eurprd02.prod.outlook.com ([fe80::e5f3:a239:2ec4:4453%6]) with mapi id 15.20.1516.016; Fri, 11 Jan 2019 15:18:55 +0000 From: Peter Rosin To: "linux-kernel@vger.kernel.org" Subject: [PATCH v4 1/5] dt-bindings: display: bridge: fork out ti,ds90c185 from lvds-transmitter Thread-Topic: [PATCH v4 1/5] dt-bindings: display: bridge: fork out ti,ds90c185 from lvds-transmitter Thread-Index: AQHUqcD3mZQqQIUs9EO69zWCM/1nig== Date: Fri, 11 Jan 2019 15:18:55 +0000 Message-ID: <20190111151843.11114-2-peda@axentia.se> References: <20190111151843.11114-1-peda@axentia.se> In-Reply-To: <20190111151843.11114-1-peda@axentia.se> Accept-Language: en-US, sv-SE Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-mailer: git-send-email 2.11.0 x-originating-ip: [85.226.244.23] x-clientproxiedby: HE1PR07CA0035.eurprd07.prod.outlook.com (2603:10a6:7:66::21) To AM6PR02MB4470.eurprd02.prod.outlook.com (2603:10a6:20b:60::26) x-ms-exchange-messagesentrepresentingtype: 1 x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; AM6PR02MB3735; 6:jaC+FM7Nf+MeOk94e3n3CV7YAgSOStfA4UcPulU1ALRE4U1Zb/721XICjOlZ9Pc0U/7MsvVCbtX1xxMmwrPsFmZqcoyqlx6c1rzyis0Qbe42DSmd87Mdf4LHLiSJ2p3GWaz6hOWUKSVfG8pLEV8urJH0qj0FZ6z3vZep6YcwP7lhdnpaO0j/zcU18msJXCZr0JB9skPKPOP7dzM0zEl8kb5sgaE1d5GtMDKjAjpSAxjXDpEumxZ4UCFtDIF/u/yd3tqLDQu7oBZBndlrwVpLCD7zDSoVdh9j9I6GxGsGyD3oVxZYxhZxKawiUlEledflPWXVEteQC6A2fB4vvjaNcFK4jCxzVOTKx/jbJiiSYU7wbUjqSTB3QsiSWlnFipeD9fgZmmCEvOrlABmqNaMfwmNiCrP9aT54omumi5LJt7jeao7c388qOGnv20VXG2EFLh/TkbhFpQcVQksMcxL+BA==; 5:uRTVQohJMGDpAlPx0iVDAWohPC4DIzPwZ+0ZinMzRWjEldB/j/9v7CZp3LSTcEZY7LSJ1P6mo59gJ6I1i4O/GtFuGoyPYOetmfg92mro2IPyXLw7AB0XgPOr0jBv9Mq+gMkIzEJyIZ+xvKizXwR/8wd/eh/D3yBEwc8AhoEeq6ZZfNdXwa+jXQpRJPjK29Kr8uXGZ8td5ZfkA1BOEQ702Q==; 7:wxY3yBVXLSDErPnGadU5HvvFjaNrJ5s1z5avTx2S6AiLhNA0NdwVVxp38IHJZ1MP17f9fIsjfYaC0/tg8STpbOe5hZVbvgKSOwxWPntNQwdzvId6LlEJ8aOPFNXHHthoV4qRhNSyKTOejFFUDimTXQ== x-ms-office365-filtering-correlation-id: a17466f9-ee70-45e0-e3f8-08d677d819fa x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(7021145)(8989299)(4534185)(7022145)(4603075)(4627221)(201702281549075)(8990200)(7048125)(7024125)(7027125)(7023125)(5600109)(711020)(2017052603328)(7153060)(7193020); SRVR:AM6PR02MB3735; x-ms-traffictypediagnostic: AM6PR02MB3735: x-microsoft-antispam-prvs: x-forefront-prvs: 09144DB0F7 x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(396003)(376002)(366004)(346002)(136003)(39830400003)(189003)(199004)(2501003)(1076003)(14454004)(99286004)(54906003)(508600001)(5640700003)(68736007)(6436002)(97736004)(2906002)(71190400001)(2351001)(106356001)(6486002)(316002)(105586002)(71200400001)(86362001)(386003)(6506007)(102836004)(66066001)(6116002)(52116002)(76176011)(3846002)(6512007)(53936002)(2616005)(11346002)(476003)(446003)(74482002)(8676002)(81156014)(81166006)(186003)(486006)(256004)(26005)(50226002)(8936002)(305945005)(7736002)(5660300001)(6916009)(25786009)(4326008)(36756003)(142933001); DIR:OUT; SFP:1102; SCL:1; SRVR:AM6PR02MB3735; H:AM6PR02MB4470.eurprd02.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; received-spf: None (protection.outlook.com: axentia.se does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: p5GctcAxexTtzkJ7YYUjwzLjeV0qSFIsDvjQTyIR/sPlpxr3/0L4h3Gwb2F4+YXUJjrDOpKZ0Nbz8Qxo6VfxGxZbfwtTuG9IdCYq17Bq8/9LiSos6kiU7APM0GTAX8+AoitIb7gjardpv4N29ILp2WjGC3LUwUazW0ExkrVNUM0f3dEhODlB4jNO8hDxAqwwlgngx4VpahOk8kgB5QGa6Y2NhNwNFAXIdPiG0hogtZMJ6JprWh/LC1Fq7EbGAL71UCmNRJYYkPLZugbZvSSpKUn1W5flGzCDFaHK88CSdT2HrH/9M+7whFB2RcBy6nOlrelpwRPBkEFqJFrUQ7xX/QLuQ8rdAFUKsFZoboSzhE9gVofOFI6ivV4x2zASax0FR6DUB482w5ey22oCHTzs36ex8vSdJKjqXF/2/gqdQFI= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM MIME-Version: 1.0 X-OriginatorOrg: axentia.se X-MS-Exchange-CrossTenant-Network-Message-Id: a17466f9-ee70-45e0-e3f8-08d677d819fa X-MS-Exchange-CrossTenant-originalarrivaltime: 11 Jan 2019 15:18:54.5703 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 4ee68585-03e1-4785-942a-df9c1871a234 X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR02MB3735 X-Mailman-Approved-At: Sun, 13 Jan 2019 16:52:57 +0000 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Rutland , "devicetree@vger.kernel.org" , David Airlie , "dri-devel@lists.freedesktop.org" , Rob Herring , Laurent Pinchart , Peter Rosin Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP DS90C185 has a shutdown pin which does not fit in the lvds-transmitter binding, which is meant to be generic. The sister chip DS90C187 is similar to DS90C185, describe it here as well. Signed-off-by: Peter Rosin Reviewed-by: Rob Herring --- .../bindings/display/bridge/lvds-transmitter.txt | 10 ++-- .../bindings/display/bridge/ti,ds90c185.txt | 55 ++++++++++++++++++++++ 2 files changed, 59 insertions(+), 6 deletions(-) create mode 100644 Documentation/devicetree/bindings/display/bridge/ti,ds90c185.txt diff --git a/Documentation/devicetree/bindings/display/bridge/lvds-transmitter.txt b/Documentation/devicetree/bindings/display/bridge/lvds-transmitter.txt index 50220190c203..bc6960741cb5 100644 --- a/Documentation/devicetree/bindings/display/bridge/lvds-transmitter.txt +++ b/Documentation/devicetree/bindings/display/bridge/lvds-transmitter.txt @@ -22,13 +22,11 @@ among others. Required properties: -- compatible: Must be one or more of the following - - "ti,ds90c185" for the TI DS90C185 FPD-Link Serializer - - "lvds-encoder" for a generic LVDS encoder device +- compatible: Must be "lvds-encoder" - When compatible with the generic version, nodes must list the - device-specific version corresponding to the device first - followed by the generic version. + Any encoder compatible with this generic binding, but with additional + properties not listed here, must list a device specific compatible first + followed by this generic compatible. Required nodes: diff --git a/Documentation/devicetree/bindings/display/bridge/ti,ds90c185.txt b/Documentation/devicetree/bindings/display/bridge/ti,ds90c185.txt new file mode 100644 index 000000000000..e575f996959a --- /dev/null +++ b/Documentation/devicetree/bindings/display/bridge/ti,ds90c185.txt @@ -0,0 +1,55 @@ +Texas Instruments FPD-Link (LVDS) Serializer +-------------------------------------------- + +The DS90C185 and DS90C187 are low-power serializers for portable +battery-powered applications that reduces the size of the RGB +interface between the host GPU and the display. + +Required properties: + +- compatible: Should be + "ti,ds90c185", "lvds-encoder" for the TI DS90C185 FPD-Link Serializer + "ti,ds90c187", "lvds-encoder" for the TI DS90C187 FPD-Link Serializer + +Optional properties: + +- powerdown-gpios: Power down control GPIO (the PDB pin, active-low) + +Required nodes: + +The devices have two video ports. Their connections are modeled using the OF +graph bindings specified in Documentation/devicetree/bindings/graph.txt. + +- Video port 0 for parallel input +- Video port 1 for LVDS output + + +Example +------- + +lvds-encoder { + compatible = "ti,ds90c185", "lvds-encoder"; + + powerdown-gpios = <&gpio 17 GPIO_ACTIVE_LOW>; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + reg = <0>; + + lvds_enc_in: endpoint { + remote-endpoint = <&lcdc_out_rgb>; + }; + }; + + port@1 { + reg = <1>; + + lvds_enc_out: endpoint { + remote-endpoint = <&lvds_panel_in>; + }; + }; + }; +}; From patchwork Fri Jan 11 15:19:00 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Rosin X-Patchwork-Id: 10761349 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id E506A1580 for ; Sun, 13 Jan 2019 16:53:06 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D369D2889E for ; Sun, 13 Jan 2019 16:53:06 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C809F28995; Sun, 13 Jan 2019 16:53:06 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 70AAF2889E for ; Sun, 13 Jan 2019 16:53:06 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 7B36C6E514; Sun, 13 Jan 2019 16:52:58 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from EUR04-HE1-obe.outbound.protection.outlook.com (mail-he1eur04on071c.outbound.protection.outlook.com [IPv6:2a01:111:f400:fe0d::71c]) by gabe.freedesktop.org (Postfix) with ESMTPS id D84C16F764 for ; Fri, 11 Jan 2019 15:19:03 +0000 (UTC) Received: from AM6PR02MB4470.eurprd02.prod.outlook.com (20.177.191.218) by AM6PR02MB3735.eurprd02.prod.outlook.com (52.134.113.24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1516.13; Fri, 11 Jan 2019 15:19:00 +0000 Received: from AM6PR02MB4470.eurprd02.prod.outlook.com ([fe80::e5f3:a239:2ec4:4453]) by AM6PR02MB4470.eurprd02.prod.outlook.com ([fe80::e5f3:a239:2ec4:4453%6]) with mapi id 15.20.1516.016; Fri, 11 Jan 2019 15:19:00 +0000 From: Peter Rosin To: "linux-kernel@vger.kernel.org" Subject: [PATCH v4 2/5] dt-bindings: display: bridge: lvds-transmitter: cleanup example Thread-Topic: [PATCH v4 2/5] dt-bindings: display: bridge: lvds-transmitter: cleanup example Thread-Index: AQHUqcD68keahuwQd0GsfPVB1wR5mA== Date: Fri, 11 Jan 2019 15:19:00 +0000 Message-ID: <20190111151843.11114-3-peda@axentia.se> References: <20190111151843.11114-1-peda@axentia.se> In-Reply-To: <20190111151843.11114-1-peda@axentia.se> Accept-Language: en-US, sv-SE Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-mailer: git-send-email 2.11.0 x-originating-ip: [85.226.244.23] x-clientproxiedby: HE1PR07CA0035.eurprd07.prod.outlook.com (2603:10a6:7:66::21) To AM6PR02MB4470.eurprd02.prod.outlook.com (2603:10a6:20b:60::26) x-ms-exchange-messagesentrepresentingtype: 1 x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; AM6PR02MB3735; 6:6zr0jQDXVK92jEJuP9RJKJbbnoYCOFxKjnOQp2Y1BKpZZ1yqEvspDHesYpTTLDbHxSjls/0aBfoQPl/pEfWKjmjpnCJjpP7FlmxiwX/RhAVJg99GHoVBCbHLXDMpygEaJ3sOi6uLLUefhmK4xhIjjvBUsDULl+D6yHSI/95GZyqeEyEtaC3Wd9+lxIRTNMJJyNbWI0jMdqBc8dM44+VMZYjrMpNU/TxW/SapkzSxxlvKPFGInmXTcuVVjFTih+u8pd0aADVUkUYb/MUSzV1Cs4jw+89xi/Uc7IqGUWGPI2pN83vK06qfF+xXSyffSRav+ndoV74arlGcznctOd+7DHuZidfGgdKbdtrxldaEthx6wVtCY/tJYtEFMZWL0+lL7wqoaR1RHVXojoc58isvxUN1oIiADmANG3+EXNF9DPyQAdmC6QRgvi5QDtfXaPhsLLX820wBmxgAdIMfeJEscg==; 5:uw2qpdZVZkpf1fVNA2nKokC/oh98yDHP5gVZ0jfar6BvS34elMfRUthitPyFejMZkSPcL3sYzeRLHDspZaJ6WnlmUo9sJ/VsD1QOcl5ICK1BSgIs+Z88WpsJ63QExpi/p7yGoGDEOUWz4J+RPxs3WoJ1QyeO0rIgS2G3OGR1LPaCSw2AmCPJ39fVsET71CYDNcHfF1g/Igu+AgsStilmww==; 7:ZX/shmbdCRihabcNFdC5VS6youYY2L0Qg6y9aj4v6iEDbGU3qldrYkUAtXNw5gYjFLtY1qtSNrYKe+s/u4utAx4l8ZGnEG4mHXJZmPtWTYtem5Q6bSuO4mg46UZE9szNjSjsmMvb67BVOoPSJSwobw== x-ms-office365-filtering-correlation-id: d53a18bd-18cd-44e9-2af4-08d677d81cdf x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(7021145)(8989299)(4534185)(7022145)(4603075)(4627221)(201702281549075)(8990200)(7048125)(7024125)(7027125)(7023125)(5600109)(711020)(2017052603328)(7153060)(7193020); SRVR:AM6PR02MB3735; x-ms-traffictypediagnostic: AM6PR02MB3735: x-microsoft-antispam-prvs: x-forefront-prvs: 09144DB0F7 x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(396003)(376002)(366004)(346002)(136003)(39830400003)(189003)(199004)(2501003)(1076003)(14454004)(99286004)(54906003)(508600001)(5640700003)(68736007)(6436002)(97736004)(2906002)(71190400001)(2351001)(106356001)(6486002)(316002)(105586002)(71200400001)(86362001)(386003)(6506007)(102836004)(66066001)(6116002)(52116002)(76176011)(3846002)(6512007)(53936002)(2616005)(11346002)(476003)(446003)(74482002)(8676002)(81156014)(81166006)(186003)(486006)(256004)(26005)(50226002)(8936002)(305945005)(7736002)(5660300001)(6916009)(25786009)(4326008)(36756003); DIR:OUT; SFP:1102; SCL:1; SRVR:AM6PR02MB3735; H:AM6PR02MB4470.eurprd02.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; received-spf: None (protection.outlook.com: axentia.se does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: 3AbQo0G/7YL/K2jMK5Jk7Lxcdw2alsry1jouslqiLhZPUYK8WQ1CwdCXUcVTQzJlabdpI8Pl0am21CHnAG6/D1vbS3FHQfsp+DKhxktcYV0IX5ymN4JY1xcIXu6O7T7CFPrskJX4Ud5GllPRi62A2XP/sEM0misoQeDx5UA8XQPP/5fc3MLUF/aTU+eNsDoUNAliNsnuaryIbVtJtY7KeYWyhION0JILymReLC1WNMebmnDgY5QZhNfUppOWCfSN6xGCWZc6KIX1b3uIoJX2hLFG4CB1+T9KBkxSs6kXASilDqyYojk/np3Y/XcLW0FiOVlA7sn8CugxKYvNQOrVhJ5Dw/tY5H6N33KEstSHymR15Y+XuSWCKzdyL7k29ccyg5wWPlEMC7azdAVSpakinnhZR1kbbAaLLFMVScHJrzA= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM MIME-Version: 1.0 X-OriginatorOrg: axentia.se X-MS-Exchange-CrossTenant-Network-Message-Id: d53a18bd-18cd-44e9-2af4-08d677d81cdf X-MS-Exchange-CrossTenant-originalarrivaltime: 11 Jan 2019 15:18:59.4128 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 4ee68585-03e1-4785-942a-df9c1871a234 X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR02MB3735 X-Mailman-Approved-At: Sun, 13 Jan 2019 16:52:57 +0000 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Rutland , "devicetree@vger.kernel.org" , David Airlie , "dri-devel@lists.freedesktop.org" , Rob Herring , Laurent Pinchart , Peter Rosin Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP Drop #address-cells and #size-cells from the root node in the example, they are unused. Reviewed-by: Rob Herring Signed-off-by: Peter Rosin --- Documentation/devicetree/bindings/display/bridge/lvds-transmitter.txt | 2 -- 1 file changed, 2 deletions(-) diff --git a/Documentation/devicetree/bindings/display/bridge/lvds-transmitter.txt b/Documentation/devicetree/bindings/display/bridge/lvds-transmitter.txt index bc6960741cb5..60091db5dfa5 100644 --- a/Documentation/devicetree/bindings/display/bridge/lvds-transmitter.txt +++ b/Documentation/devicetree/bindings/display/bridge/lvds-transmitter.txt @@ -42,8 +42,6 @@ Example lvds-encoder { compatible = "lvds-encoder"; - #address-cells = <1>; - #size-cells = <0>; ports { #address-cells = <1>; From patchwork Fri Jan 11 15:19:05 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Rosin X-Patchwork-Id: 10761359 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 21A681580 for ; Sun, 13 Jan 2019 16:53:28 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0F61B2889E for ; Sun, 13 Jan 2019 16:53:28 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 03B8328995; Sun, 13 Jan 2019 16:53:28 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id DDA492889E for ; Sun, 13 Jan 2019 16:53:26 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id C3DCF6E519; Sun, 13 Jan 2019 16:53:17 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from EUR04-HE1-obe.outbound.protection.outlook.com (mail-eopbgr70110.outbound.protection.outlook.com [40.107.7.110]) by gabe.freedesktop.org (Postfix) with ESMTPS id 304476F764 for ; Fri, 11 Jan 2019 15:19:08 +0000 (UTC) Received: from AM6PR02MB4470.eurprd02.prod.outlook.com (20.177.191.218) by AM6PR02MB3735.eurprd02.prod.outlook.com (52.134.113.24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1516.13; Fri, 11 Jan 2019 15:19:05 +0000 Received: from AM6PR02MB4470.eurprd02.prod.outlook.com ([fe80::e5f3:a239:2ec4:4453]) by AM6PR02MB4470.eurprd02.prod.outlook.com ([fe80::e5f3:a239:2ec4:4453%6]) with mapi id 15.20.1516.016; Fri, 11 Jan 2019 15:19:05 +0000 From: Peter Rosin To: "linux-kernel@vger.kernel.org" Subject: [PATCH v4 3/5] dt-bindings: display: bridge: thc63lvdm83d: use standard powerdown-gpios Thread-Topic: [PATCH v4 3/5] dt-bindings: display: bridge: thc63lvdm83d: use standard powerdown-gpios Thread-Index: AQHUqcD93KdkRYBGCECdNd3Z0wxoTQ== Date: Fri, 11 Jan 2019 15:19:05 +0000 Message-ID: <20190111151843.11114-4-peda@axentia.se> References: <20190111151843.11114-1-peda@axentia.se> In-Reply-To: <20190111151843.11114-1-peda@axentia.se> Accept-Language: en-US, sv-SE Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-mailer: git-send-email 2.11.0 x-originating-ip: [85.226.244.23] x-clientproxiedby: HE1PR07CA0035.eurprd07.prod.outlook.com (2603:10a6:7:66::21) To AM6PR02MB4470.eurprd02.prod.outlook.com (2603:10a6:20b:60::26) x-ms-exchange-messagesentrepresentingtype: 1 x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; AM6PR02MB3735; 6:hCkcJWVX5n8tMQeX3FqhyDvA0WU10AtrOCXbYWH7sIUJHfdNen/bsTVIyi6psX9OOcZxXPPgM17kV60K1htQ/j6cIq4WkhBb8OfVTqP6pQgZKDkfnAXr6OcErct2kryHlXoVaK/Klb456d2jtbaU12jXX8CaIexkPVSIvPkxN3lbe0sS8DVSxWCOedNDj6GOlLJyHnm9jYxMLzY1Knd8HO9ccKyKbK7rsu8rmhJutVWXpg7/doEXPH6xnMuw1I9VTbKhlM5zS46sA1X/si3O0GT9kmIbEdzXMriZlMBWzXihGVTK18knkDlfkzEboFIuY3hXp06J8Cl8l0UJWrbnNMKsNEjSM9rG0wk/dncG4k0cSAPwRTW/35C9cpqAeuoFdSjJbUamrRfFnryC7ivTwRaAzqH7oiQpQSOSdRVk+LTnGi2bFMVZy8Xtd0LbUEYevhseZzm3023zWzzW3w8c9g==; 5:O3gmnZGfXPHyTRDm0axSV8IayymVWnfh4VbkHjuvegUhka4pWUMrVPEmx50q5aasSjozB7dsf4tIJ9HP6f1l7rwZENJlVzf4ODATFpncZJLllaxAiBuRrHEkfMh8Rb5WvxL5p3hI+RqGObDW5AvL+4qAN/dNLXsF+36o1pEh4J+GNZfT6kOXxkYKX54iDvEvauhUlgfcZKJjGfM5/9ha7A==; 7:NiN2w/co10VW9ZlzJEaY7kgiHvoL68woPp8s0aWxN+hKJ/otvFAe40Dw/+sB86E1G88w4Iur54OErDTTF+x/OfGSoGIpIqEPyit428GHQaNLIJnWQkhhr3gXeIPRwu2LRrjtCR1J7oE222SeFU7VFg== x-ms-office365-filtering-correlation-id: 82f145fe-fdd5-4049-ddd6-08d677d81fd2 x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(7021145)(8989299)(4534185)(7022145)(4603075)(4627221)(201702281549075)(8990200)(7048125)(7024125)(7027125)(7023125)(5600109)(711020)(2017052603328)(7153060)(7193020); SRVR:AM6PR02MB3735; x-ms-traffictypediagnostic: AM6PR02MB3735: x-microsoft-antispam-prvs: x-forefront-prvs: 09144DB0F7 x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(396003)(376002)(366004)(346002)(136003)(39830400003)(189003)(199004)(2501003)(1076003)(14454004)(99286004)(54906003)(508600001)(5640700003)(68736007)(6436002)(97736004)(2906002)(71190400001)(2351001)(106356001)(6486002)(316002)(105586002)(71200400001)(86362001)(386003)(6506007)(102836004)(66066001)(6116002)(52116002)(76176011)(3846002)(6512007)(53936002)(2616005)(11346002)(476003)(446003)(74482002)(8676002)(81156014)(81166006)(186003)(486006)(256004)(26005)(50226002)(8936002)(14444005)(305945005)(7736002)(5660300001)(6916009)(25786009)(4326008)(36756003); DIR:OUT; SFP:1102; SCL:1; SRVR:AM6PR02MB3735; H:AM6PR02MB4470.eurprd02.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; received-spf: None (protection.outlook.com: axentia.se does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: d6CC/R0O8uLtdnSs5Qn2G5HzrRz3llfsf9NLzly93PmYHj+NhUcHR1e+CcxQ6QGCb3eruPTM3aJYpDLYKKpNDyfao07GzX2RwscwXPA3neS9wsf87xZXLd8WmHi2dXXEGh2rxMWUs4t9oJCFooIP4bd/jt0wGEGM39CKUuJZHeLCEfcpR1EzBheEsLiNyo9wiz/epEzINkCj5i5G4h0Pg9mrVkiN6d3lUIDN75cFWr8DJaVCdNKYImNOfOx9IkcjTa4WyiB30vBfLf4XvcT5gHWpB5oWXcb5X8usRVyfoaOpNnxBhjuxdizPvkdfUjgDTsE+dSj2guce/3oPn8B09XpULBg5Nz3X6wkxhK0i/IsOD5u4zBv9eOv1y4D5hjAn8v9XZ5/GMXqZK2WUcXOPHcsfUb+Fg43efPBUlp8lhI8= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM MIME-Version: 1.0 X-OriginatorOrg: axentia.se X-MS-Exchange-CrossTenant-Network-Message-Id: 82f145fe-fdd5-4049-ddd6-08d677d81fd2 X-MS-Exchange-CrossTenant-originalarrivaltime: 11 Jan 2019 15:19:04.3743 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 4ee68585-03e1-4785-942a-df9c1871a234 X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR02MB3735 X-Mailman-Approved-At: Sun, 13 Jan 2019 16:52:57 +0000 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Rutland , "devicetree@vger.kernel.org" , David Airlie , "dri-devel@lists.freedesktop.org" , Rob Herring , Laurent Pinchart , Peter Rosin Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP The name powerdown-gpios is the standard property name for the functionality covered by the previous pwdn-gpios name. This rename should be safe to do since the linux driver supporting the binding (lvds-encoder.c) never implemented the property, and no dts file names it. At least not upstream. Reviewed-by: Rob Herring Signed-off-by: Peter Rosin --- Documentation/devicetree/bindings/display/bridge/thine,thc63lvdm83d.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Documentation/devicetree/bindings/display/bridge/thine,thc63lvdm83d.txt b/Documentation/devicetree/bindings/display/bridge/thine,thc63lvdm83d.txt index 527e236e9a2a..fee3c88e1a17 100644 --- a/Documentation/devicetree/bindings/display/bridge/thine,thc63lvdm83d.txt +++ b/Documentation/devicetree/bindings/display/bridge/thine,thc63lvdm83d.txt @@ -10,7 +10,7 @@ Required properties: Optional properties: -- pwdn-gpios: Power down control GPIO +- powerdown-gpios: Power down control GPIO (the /PWDN pin, active low). Required nodes: From patchwork Fri Jan 11 15:19:10 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Rosin X-Patchwork-Id: 10761353 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 504511580 for ; Sun, 13 Jan 2019 16:53:11 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3E82F2889E for ; Sun, 13 Jan 2019 16:53:11 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 330B528995; Sun, 13 Jan 2019 16:53:11 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id D94682889E for ; Sun, 13 Jan 2019 16:53:10 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 51AD46E517; Sun, 13 Jan 2019 16:52:59 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from EUR04-HE1-obe.outbound.protection.outlook.com (mail-he1eur04on0727.outbound.protection.outlook.com [IPv6:2a01:111:f400:fe0d::727]) by gabe.freedesktop.org (Postfix) with ESMTPS id 87C346F765 for ; Fri, 11 Jan 2019 15:19:14 +0000 (UTC) Received: from AM6PR02MB4470.eurprd02.prod.outlook.com (20.177.191.218) by AM6PR02MB3735.eurprd02.prod.outlook.com (52.134.113.24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1516.13; Fri, 11 Jan 2019 15:19:11 +0000 Received: from AM6PR02MB4470.eurprd02.prod.outlook.com ([fe80::e5f3:a239:2ec4:4453]) by AM6PR02MB4470.eurprd02.prod.outlook.com ([fe80::e5f3:a239:2ec4:4453%6]) with mapi id 15.20.1516.016; Fri, 11 Jan 2019 15:19:11 +0000 From: Peter Rosin To: "linux-kernel@vger.kernel.org" Subject: [PATCH v4 4/5] drm/bridge: lvds-encoder: add dev helper variable in .probe() Thread-Topic: [PATCH v4 4/5] drm/bridge: lvds-encoder: add dev helper variable in .probe() Thread-Index: AQHUqcEAzPFcqEwkg0i7hxnCwqBC8g== Date: Fri, 11 Jan 2019 15:19:10 +0000 Message-ID: <20190111151843.11114-5-peda@axentia.se> References: <20190111151843.11114-1-peda@axentia.se> In-Reply-To: <20190111151843.11114-1-peda@axentia.se> Accept-Language: en-US, sv-SE Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-mailer: git-send-email 2.11.0 x-originating-ip: [85.226.244.23] x-clientproxiedby: HE1PR07CA0035.eurprd07.prod.outlook.com (2603:10a6:7:66::21) To AM6PR02MB4470.eurprd02.prod.outlook.com (2603:10a6:20b:60::26) x-ms-exchange-messagesentrepresentingtype: 1 x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; AM6PR02MB3735; 6:NC4DHMn33byVV4p2aypkNqxAZ9g0yy5pdW5uHxY0Sx64XFavQNmyaDGGRf6PqxqAq+StO6rFPT/2rVFsSCdd7fjZQVxLWRL96dkSfKjBfwx/0NGgTczQZL7DynjAYnKuEweB15Nlvju30/F65PjrRZxwLGC0pF9OtpE8VKv6SX8Mn9r3HaCJHVmZCCn/9GWfiUAPGjWqxQKj1ixfkS/d9c6uRrZZJY2+CxqPIu18nEi0WHdNyF/W6FvCgnxjQ0eNsF+Y1CyEwJtiug0pSGIbUzKvs+7W0Ru9YSnCUFDJlFSTzCz5bqD5LpoJsShp4taq8WtCxTprM0sPDNijpXXT6MdCJvsJj84/yAmaOWQrqmOHJ4wewTMB8miE4dgZOUJz5IC1sXmcdtKGUKir72XdLRat5f5LkucJ2cP5udPdSUkLYqUoUC6g9xCQvgQ8BJ8x4bg430ihQV5TEh5sUSDaig==; 5:x0/1C/XdtqdafRfd8oK/4cfTX8SqfKPnNs3H7pmQg7lhRaYPEqjaRfKneYrzj5kP+J8lfXje5bZXZn6r2h9nkO5fYMOVyGGzQb0hlhxVSmJmdxNTn9Y3BOlkDvzb/XbVS5LyfzMWErg1A+8qgpSsfXYSvxNb3I/Ef28kZE46ZYTyFMt+6qUwnCD0XnyOCRqk2IxjeAu66bTJIIKIQkKphQ==; 7:sI9bQgbe8C8yoA/Ohe9WLvNq7GcwiKgF87gBYpmDOeNF3ZzQ8RZnL8FHAz1N19vWSkG65EhD0QDhBlqebpt8pVHBVKkdBE87T4/Ku8JW4w8vgi2nH9Sgifnx+ozdK8xiZfJ+gcMh4q/Wo0G1CEjvjQ== x-ms-office365-filtering-correlation-id: 6f6c1386-730d-497a-ef80-08d677d82305 x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(7021145)(8989299)(4534185)(7022145)(4603075)(4627221)(201702281549075)(8990200)(7048125)(7024125)(7027125)(7023125)(5600109)(711020)(2017052603328)(7153060)(7193020); SRVR:AM6PR02MB3735; x-ms-traffictypediagnostic: AM6PR02MB3735: x-microsoft-antispam-prvs: x-forefront-prvs: 09144DB0F7 x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(396003)(376002)(366004)(346002)(136003)(39830400003)(189003)(199004)(2501003)(1076003)(14454004)(99286004)(54906003)(508600001)(5640700003)(68736007)(6436002)(97736004)(2906002)(71190400001)(2351001)(106356001)(6486002)(316002)(105586002)(71200400001)(86362001)(575784001)(386003)(6506007)(102836004)(66066001)(6116002)(52116002)(76176011)(3846002)(6512007)(53936002)(2616005)(11346002)(476003)(446003)(74482002)(8676002)(81156014)(81166006)(186003)(486006)(5024004)(256004)(26005)(50226002)(8936002)(305945005)(7736002)(5660300001)(6916009)(25786009)(4326008)(36756003)(142923001); DIR:OUT; SFP:1102; SCL:1; SRVR:AM6PR02MB3735; H:AM6PR02MB4470.eurprd02.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; received-spf: None (protection.outlook.com: axentia.se does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: TkcZfvtRRMm05BV51USo0p23BUQVaK8b7F6pSEd/+5hg9aeWwJMhMFIt616LXO54RlLdj+/+BfUfTrZ2h5ekq5GKSQl85xV4c8tD1LcPA17cTXTAd4xVMFsZfE9v+XyHnlU1MgqAE4cx6T4qybm4ThP+NSQUGDw29RudR34onqEEL16l55ANkn+O0j8Z5F84s1PhA8lE6NxIvmyoIzgexb/R1Z9SRfSw7xWVmk2JAyEweqUFp9a/0833QLEswJwZ9flk3iwqiSDjRyum8zWHUtIR/0XJNKlNT2/OzpDiha5y4zpC+IemNRbYd025aupHUnc+DuKAX0gYjxoE5MO3fhPYLpaAE0y7peAA56yChLFFIxAQ6OuTjj+6XJ2behOyE0iQFSANq6jzHRo5uW03ci7SNKoNmRfTIIuq1gSafz0= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM MIME-Version: 1.0 X-OriginatorOrg: axentia.se X-MS-Exchange-CrossTenant-Network-Message-Id: 6f6c1386-730d-497a-ef80-08d677d82305 X-MS-Exchange-CrossTenant-originalarrivaltime: 11 Jan 2019 15:19:09.7412 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 4ee68585-03e1-4785-942a-df9c1871a234 X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR02MB3735 X-Mailman-Approved-At: Sun, 13 Jan 2019 16:52:57 +0000 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Rutland , "devicetree@vger.kernel.org" , David Airlie , "dri-devel@lists.freedesktop.org" , Rob Herring , Laurent Pinchart , Peter Rosin Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP Make the code easier to read and modify. Signed-off-by: Peter Rosin Reviewed-by: Andrzej Hajda --- drivers/gpu/drm/bridge/lvds-encoder.c | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/drivers/gpu/drm/bridge/lvds-encoder.c b/drivers/gpu/drm/bridge/lvds-encoder.c index 75b0d3f6e4de..f6770e83d49d 100644 --- a/drivers/gpu/drm/bridge/lvds-encoder.c +++ b/drivers/gpu/drm/bridge/lvds-encoder.c @@ -34,48 +34,47 @@ static struct drm_bridge_funcs funcs = { static int lvds_encoder_probe(struct platform_device *pdev) { + struct device *dev = &pdev->dev; struct device_node *port; struct device_node *endpoint; struct device_node *panel_node; struct drm_panel *panel; struct lvds_encoder *lvds_encoder; - lvds_encoder = devm_kzalloc(&pdev->dev, sizeof(*lvds_encoder), - GFP_KERNEL); + lvds_encoder = devm_kzalloc(dev, sizeof(*lvds_encoder), GFP_KERNEL); if (!lvds_encoder) return -ENOMEM; /* Locate the panel DT node. */ - port = of_graph_get_port_by_id(pdev->dev.of_node, 1); + port = of_graph_get_port_by_id(dev->of_node, 1); if (!port) { - dev_dbg(&pdev->dev, "port 1 not found\n"); + dev_dbg(dev, "port 1 not found\n"); return -ENXIO; } endpoint = of_get_child_by_name(port, "endpoint"); of_node_put(port); if (!endpoint) { - dev_dbg(&pdev->dev, "no endpoint for port 1\n"); + dev_dbg(dev, "no endpoint for port 1\n"); return -ENXIO; } panel_node = of_graph_get_remote_port_parent(endpoint); of_node_put(endpoint); if (!panel_node) { - dev_dbg(&pdev->dev, "no remote endpoint for port 1\n"); + dev_dbg(dev, "no remote endpoint for port 1\n"); return -ENXIO; } panel = of_drm_find_panel(panel_node); of_node_put(panel_node); if (!panel) { - dev_dbg(&pdev->dev, "panel not found, deferring probe\n"); + dev_dbg(dev, "panel not found, deferring probe\n"); return -EPROBE_DEFER; } lvds_encoder->panel_bridge = - devm_drm_panel_bridge_add(&pdev->dev, - panel, DRM_MODE_CONNECTOR_LVDS); + devm_drm_panel_bridge_add(dev, panel, DRM_MODE_CONNECTOR_LVDS); if (IS_ERR(lvds_encoder->panel_bridge)) return PTR_ERR(lvds_encoder->panel_bridge); @@ -83,7 +82,7 @@ static int lvds_encoder_probe(struct platform_device *pdev) * but we need a bridge attached to our of_node for our user * to look up. */ - lvds_encoder->bridge.of_node = pdev->dev.of_node; + lvds_encoder->bridge.of_node = dev->of_node; lvds_encoder->bridge.funcs = &funcs; drm_bridge_add(&lvds_encoder->bridge); From patchwork Fri Jan 11 15:19:17 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Rosin X-Patchwork-Id: 10761357 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id A09541580 for ; Sun, 13 Jan 2019 16:53:24 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8E5B82889E for ; Sun, 13 Jan 2019 16:53:24 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 82A2828995; Sun, 13 Jan 2019 16:53:24 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 36AE02889E for ; Sun, 13 Jan 2019 16:53:24 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 634366E521; Sun, 13 Jan 2019 16:53:16 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from EUR04-HE1-obe.outbound.protection.outlook.com (mail-eopbgr70112.outbound.protection.outlook.com [40.107.7.112]) by gabe.freedesktop.org (Postfix) with ESMTPS id 73B326F766 for ; Fri, 11 Jan 2019 15:19:19 +0000 (UTC) Received: from AM6PR02MB4470.eurprd02.prod.outlook.com (20.177.191.218) by AM6PR02MB3735.eurprd02.prod.outlook.com (52.134.113.24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1516.13; Fri, 11 Jan 2019 15:19:17 +0000 Received: from AM6PR02MB4470.eurprd02.prod.outlook.com ([fe80::e5f3:a239:2ec4:4453]) by AM6PR02MB4470.eurprd02.prod.outlook.com ([fe80::e5f3:a239:2ec4:4453%6]) with mapi id 15.20.1516.016; Fri, 11 Jan 2019 15:19:17 +0000 From: Peter Rosin To: "linux-kernel@vger.kernel.org" Subject: [PATCH v4 5/5] drm/bridge: lvds-encoder: add powerdown-gpios support Thread-Topic: [PATCH v4 5/5] drm/bridge: lvds-encoder: add powerdown-gpios support Thread-Index: AQHUqcEEETjnMRW/6keq9Pzr1i6FMg== Date: Fri, 11 Jan 2019 15:19:17 +0000 Message-ID: <20190111151843.11114-6-peda@axentia.se> References: <20190111151843.11114-1-peda@axentia.se> In-Reply-To: <20190111151843.11114-1-peda@axentia.se> Accept-Language: en-US, sv-SE Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-mailer: git-send-email 2.11.0 x-originating-ip: [85.226.244.23] x-clientproxiedby: HE1PR07CA0035.eurprd07.prod.outlook.com (2603:10a6:7:66::21) To AM6PR02MB4470.eurprd02.prod.outlook.com (2603:10a6:20b:60::26) x-ms-exchange-messagesentrepresentingtype: 1 x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; AM6PR02MB3735; 6:1FrQwai4gvl2zrnbKqLlJK+HjqWmtivxgjuDebElDeglXPWTsREix8CuAX3rOS+G1tZJzJKf6zkH94SLZ6jZre3KhFNe7oVLpt34wHP/si1syGwa3uyj28Fcy17n53Kexg1wJvW2B95ZJBMIeMQ2m3sSQyy6WBoQZIRjOjR55Dmc8wgPOVIhB0PS3Yq3o0KlmCIoHmHFpFpttGGkiWkIfnOI/oVnTP5awRirHSVTlOk7gXOHqlEh/IN0+F/snaK1FNhNM70TAXY2eWWpRMVoAwcHyJ305iPqTDSad/qF+7c0UiOcaaL4pK42NgseLX9lkcTK6JA1JNLzCejAmduWT1QrhsHYreT4vW73YA3j2yE+/W6+zcMrVutNU2Bf6+xNybfVtfKev3Io3GjNRPDAcsgnszfSQI4520/zqkNWTWdpxsEn+DPxX1P800+J1hCk7AXRy+0cbbDDoFhY486/Og==; 5:ILar9w64CeYz/QDsYUCyIH7sKH1gjOFbJtDgZ6yLGvWzBSQ/Z4ESDmAOsdGlybISbbIx9OWLlZyaVeaalAp+PxF59tJ5YdKtCsqwLSnm9u8bH1JxRXTIk3J05xrHczI902T3zPhfafD8UnzpiGEop/+w1X2gAv5Pozp1L2lZFvDO5EsA/hJqTb5fQblkAu0n10oO+EPgVv1DxUesPpfRTg==; 7:gEuZJsU0BiBSoGWJ1eabQBXxBcTCiCh7F4zeLomqZHClPm9O+8Zqgi1rZHO6ToGSujGuIrt0pv5OZmqYlkxK0fIOmDd7cE8VvM0bsaHX5Q/hzKEcMpLmg/wi//mKrTS/7e3yMpo1k9WYQSf6QQvgGw== x-ms-office365-filtering-correlation-id: 0459a46b-9908-483e-2e63-08d677d826f8 x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(7021145)(8989299)(4534185)(7022145)(4603075)(4627221)(201702281549075)(8990200)(7048125)(7024125)(7027125)(7023125)(5600109)(711020)(2017052603328)(7153060)(7193020); SRVR:AM6PR02MB3735; x-ms-traffictypediagnostic: AM6PR02MB3735: x-microsoft-antispam-prvs: x-forefront-prvs: 09144DB0F7 x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(396003)(376002)(366004)(346002)(136003)(39830400003)(189003)(199004)(2501003)(1076003)(14454004)(99286004)(54906003)(508600001)(5640700003)(68736007)(6436002)(97736004)(2906002)(71190400001)(2351001)(106356001)(6486002)(316002)(105586002)(71200400001)(86362001)(386003)(6506007)(102836004)(66066001)(6116002)(52116002)(76176011)(3846002)(6512007)(53936002)(2616005)(11346002)(476003)(446003)(74482002)(8676002)(81156014)(81166006)(186003)(486006)(5024004)(256004)(26005)(50226002)(8936002)(14444005)(305945005)(7736002)(5660300001)(6916009)(25786009)(4326008)(36756003); DIR:OUT; SFP:1102; SCL:1; SRVR:AM6PR02MB3735; H:AM6PR02MB4470.eurprd02.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; received-spf: None (protection.outlook.com: axentia.se does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: mNV1DamDWVm7AH2/WvNgPu+ciYXqa0yztcF6t++JX8YwA5SIuShZwt/0ZBmBflzRQksjhgK+o7F4fl1kSt4wED9gLoaKbMcI+7DLBk4B9qjVBFjxpoXFu4yDxU71fxlN9MiT/27LpnB/bk7ojOq8ns963DCcEC81Delw1w3fUlbnnTE5zFYGYd5y28EpOTJJhTondY2RfBnbMyySQs0/FrARY6u1Gte7sVDBjheiQaRXcvKNzxzQyD+1pilmg4K9WxKR0yT+BUfqIn+0Ybvzs0Bccb0eKoiTHwf78NmG49rMy+jbp6JeGGKrOHi/YszBYCsuDaktUgQAmVGXUJwbDjcE3dGX9Jss9YndvhZTzZ4fPRSmL8sesD+5cTK2WmvQd0UcLoXKnEkRgyHLXNOvIlMvbyZYHZV4r1gRkuXFVoE= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM MIME-Version: 1.0 X-OriginatorOrg: axentia.se X-MS-Exchange-CrossTenant-Network-Message-Id: 0459a46b-9908-483e-2e63-08d677d826f8 X-MS-Exchange-CrossTenant-originalarrivaltime: 11 Jan 2019 15:19:16.3639 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 4ee68585-03e1-4785-942a-df9c1871a234 X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR02MB3735 X-Mailman-Approved-At: Sun, 13 Jan 2019 16:52:57 +0000 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Rutland , "devicetree@vger.kernel.org" , David Airlie , "dri-devel@lists.freedesktop.org" , Rob Herring , Laurent Pinchart , Peter Rosin Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP Optionally power down the LVDS-encoder when it is not in use. Signed-off-by: Peter Rosin Reviewed-by: Andrzej Hajda --- drivers/gpu/drm/bridge/lvds-encoder.c | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/drivers/gpu/drm/bridge/lvds-encoder.c b/drivers/gpu/drm/bridge/lvds-encoder.c index f6770e83d49d..36d8557bc097 100644 --- a/drivers/gpu/drm/bridge/lvds-encoder.c +++ b/drivers/gpu/drm/bridge/lvds-encoder.c @@ -11,11 +11,13 @@ #include #include +#include #include struct lvds_encoder { struct drm_bridge bridge; struct drm_bridge *panel_bridge; + struct gpio_desc *powerdown_gpio; }; static int lvds_encoder_attach(struct drm_bridge *bridge) @@ -28,8 +30,30 @@ static int lvds_encoder_attach(struct drm_bridge *bridge) bridge); } +static void lvds_encoder_enable(struct drm_bridge *bridge) +{ + struct lvds_encoder *lvds_encoder = container_of(bridge, + struct lvds_encoder, + bridge); + + if (lvds_encoder->powerdown_gpio) + gpiod_set_value_cansleep(lvds_encoder->powerdown_gpio, 0); +} + +static void lvds_encoder_disable(struct drm_bridge *bridge) +{ + struct lvds_encoder *lvds_encoder = container_of(bridge, + struct lvds_encoder, + bridge); + + if (lvds_encoder->powerdown_gpio) + gpiod_set_value_cansleep(lvds_encoder->powerdown_gpio, 1); +} + static struct drm_bridge_funcs funcs = { .attach = lvds_encoder_attach, + .enable = lvds_encoder_enable, + .disable = lvds_encoder_disable, }; static int lvds_encoder_probe(struct platform_device *pdev) @@ -45,6 +69,16 @@ static int lvds_encoder_probe(struct platform_device *pdev) if (!lvds_encoder) return -ENOMEM; + lvds_encoder->powerdown_gpio = devm_gpiod_get_optional(dev, "powerdown", + GPIOD_OUT_HIGH); + if (IS_ERR(lvds_encoder->powerdown_gpio)) { + int err = PTR_ERR(lvds_encoder->powerdown_gpio); + + if (err != -EPROBE_DEFER) + dev_err(dev, "powerdown GPIO failure: %d\n", err); + return err; + } + /* Locate the panel DT node. */ port = of_graph_get_port_by_id(dev->of_node, 1); if (!port) {