From patchwork Thu Mar 19 17:41:43 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alex Riesen X-Patchwork-Id: 210526 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 58FA2C4332B for ; Thu, 19 Mar 2020 17:42:20 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 31F7D2071C for ; Thu, 19 Mar 2020 17:42:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728604AbgCSRmR (ORCPT ); Thu, 19 Mar 2020 13:42:17 -0400 Received: from mout.kundenserver.de ([212.227.126.135]:39493 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728576AbgCSRmP (ORCPT ); Thu, 19 Mar 2020 13:42:15 -0400 Received: from mail.cetitecgmbh.com ([87.190.42.90]) by mrelayeu.kundenserver.de (mreue009 [212.227.15.167]) with ESMTPSA (Nemesis) id 1MryKr-1jbePu2RHx-00nvui; Thu, 19 Mar 2020 18:41:47 +0100 Received: from pflvmailgateway.corp.cetitec.com (unknown [127.0.0.1]) by mail.cetitecgmbh.com (Postfix) with ESMTP id 718EF65021B; Thu, 19 Mar 2020 17:41:44 +0000 (UTC) X-Virus-Scanned: amavisd-new at cetitec.com Received: from mail.cetitecgmbh.com ([127.0.0.1]) by pflvmailgateway.corp.cetitec.com (pflvmailgateway.corp.cetitec.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id dqw4xhgj7N5p; Thu, 19 Mar 2020 18:41:44 +0100 (CET) Received: from pfwsexchange.corp.cetitec.com (unknown [10.10.1.99]) by mail.cetitecgmbh.com (Postfix) with ESMTPS id 0690264F8ED; Thu, 19 Mar 2020 18:41:44 +0100 (CET) Received: from pflmari.corp.cetitec.com (10.8.5.52) by PFWSEXCHANGE.corp.cetitec.com (10.10.1.99) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Thu, 19 Mar 2020 18:41:44 +0100 Received: by pflmari.corp.cetitec.com (Postfix, from userid 1000) id 739388050C; Thu, 19 Mar 2020 18:41:43 +0100 (CET) Date: Thu, 19 Mar 2020 18:41:43 +0100 From: Alex Riesen To: Kieran Bingham CC: Geert Uytterhoeven , Mauro Carvalho Chehab , Hans Verkuil , "Laurent Pinchart" , Rob Herring , Mark Rutland , Kuninori Morimoto , , , , , Subject: [PATCH v2 01/10] media: adv748x: fix end-of-line terminators in diagnostic statements Message-ID: <5272d873b4daf8b0bdb8aff81b08ab3508da9567.1584639664.git.alexander.riesen@cetitec.com> Mail-Followup-To: Alex Riesen , Kieran Bingham , Geert Uytterhoeven , Mauro Carvalho Chehab , Hans Verkuil , Laurent Pinchart , Rob Herring , Mark Rutland , Kuninori Morimoto , devel@driverdev.osuosl.org, linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, linux-renesas-soc@vger.kernel.org References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-Originating-IP: [10.8.5.52] X-ClientProxiedBy: PFWSEXCHANGE.corp.cetitec.com (10.10.1.99) To PFWSEXCHANGE.corp.cetitec.com (10.10.1.99) X-EsetResult: clean, is OK X-EsetId: 37303A290D7F536A6D7762 X-Provags-ID: V03:K1:4ZJC+78LMq1c97WiQD0OVYyKMvI2ohF7vZwBoZBySSHelaCDmeq jTulDTZ6oMWVm6JGSPM381luWOIXY0G0Xy5Jxtd8+LkP1J+xMMgMF47U3XO2pC5K8ZA27SY u5z3JDR9b4J1zpLbY1EPsQjHQ0Btv7f6oUPcCl/l0Xwv7tkGj2EKFAR7qPWpZRl8zRrMKE4 pLDCrm3hu+wfQJsKjvp3A== X-UI-Out-Filterresults: notjunk:1; V03:K0:ojVJRJsVJU8=:N5P41ydm6kNSZsBBgmqFAA uEE2h2JO+yHumdQ9fz1F9A/c5FzikkH18zSopYh0pRURk6Z7xz+RVD3YvK1gatezthfuqIDi1 9nIDWA/VFnlEe2MhYIc6VgiaJ6jc6hQP6h63xCqd6lKk/GaWDTRgEt7M6rRPVKavixF92lVRw jghXdwG745BXiwwtC86RusvPnHpwEfq6UotmurYqKeZwNWAi2bix/i8Z5qL3wWl9EzPMt1jXy COXi0qoQsQwYBIm3S+EDHhmW5n/qgJKQcgxZP4roONapuv6yYYhLi9pvbiZDTj7SXOhwmS9OB 4w0cEhx8iDf7B6Sf13irliZfQj0OAMbooAJoTaTrEL9eGowycTt1ljZ8BSWF6L/2evIbu4Rog 7oU0hApyfODq7n7izg6L3xJIYUAcpS1fPiKquwgfsa7wX3RSGI8MwMN6XQedhkOCDLvwUxqQh ZpDA6p6aH756Jbsevz/O1YIk8iGv6zXmptiQ5J/wU+75c0tY78y7R5wXFbPv0MM8SK/VOfGai dIm+jBNxmNdVeTKu3nNbQJjMkfMx4z1DAi+pPQMgt3XNVPBz4BSOU4VHjyEsfNPaHNaYCK5Wq FVph8hsp7VEJLAS/milgxzS6UJw/AxVyv+LbTII30H/DuL5GS0/0vfXhac/lir0z7Fz3q4OnC XTGBstnL40lvis1QCKTiMpxbC6CzO+57XrIaJr0N8f+N7H7BkqV6O3Q1c/+HpCw9bLpsNqgI8 WyFHcBMRMa51BKTEXIRmXbJxSBqZ8n4/ry3Qvm2gXsgG1JN6VfM94MofeFm7PRLFz9E/6B3Ba FTPjLdLk7yXbaRey6xUmFJzXWS1eBkn+uXGl8QlscgNPKH+A4sS/LGx6jQkwv+3cLIpiZM/ Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org Signed-off-by: Alexander Riesen --- drivers/media/i2c/adv748x/adv748x-core.c | 24 ++++++++++++------------ drivers/media/i2c/adv748x/adv748x-csi2.c | 2 +- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/drivers/media/i2c/adv748x/adv748x-core.c b/drivers/media/i2c/adv748x/adv748x-core.c index 23e02ff27b17..c3fb113cef62 100644 --- a/drivers/media/i2c/adv748x/adv748x-core.c +++ b/drivers/media/i2c/adv748x/adv748x-core.c @@ -623,11 +623,11 @@ static int adv748x_parse_dt(struct adv748x_state *state) for_each_endpoint_of_node(state->dev->of_node, ep_np) { of_graph_parse_endpoint(ep_np, &ep); - adv_info(state, "Endpoint %pOF on port %d", ep.local_node, + adv_info(state, "Endpoint %pOF on port %d\n", ep.local_node, ep.port); if (ep.port >= ADV748X_PORT_MAX) { - adv_err(state, "Invalid endpoint %pOF on port %d", + adv_err(state, "Invalid endpoint %pOF on port %d\n", ep.local_node, ep.port); continue; @@ -635,7 +635,7 @@ static int adv748x_parse_dt(struct adv748x_state *state) if (state->endpoints[ep.port]) { adv_err(state, - "Multiple port endpoints are not supported"); + "Multiple port endpoints are not supported\n"); continue; } @@ -702,62 +702,62 @@ static int adv748x_probe(struct i2c_client *client) /* Discover and process ports declared by the Device tree endpoints */ ret = adv748x_parse_dt(state); if (ret) { - adv_err(state, "Failed to parse device tree"); + adv_err(state, "Failed to parse device tree\n"); goto err_free_mutex; } /* Configure IO Regmap region */ ret = adv748x_configure_regmap(state, ADV748X_PAGE_IO); if (ret) { - adv_err(state, "Error configuring IO regmap region"); + adv_err(state, "Error configuring IO regmap region\n"); goto err_cleanup_dt; } ret = adv748x_identify_chip(state); if (ret) { - adv_err(state, "Failed to identify chip"); + adv_err(state, "Failed to identify chip\n"); goto err_cleanup_dt; } /* Configure remaining pages as I2C clients with regmap access */ ret = adv748x_initialise_clients(state); if (ret) { - adv_err(state, "Failed to setup client regmap pages"); + adv_err(state, "Failed to setup client regmap pages\n"); goto err_cleanup_clients; } /* SW reset ADV748X to its default values */ ret = adv748x_reset(state); if (ret) { - adv_err(state, "Failed to reset hardware"); + adv_err(state, "Failed to reset hardware\n"); goto err_cleanup_clients; } /* Initialise HDMI */ ret = adv748x_hdmi_init(&state->hdmi); if (ret) { - adv_err(state, "Failed to probe HDMI"); + adv_err(state, "Failed to probe HDMI\n"); goto err_cleanup_clients; } /* Initialise AFE */ ret = adv748x_afe_init(&state->afe); if (ret) { - adv_err(state, "Failed to probe AFE"); + adv_err(state, "Failed to probe AFE\n"); goto err_cleanup_hdmi; } /* Initialise TXA */ ret = adv748x_csi2_init(state, &state->txa); if (ret) { - adv_err(state, "Failed to probe TXA"); + adv_err(state, "Failed to probe TXA\n"); goto err_cleanup_afe; } /* Initialise TXB */ ret = adv748x_csi2_init(state, &state->txb); if (ret) { - adv_err(state, "Failed to probe TXB"); + adv_err(state, "Failed to probe TXB\n"); goto err_cleanup_txa; } diff --git a/drivers/media/i2c/adv748x/adv748x-csi2.c b/drivers/media/i2c/adv748x/adv748x-csi2.c index 2091cda50935..c43ce5d78723 100644 --- a/drivers/media/i2c/adv748x/adv748x-csi2.c +++ b/drivers/media/i2c/adv748x/adv748x-csi2.c @@ -72,7 +72,7 @@ static int adv748x_csi2_registered(struct v4l2_subdev *sd) struct adv748x_state *state = tx->state; int ret; - adv_dbg(state, "Registered %s (%s)", is_txa(tx) ? "TXA":"TXB", + adv_dbg(state, "Registered %s (%s)\n", is_txa(tx) ? "TXA":"TXB", sd->name); /* From patchwork Thu Mar 19 17:41:48 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alex Riesen X-Patchwork-Id: 210525 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4696EC43332 for ; Thu, 19 Mar 2020 17:42:27 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 29A732166E for ; Thu, 19 Mar 2020 17:42:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728077AbgCSRmG (ORCPT ); Thu, 19 Mar 2020 13:42:06 -0400 Received: from mout.kundenserver.de ([212.227.126.133]:59047 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726934AbgCSRmG (ORCPT ); Thu, 19 Mar 2020 13:42:06 -0400 Received: from mail.cetitecgmbh.com ([87.190.42.90]) by mrelayeu.kundenserver.de (mreue009 [212.227.15.167]) with ESMTPSA (Nemesis) id 1MORN0-1ivo7k0Cbu-00Pz7Q; Thu, 19 Mar 2020 18:41:50 +0100 Received: from pflvmailgateway.corp.cetitec.com (unknown [127.0.0.1]) by mail.cetitecgmbh.com (Postfix) with ESMTP id B7A7B65021B; Thu, 19 Mar 2020 17:41:49 +0000 (UTC) X-Virus-Scanned: amavisd-new at cetitec.com Received: from mail.cetitecgmbh.com ([127.0.0.1]) by pflvmailgateway.corp.cetitec.com (pflvmailgateway.corp.cetitec.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id zJ0c4ug5kAPk; Thu, 19 Mar 2020 18:41:49 +0100 (CET) Received: from pfwsexchange.corp.cetitec.com (unknown [10.10.1.99]) by mail.cetitecgmbh.com (Postfix) with ESMTPS id 517E264F8ED; Thu, 19 Mar 2020 18:41:49 +0100 (CET) Received: from pflmari.corp.cetitec.com (10.8.5.52) by PFWSEXCHANGE.corp.cetitec.com (10.10.1.99) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Thu, 19 Mar 2020 18:41:49 +0100 Received: by pflmari.corp.cetitec.com (Postfix, from userid 1000) id 9E04D8050C; Thu, 19 Mar 2020 18:41:48 +0100 (CET) Date: Thu, 19 Mar 2020 18:41:48 +0100 From: Alex Riesen To: Kieran Bingham CC: Geert Uytterhoeven , Mauro Carvalho Chehab , Hans Verkuil , "Laurent Pinchart" , Rob Herring , Mark Rutland , Kuninori Morimoto , , , , , Subject: [PATCH v2 02/10] media: adv748x: include everything adv748x.h needs into the file Message-ID: Mail-Followup-To: Alex Riesen , Kieran Bingham , Geert Uytterhoeven , Mauro Carvalho Chehab , Hans Verkuil , Laurent Pinchart , Rob Herring , Mark Rutland , Kuninori Morimoto , devel@driverdev.osuosl.org, linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, linux-renesas-soc@vger.kernel.org References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-Originating-IP: [10.8.5.52] X-ClientProxiedBy: PFWSEXCHANGE.corp.cetitec.com (10.10.1.99) To PFWSEXCHANGE.corp.cetitec.com (10.10.1.99) X-EsetResult: clean, is OK X-EsetId: 37303A290D7F536A6D7762 X-Provags-ID: V03:K1:FHxeNjGlIL7NzarJSPnLpbfeHB9uBfXDTSMuryQpyLu9Ee7QL4W cyHLH9BjLgtvX3Up1fHkJk1x3oQvGZZu2nsQEBQftJgEHGxFJiKo8RClAoRE3uyZ526t/wv YwGDdYlSP40KxGOUYds9L9lhGtR3M1CXWPpVSd5GTIGdpojWw32pqnHGTmf/I1ONnFwipMk 9NB5bfT6vPJquo5wetmtw== X-UI-Out-Filterresults: notjunk:1; V03:K0:Uu9yQPd1gcU=:hz1qzK2t6UBTEhWh44qlRL UnT0ILN1Dg+H3Q3Xuht2QR7b+NRmfiztGZCJBTtVm+MjiZDsj8r/+tEEW/Xco2BhskekfoyFS q0LoQAmkJKx+aBgR7RA+rN0fcecqrhWaz6LxvMk7Sr6NF0wuPOpOShVcmgPTbzRH8bj7So+be XYX/Y5DQFV6ULNpfZdCExmVn4fqs0KeQEo5RzS/5xR/BJ/A+ZfnRHCyeODvPrWsyTSS0YkacF vtXuICJ0Noe9kyZsM/XyRBLACmMfUe0SIUHmWEXx+zMYlJGD9Kz/9AwHlQExCgapSgRHIterd j074Jm6e+c35XR2Z2eLx/jKAqa7Y0bI8gJpKhga0cWI9Txl7KRxRHp/Br6/KwEfVr90HZr7Sl 69vrscCga3pUHCUQkZ9RxQqKTkAo/gggM/6EWtWDvkVdR+QmcSLqQHWzvjuvzY4LIAzMzeaRE vmbO1msBdF9NBSu/JeKs7GnC/2BHY+JhRim/SBiWEO0r8Ge+kueoy12ryd76mWAPsxfR25AaO qrAJRZzcE4qPUINg1d9JZYN9cNWcYccS+Z7iiOKax6eekzfxgRhEsthJUxj/L5Zeiz15HXB/S NfjtKMoP2b3qfwBOuXy07q8omWmmlk8E8raNXZEEQMU57cZohSAhB4p6yOBEkUV8vz3I50caw nKjSB+qXX73TDT522MWiCm7vORds1sYYppU6gO6VxS7bOuAE9dxTomrRxiUhGlvPyyXDdtTQ2 XIKzPTz51S+jf4gSnjrZya1JdkDhGJjcXtf7alNB4ym7FxaCI//mTDrYC4ovUPwKrEi67YCMc N4L+RoQ4mX7MtMRM/fHVer9bHB9XmuZH4X2KJajmW6Gyo9trm8oAfFwnpDuneFLyRBx+LO2 Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org To follow the established practice of not depending on others to pull everything in. Signed-off-by: Alexander Riesen --- drivers/media/i2c/adv748x/adv748x-afe.c | 2 -- drivers/media/i2c/adv748x/adv748x-core.c | 2 -- drivers/media/i2c/adv748x/adv748x-csi2.c | 2 -- drivers/media/i2c/adv748x/adv748x-hdmi.c | 2 -- drivers/media/i2c/adv748x/adv748x.h | 2 ++ 5 files changed, 2 insertions(+), 8 deletions(-) diff --git a/drivers/media/i2c/adv748x/adv748x-afe.c b/drivers/media/i2c/adv748x/adv748x-afe.c index dbbb1e4d6363..ab0479641c10 100644 --- a/drivers/media/i2c/adv748x/adv748x-afe.c +++ b/drivers/media/i2c/adv748x/adv748x-afe.c @@ -11,8 +11,6 @@ #include #include -#include -#include #include #include diff --git a/drivers/media/i2c/adv748x/adv748x-core.c b/drivers/media/i2c/adv748x/adv748x-core.c index c3fb113cef62..345f009de121 100644 --- a/drivers/media/i2c/adv748x/adv748x-core.c +++ b/drivers/media/i2c/adv748x/adv748x-core.c @@ -20,8 +20,6 @@ #include #include -#include -#include #include #include #include diff --git a/drivers/media/i2c/adv748x/adv748x-csi2.c b/drivers/media/i2c/adv748x/adv748x-csi2.c index c43ce5d78723..78d391009b5a 100644 --- a/drivers/media/i2c/adv748x/adv748x-csi2.c +++ b/drivers/media/i2c/adv748x/adv748x-csi2.c @@ -8,8 +8,6 @@ #include #include -#include -#include #include #include "adv748x.h" diff --git a/drivers/media/i2c/adv748x/adv748x-hdmi.c b/drivers/media/i2c/adv748x/adv748x-hdmi.c index c557f8fdf11a..0dffcdf79ff2 100644 --- a/drivers/media/i2c/adv748x/adv748x-hdmi.c +++ b/drivers/media/i2c/adv748x/adv748x-hdmi.c @@ -8,8 +8,6 @@ #include #include -#include -#include #include #include diff --git a/drivers/media/i2c/adv748x/adv748x.h b/drivers/media/i2c/adv748x/adv748x.h index fccb388ce179..09aab4138c3f 100644 --- a/drivers/media/i2c/adv748x/adv748x.h +++ b/drivers/media/i2c/adv748x/adv748x.h @@ -19,6 +19,8 @@ */ #include +#include +#include #ifndef _ADV748X_H_ #define _ADV748X_H_ From patchwork Thu Mar 19 17:42:26 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alex Riesen X-Patchwork-Id: 210524 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id F3FF7C4332D for ; Thu, 19 Mar 2020 17:42:54 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id D45E9208C3 for ; Thu, 19 Mar 2020 17:42:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728673AbgCSRmr (ORCPT ); Thu, 19 Mar 2020 13:42:47 -0400 Received: from mout.kundenserver.de ([217.72.192.73]:34335 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727009AbgCSRmr (ORCPT ); Thu, 19 Mar 2020 13:42:47 -0400 Received: from mail.cetitecgmbh.com ([87.190.42.90]) by mrelayeu.kundenserver.de (mreue106 [212.227.15.183]) with ESMTPSA (Nemesis) id 1M6m1g-1jDL2206Os-008Nbk; Thu, 19 Mar 2020 18:42:28 +0100 Received: from pflvmailgateway.corp.cetitec.com (unknown [127.0.0.1]) by mail.cetitecgmbh.com (Postfix) with ESMTP id A53C765021B; Thu, 19 Mar 2020 17:42:27 +0000 (UTC) X-Virus-Scanned: amavisd-new at cetitec.com Received: from mail.cetitecgmbh.com ([127.0.0.1]) by pflvmailgateway.corp.cetitec.com (pflvmailgateway.corp.cetitec.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id ueP1BSl6eNCA; Thu, 19 Mar 2020 18:42:27 +0100 (CET) Received: from pfwsexchange.corp.cetitec.com (unknown [10.10.1.99]) by mail.cetitecgmbh.com (Postfix) with ESMTPS id 5716D64FCB4; Thu, 19 Mar 2020 18:42:27 +0100 (CET) Received: from pflmari.corp.cetitec.com (10.8.5.52) by PFWSEXCHANGE.corp.cetitec.com (10.10.1.99) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Thu, 19 Mar 2020 18:42:27 +0100 Received: by pflmari.corp.cetitec.com (Postfix, from userid 1000) id AFE738050C; Thu, 19 Mar 2020 18:42:26 +0100 (CET) Date: Thu, 19 Mar 2020 18:42:26 +0100 From: Alex Riesen To: Kieran Bingham CC: Geert Uytterhoeven , Mauro Carvalho Chehab , Hans Verkuil , "Laurent Pinchart" , Rob Herring , Mark Rutland , Kuninori Morimoto , , , , , Subject: [PATCH v2 06/10] media: adv748x: only activate DAI if it is described in device tree Message-ID: <59bbe09aa6e42b3b226b394dc7edf6ac8e385d47.1584639664.git.alexander.riesen@cetitec.com> Mail-Followup-To: Alex Riesen , Kieran Bingham , Geert Uytterhoeven , Mauro Carvalho Chehab , Hans Verkuil , Laurent Pinchart , Rob Herring , Mark Rutland , Kuninori Morimoto , devel@driverdev.osuosl.org, linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, linux-renesas-soc@vger.kernel.org References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-Originating-IP: [10.8.5.52] X-ClientProxiedBy: PFWSEXCHANGE.corp.cetitec.com (10.10.1.99) To PFWSEXCHANGE.corp.cetitec.com (10.10.1.99) X-EsetResult: clean, is OK X-EsetId: 37303A290D7F536A6D7762 X-Provags-ID: V03:K1:VN3VMvTICSQ56pLhXQ+DUtZDlCw5I8O1qjE7zi2ANwi99hhSBiK VVPuS5wMcnNx7McRoEj9B8jRCdc579FbPXHjiCjOScMXzntsm4/04BS6MkKYoUMEnU+6EuC uF3qxQNaKjdQAFuLQ0EnR8XWBizbBwK698Nj4OAc/ImS8EgD6s1vhRN2KDUlIADa8Htm8cw v62jBk13uxA37KnZuIFpA== X-UI-Out-Filterresults: notjunk:1; V03:K0:sWZv352a1dw=:wyCA91l4uxMeGJNl4U8WL2 EThfiyxauXiiEsRjCvZBYQ6b317ad8pejS0mPX3h9s1cTuwnMTCihEUQMth/6kSm32CUr1et5 WJxlW2tLBycN+CEuJODCGG6u7UTy47i2v8EmOIqiog4dC/T7z4VD6d/FKMPf9yg7ExUfRtbZP lPUSEXx8/J694eZxE0VyqNPZY9Z6Qp3TfCMwRykpITirzKLHMMWnSlSpesCzIKIyhyRh87zI3 KpKH4LCCxxE06DH+2lZNJ2K5tGJVlRe65Cmh6wcMyL6JcCB7xf8cu6GoQlWtChwqcwjUwJRid /ioq+tWkqeKxnZpi386FzDG6OlSjjC9dIJ7azq++Qdh7TOvEoCGKEbxMxizqTI7vRMwOFQ9NL Wq6tLZ2W7AQvzo/tBhpKeOXZoXsd9GRGW8ekP3vadBmSWOqnSABGPdFPD2GCOVVGA6d4YBUz1 TNbrcEG/dktuKhsZzONNQy1QzrFv5cxHga2G0GRCz1RhBbyKcAL8eysy6iWnNUnZ3a4PdcS8k wrRUEFkdmRIPXDaChHIuEEWosdpY7jAreaOsLVj+qRMQIlFl5RIbJigkJvuFMil2V2faTZQt+ m3Bj+6MR2UUl7MdFrA9EuvWhDg5Gtig1H3isqEV5NfDogfDq2IXQTVxsjDhiaNV6bQVBWVBn6 BeN7aPU+t+WTg2f21TT5eFtsm2YZKlvflQvjUWEvuCLmYs6qoXjyJxl4g2d3TZxNNE8vvf2ae /b+ho/ROeLRDc7ZeRc1PTfy0Mw0NZDfVNaiMqlZbAEUWNssuqh8I1RTEdnGqnCSLnvHUW7rR1 8FsCgPBv1EZo4TPrJJ/chz0fRtmjb7oRPdPU7i0B+1PTXIFEBOR7FDSUm/fbi6nIA1OXGAA Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org To avoid setting it up even if the hardware is not actually connected to anything physically. Besides, the bindings explicitly notes that port definitions are "optional if they are not connected to anything at the hardware level". Signed-off-by: Alexander Riesen --- drivers/media/i2c/adv748x/adv748x-dai.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/media/i2c/adv748x/adv748x-dai.c b/drivers/media/i2c/adv748x/adv748x-dai.c index 4775a0c7ed7f..ce3ae7de765c 100644 --- a/drivers/media/i2c/adv748x/adv748x-dai.c +++ b/drivers/media/i2c/adv748x/adv748x-dai.c @@ -204,6 +204,11 @@ int adv748x_dai_init(struct adv748x_dai *dai) int ret; struct adv748x_state *state = adv748x_dai_to_state(dai); + if (!state->endpoints[ADV748X_PORT_I2S]) { + adv_info(state, "no I2S port, DAI disabled\n"); + ret = 0; + goto fail; + } dai->mclk = clk_register_fixed_rate(state->dev, "adv748x-hdmi-i2s-mclk", NULL /* parent_name */, From patchwork Thu Mar 19 17:42:44 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alex Riesen X-Patchwork-Id: 210515 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.9 required=3.0 tests=DATE_IN_PAST_12_24, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id DAC8DC4332B for ; Fri, 20 Mar 2020 10:09:36 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id AA92C2076C for ; Fri, 20 Mar 2020 10:09:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727198AbgCTKJd (ORCPT ); Fri, 20 Mar 2020 06:09:33 -0400 Received: from mout.kundenserver.de ([212.227.126.187]:33615 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726527AbgCTKJd (ORCPT ); Fri, 20 Mar 2020 06:09:33 -0400 Received: from mail.cetitecgmbh.com ([87.190.42.90]) by mrelayeu.kundenserver.de (mreue009 [212.227.15.167]) with ESMTPSA (Nemesis) id 1MGz5f-1j2sOm3LKV-00E33c; Fri, 20 Mar 2020 11:09:15 +0100 Received: from pflvmailgateway.corp.cetitec.com (unknown [127.0.0.1]) by mail.cetitecgmbh.com (Postfix) with ESMTP id BAF31650261; Fri, 20 Mar 2020 10:09:14 +0000 (UTC) X-Virus-Scanned: amavisd-new at cetitec.com Received: from mail.cetitecgmbh.com ([127.0.0.1]) by pflvmailgateway.corp.cetitec.com (pflvmailgateway.corp.cetitec.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id ieN-mKcVNMhu; Fri, 20 Mar 2020 11:09:13 +0100 (CET) Received: from pfwsexchange.corp.cetitec.com (unknown [10.10.1.99]) by mail.cetitecgmbh.com (Postfix) with ESMTPS id 219E264F7D3; Fri, 20 Mar 2020 11:09:13 +0100 (CET) Received: from pflmari.corp.cetitec.com (10.8.5.41) by PFWSEXCHANGE.corp.cetitec.com (10.10.1.99) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Fri, 20 Mar 2020 11:09:13 +0100 Received: by pflmari.corp.cetitec.com (Postfix, from userid 1000) id D83A58050C; Thu, 19 Mar 2020 18:42:44 +0100 (CET) Date: Thu, 19 Mar 2020 18:42:44 +0100 From: Alex Riesen To: Kieran Bingham CC: Geert Uytterhoeven , Mauro Carvalho Chehab , Hans Verkuil , "Laurent Pinchart" , Rob Herring , Mark Rutland , Kuninori Morimoto , , , , , Subject: [PATCH v2 08/10] arm64: dts: renesas: salvator: add a connection from adv748x codec (HDMI input) to the R-Car SoC Message-ID: Mail-Followup-To: Alex Riesen , Kieran Bingham , Geert Uytterhoeven , Mauro Carvalho Chehab , Hans Verkuil , Laurent Pinchart , Rob Herring , Mark Rutland , Kuninori Morimoto , devel@driverdev.osuosl.org, linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, linux-renesas-soc@vger.kernel.org References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-Originating-IP: [10.8.5.41] X-ClientProxiedBy: PFWSEXCHANGE.corp.cetitec.com (10.10.1.99) To PFWSEXCHANGE.corp.cetitec.com (10.10.1.99) X-EsetResult: clean, is OK X-EsetId: 37303A290D7F536A6D7764 X-Provags-ID: V03:K1:XJbSRnjYuxMtlO6imjrZX1lYowXoRvYp+PK3mrt81kxAHBBKy7G Pqvpp4UXf2krEQ9Pa/27X39cmpvMU0uvUe44ZYjOkvcGSCQSRy/UsYfB7wJvULE2fOwIM7f l9FCmlkrih6ECAu4kw/M0FMqdAosOjERI1P+MvdZTDaoQH6Z6jSPtIlbS+rp+unWi73IGPt BleGPVkbJzw+yO/YgP28A== X-UI-Out-Filterresults: notjunk:1; V03:K0:91jPj1M1HMg=:d1acMogTH//MkPhXpnnqkQ ZyQ7Dw5LqEvugdzIiiMMP4126NwK3OTovMBcKa3VPVYvvNJAVR6XVj13Ww3L+OybkhnFmHhey KFZkQiwfFLjtTXOTqMsXpNTb6E3r8F+srNdinvdpxz64itFczXqaPoYjj5CPDKvu2ZFvaaG/j 1F2WKS2Y8oYMZQJCxH1uDNuo/kJ2SRZFfnJueZLgCDsZx1anTWFpeneeMl+fG0k50urKl6Wkg Ye7mN1eJBAT06ayh+6s4SJINk01FPT9GAU+8Y/0/bmKJDUByBW+bws96eEfq+GRbZQVgOtzNv DhzVvm+rz8V5S8XBDF2BLJyURp7snyMteYm15uxez43oUz7qjUpxCjX+8JLPvTIZ5lfaUc3zI HMzwKDp7VGUfEWc9BjmyvxdF7hzpvkXQVsggTp9O/nEtijYGxL4jEkPwVV4pMcjdbLRIgGjZC QZzaTHBk7lBkOZb30ujh0NLh6k06Ux6n9v+rJW+kSDPRHjAl3+GauBVxw0uURCDdKzOk5J26M UD8GJ3xW/2XLXG55oNfzCOL52oWgXZfnNjBo2xzDzm6xwMoO1crjXDjVF+buTiFZRbV+ss7VP I3Lb5c3gSv2YF3QO02q4UCmCZjTWUzgZBVTA8hznVOCy0ku41wYJdTSt7mzUn/J99mjdcAK6K 0I5S0eaSCg3WOgk5MNDE6asNgv7BU+8RDlcf+cncJXIkhsjrc4OaWSXJSxsFPxcm8n4IPSU38 iGV8+SIaoP7WeUPpojZqiS4AgI11xf/DF2VkP61ddjzq6QGNZ/leFmA01zRqlUGu58FhZlzrx Lua3CFP3iNts/OM7k3tLxOJUHGc0qSNnQRZKwsaBrWY7YmOxBdYvY+6wZ1A0VoKFo18PAL6 Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org As all known variants of the Salvator board have the HDMI decoder chip (the ADV7482) connected to the SSI4 on R-Car SoC, the ADV7482 endpoint and the connection definitions are placed in the common board file. For the same reason, the CLK_C clock line and I2C configuration (similar to the ak4613, on the same interface) are added into the common file. Signed-off-by: Alexander Riesen Reviewed-by: Geert Uytterhoeven --- v2: Also add ssi4_ctrl pin group in the sound pins. The pins are responsible for SCK4 (sample clock) WS4 and (word boundary input), and are required for SSI audio input over I2S. Suggested-by: Geert Uytterhoeven The adv748x shall provide its own implementation of the output clock (MCLK), connected to the audio_clk_c line of the R-Car SoC. If the frequency of the ADV748x MCLK were fixed, the clock implementation were not necessary, but it does not seem so: the MCLK depends on the value in a speed multiplier register and the input sample rate (48kHz). Suggested-by: Geert Uytterhoeven Remove audio clock C from the clocks of adv7482. The clocks property of the video-receiver node lists the input clocks of the device, which is quite the opposite from the original intention: the adv7482 on Salvator X boards is a provide of the MCLK clock for I2S audio output. Suggested-by: Geert Uytterhoeven Remove old definition of &sound_card.dais and reduce size of changes in the Salvator-X specific device tree source. Declare video-receiver a clock producer, as the adv748x driver implements the master clock used I2S audio output. Suggested-by: Geert Uytterhoeven The driver provides only MCLK clock, not the SCLK and LRCLK, which are part of the I2S protocol. Reviewed-by: Laurent Pinchart --- .../boot/dts/renesas/r8a77950-salvator-x.dts | 3 +- .../boot/dts/renesas/salvator-common.dtsi | 47 +++++++++++++++++-- 2 files changed, 44 insertions(+), 6 deletions(-) diff --git a/arch/arm64/boot/dts/renesas/r8a77950-salvator-x.dts b/arch/arm64/boot/dts/renesas/r8a77950-salvator-x.dts index 2438825c9b22..e16c146808b6 100644 --- a/arch/arm64/boot/dts/renesas/r8a77950-salvator-x.dts +++ b/arch/arm64/boot/dts/renesas/r8a77950-salvator-x.dts @@ -146,7 +146,8 @@ &sata { &sound_card { dais = <&rsnd_port0 /* ak4613 */ &rsnd_port1 /* HDMI0 */ - &rsnd_port2>; /* HDMI1 */ + &rsnd_port2 /* HDMI1 */ + &rsnd_port3>; /* adv7482 hdmi-in */ }; &usb2_phy2 { diff --git a/arch/arm64/boot/dts/renesas/salvator-common.dtsi b/arch/arm64/boot/dts/renesas/salvator-common.dtsi index 98bbcafc8c0d..ead7f8d7a929 100644 --- a/arch/arm64/boot/dts/renesas/salvator-common.dtsi +++ b/arch/arm64/boot/dts/renesas/salvator-common.dtsi @@ -460,7 +460,7 @@ pca9654: gpio@20 { #gpio-cells = <2>; }; - video-receiver@70 { + adv7482_hdmi_in: video-receiver@70 { compatible = "adi,adv7482"; reg = <0x70 0x71 0x72 0x73 0x74 0x75 0x60 0x61 0x62 0x63 0x64 0x65>; @@ -469,6 +469,7 @@ video-receiver@70 { #address-cells = <1>; #size-cells = <0>; + #clock-cells = <0>; /* the MCLK for I2S output */ interrupt-parent = <&gpio6>; interrupt-names = "intrq1", "intrq2"; @@ -510,6 +511,15 @@ adv7482_txb: endpoint { remote-endpoint = <&csi20_in>; }; }; + + port@c { + reg = <12>; + + adv7482_i2s: endpoint { + remote-endpoint = <&rsnd_endpoint3>; + system-clock-direction-out; + }; + }; }; csa_vdd: adc@7c { @@ -684,7 +694,8 @@ sdhi3_pins_uhs: sd3_uhs { }; sound_pins: sound { - groups = "ssi01239_ctrl", "ssi0_data", "ssi1_data_a"; + groups = "ssi01239_ctrl", "ssi0_data", "ssi1_data_a", + "ssi4_data", "ssi4_ctrl"; function = "ssi"; }; @@ -733,8 +744,8 @@ &rcar_sound { pinctrl-0 = <&sound_pins &sound_clk_pins>; pinctrl-names = "default"; - /* Single DAI */ - #sound-dai-cells = <0>; + /* multi DAI */ + #sound-dai-cells = <1>; /* audio_clkout0/1/2/3 */ #clock-cells = <1>; @@ -758,8 +769,19 @@ &rcar_sound { <&cpg CPG_MOD 1020>, <&cpg CPG_MOD 1021>, <&cpg CPG_MOD 1019>, <&cpg CPG_MOD 1018>, <&audio_clk_a>, <&cs2000>, - <&audio_clk_c>, + <&adv7482_hdmi_in>, <&cpg CPG_CORE CPG_AUDIO_CLK_I>; + clock-names = "ssi-all", + "ssi.9", "ssi.8", "ssi.7", "ssi.6", + "ssi.5", "ssi.4", "ssi.3", "ssi.2", + "ssi.1", "ssi.0", + "src.9", "src.8", "src.7", "src.6", + "src.5", "src.4", "src.3", "src.2", + "src.1", "src.0", + "mix.1", "mix.0", + "ctu.1", "ctu.0", + "dvc.0", "dvc.1", + "clk_a", "clk_b", "clk_c", "clk_i"; ports { #address-cells = <1>; @@ -777,6 +799,21 @@ rsnd_endpoint0: endpoint { capture = <&ssi1 &src1 &dvc1>; }; }; + rsnd_port3: port@3 { + reg = <3>; + rsnd_endpoint3: endpoint { + remote-endpoint = <&adv7482_i2s>; + + dai-tdm-slot-num = <8>; + dai-tdm-slot-width = <32>; + dai-format = "left_j"; + mclk-fs = <256>; + bitclock-master = <&adv7482_i2s>; + frame-master = <&adv7482_i2s>; + + capture = <&ssi4>; + }; + }; }; }; From patchwork Thu Mar 19 17:43:09 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alex Riesen X-Patchwork-Id: 210523 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id C2BCEC4332E for ; Thu, 19 Mar 2020 17:43:26 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id A372A2071C for ; Thu, 19 Mar 2020 17:43:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728747AbgCSRnZ (ORCPT ); Thu, 19 Mar 2020 13:43:25 -0400 Received: from mout.kundenserver.de ([217.72.192.75]:38713 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727253AbgCSRnY (ORCPT ); Thu, 19 Mar 2020 13:43:24 -0400 Received: from mail.cetitecgmbh.com ([87.190.42.90]) by mrelayeu.kundenserver.de (mreue108 [212.227.15.183]) with ESMTPSA (Nemesis) id 1MK3a4-1j0Btp0v5q-00LWgz; Thu, 19 Mar 2020 18:43:11 +0100 Received: from pflvmailgateway.corp.cetitec.com (unknown [127.0.0.1]) by mail.cetitecgmbh.com (Postfix) with ESMTP id 9CA6865021B; Thu, 19 Mar 2020 17:43:10 +0000 (UTC) X-Virus-Scanned: amavisd-new at cetitec.com Received: from mail.cetitecgmbh.com ([127.0.0.1]) by pflvmailgateway.corp.cetitec.com (pflvmailgateway.corp.cetitec.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id p8hR5X3iJEyc; Thu, 19 Mar 2020 18:43:10 +0100 (CET) Received: from pfwsexchange.corp.cetitec.com (unknown [10.10.1.99]) by mail.cetitecgmbh.com (Postfix) with ESMTPS id 4936364FD07; Thu, 19 Mar 2020 18:43:10 +0100 (CET) Received: from pflmari.corp.cetitec.com (10.8.5.52) by PFWSEXCHANGE.corp.cetitec.com (10.10.1.99) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Thu, 19 Mar 2020 18:43:10 +0100 Received: by pflmari.corp.cetitec.com (Postfix, from userid 1000) id A7F9A8051E; Thu, 19 Mar 2020 18:43:09 +0100 (CET) Date: Thu, 19 Mar 2020 18:43:09 +0100 From: Alex Riesen To: Kieran Bingham CC: Geert Uytterhoeven , Mauro Carvalho Chehab , Hans Verkuil , "Laurent Pinchart" , Rob Herring , Mark Rutland , Kuninori Morimoto , , , , , Subject: [PATCH v2 10/10] media: adv748x: allow the HDMI sub-device to accept EDID Message-ID: Mail-Followup-To: Alex Riesen , Kieran Bingham , Geert Uytterhoeven , Mauro Carvalho Chehab , Hans Verkuil , Laurent Pinchart , Rob Herring , Mark Rutland , Kuninori Morimoto , devel@driverdev.osuosl.org, linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, linux-renesas-soc@vger.kernel.org References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-Originating-IP: [10.8.5.52] X-ClientProxiedBy: PFWSEXCHANGE.corp.cetitec.com (10.10.1.99) To PFWSEXCHANGE.corp.cetitec.com (10.10.1.99) X-EsetResult: clean, is OK X-EsetId: 37303A290D7F536A6D7762 X-Provags-ID: V03:K1:vr4OYoDjE9YrB9RjEXN80k6NQqQMP6ayMOLmGmMd2czOi/8NORG QhXwNDMbeIpUTsh/cqAfcVH0MtX10uqhqfYv0usEthLSrClXXxwHR+aCYFrK7iFxY9ruW2l uUyeC8j99rXpyqcCQ52/fHkY2UxVaXlZQoBCEb86BkAkAjUYmFROO0mVBjHpb2ZIkAWmyc1 hGIstBqGANg/b7AdL6aBA== X-UI-Out-Filterresults: notjunk:1; V03:K0:I28fkQ/FN/M=:g6yKcXLfdT0TQAiIY/F69V TCD6zrM0+g8dkqtcjye84MGHpt+HuF6B9iAzayBA3QUmQNXPxAhE4CdTUK3DMRiBIrXTzoyJL Lyt30EXhRkOn1U+VsMYj8DR+kUNxX0C3rKl0uYMMmDttuGkBoVQkgvX4KC5ax4PKhktClS7qo Vknpv4q7kUPOhwlvnKlHyAlLrJoFh4XRzPvsXbGt9bWCwjE5Yg4ea655A3ZyUEbd0kfvQCcNP vdmfrrWVZ04iEQ9Rl5Qo951OdGm5qiHufch0UYEr1MnJ+mtu+pcTLZ4bruDd14CwDauP/cPL2 8fsbYrCbSYsm4YDH25ZokuJA0prJ0QuDQ0v98utyDgMAmHQADkA5DYKeq68qBUJqpzvQ1YRRv IDU3sTlU4ltw0F+g3guBogtpYv95AbbmZO2TeehI9WPYdAIoSm30UNUQryCZHz3LieyGo9w4W KU80AWvHo7vwv2pCQrqitJkEPsPla2v6Y6fTRbqSu4aeFJ/FTeN/ciVvSG0pYfLFZaGnL9VvY YteXeZpahCIaId2bLNg4XH8DHGGlf0fXWHkpbPGjsKx6m5g/RE4d+pObXlzvpEwbcxh+Tg6PD tomKb6bJVZ7HeKzwkIX1Bod2/gaXLfIOHKTDxAmTK3eW9ggPb7tGa2iPwniLrYWV+zK9C47qa PqLGhuMFlGUloJmyUa0UgqIolAooc7CUGow75XX9uKhzi6ObeVuUjLXnuknNAcFbK73+0ubcn XZcxOVmttSSKnlRDnSu3uVgDo71pvASEk/BgG9Pjo5F/lnA+MHAc/69sk4lp8z4xYZ3sQ/eTj 9uQYAGP8AAYBWV/3BYY5o0H0Mg59XBeYAkYKsjMJG4qtPL8o0atK3wvQe7aZTGULKuKiaLy Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org This makes it possible to load a EDID reported by the device with v4l2-ctl utility: vdev=/dev/$(grep -l '^adv748x.*hdmi$' /sys/class/video4linux/v4l-subdev*/name |cut -d/ -f5-5) v4l2-ctl -d $vdev --set-edid=pad=0,file=/etc/adv7482.edid Signed-off-by: Alexander Riesen --- drivers/media/i2c/adv748x/adv748x-hdmi.c | 27 ++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/drivers/media/i2c/adv748x/adv748x-hdmi.c b/drivers/media/i2c/adv748x/adv748x-hdmi.c index 7655d817ceb6..88e309de3d56 100644 --- a/drivers/media/i2c/adv748x/adv748x-hdmi.c +++ b/drivers/media/i2c/adv748x/adv748x-hdmi.c @@ -775,7 +775,34 @@ static int adv748x_hdmi_log_status(struct v4l2_subdev *sd) return 0; } +static long adv748x_hdmi_querycap(struct adv748x_hdmi *hdmi, + struct v4l2_capability *cap) +{ + struct adv748x_state *state = adv748x_hdmi_to_state(hdmi); + + cap->version = LINUX_VERSION_CODE; + strlcpy(cap->driver, state->dev->driver->name, sizeof(cap->driver)); + strlcpy(cap->card, "hdmi", sizeof(cap->card)); + snprintf(cap->bus_info, sizeof(cap->bus_info), "i2c:%d-%04x", + i2c_adapter_id(state->client->adapter), + state->client->addr); + cap->device_caps = V4L2_CAP_AUDIO | V4L2_CAP_VIDEO_CAPTURE; + cap->capabilities = V4L2_CAP_DEVICE_CAPS; + return 0; +} + +static long adv748x_hdmi_ioctl(struct v4l2_subdev *sd, + unsigned int cmd, void *arg) +{ + struct adv748x_hdmi *hdmi = adv748x_sd_to_hdmi(sd); + + if (cmd == VIDIOC_QUERYCAP) + return adv748x_hdmi_querycap(hdmi, arg); + return -ENOTTY; +} + static const struct v4l2_subdev_core_ops adv748x_core_ops_hdmi = { + .ioctl = adv748x_hdmi_ioctl, .log_status = adv748x_hdmi_log_status, };