From patchwork Fri May 31 17:45:04 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabio Estevam X-Patchwork-Id: 10970611 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 0A54416C1 for ; Fri, 31 May 2019 17:45:20 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id F079528CF4 for ; Fri, 31 May 2019 17:45:19 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E4F4228CFA; Fri, 31 May 2019 17:45:19 +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=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8949728CF7 for ; Fri, 31 May 2019 17:45:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726683AbfEaRpP (ORCPT ); Fri, 31 May 2019 13:45:15 -0400 Received: from mail-qt1-f193.google.com ([209.85.160.193]:42323 "EHLO mail-qt1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726653AbfEaRpP (ORCPT ); Fri, 31 May 2019 13:45:15 -0400 Received: by mail-qt1-f193.google.com with SMTP id s15so1856234qtk.9 for ; Fri, 31 May 2019 10:45:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=0Qc1wtJ+AlHNFdrr6IvW8ZlhIQFw6oUtBH71ZGMG3xM=; b=LbxeMG8Io47BqV+w6NoB0QQyQNQRkwSYlrmB5ZLgIytxzIX4zAUxmL5wSMX3vkwRns 4ges2rpfEppiP/kfy5rfv2iBzxvmf1hyYQjDP4viwxWl5vHqFTN6c1j9VBy6VG1XtwGm EXVOJCeFqHg1zPF0cueOxSN+q6pqCWoSkMwyVDWHgZzoDqpKK1Z2U4+nxrfvEALKcnAN A52kyn29scJNKSJv3OJpFh25IimlGeW7ra+GhVdsmo1E6GcjuZCwQ9foawudgCn9AsZ9 O9/wrBXCMXkODqefLt9wuzUV0xKbEzYrpfrtWBokNADtD2PPubj/JvWFf+ziNEOSG6Q+ I0Yw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=0Qc1wtJ+AlHNFdrr6IvW8ZlhIQFw6oUtBH71ZGMG3xM=; b=qWgx15XYWCGoGo5zAzOQ7jUMkkLZ5QVlhXd9OtVoRpZyOWSIxk0C18Phab5ZqoutOK IPM0r6SQdBV2oH/87Z3CnuQh76HabRs2WSDGWgOQ34YfifNtBdEY/ZBk9mKDL6TXCSqM ExTaay2cWx0uQHUkTidA2pCPSeAHrdqirsIKRdPdbosY2CKOLc41C5EwDK4H29v/niBS ducd0JW72knyGBfXHtispuMb1dxB+ad3fqZUKFCRxr4GJHN6NAN2fUvwNionRW+/d0wN /66XI+smizdC/jcQ0fpSD67/g7kSxnCPVlr5eJRPtuMyUJgm8g7pIDvezz0oX0l0vDbK esXA== X-Gm-Message-State: APjAAAWwgFdLJKv/byewMZw3HGEaAN9yInPOGGvP9AbANeeAi6EFwR8C 5rxyneWyfRWFbcW++mc4nfw= X-Google-Smtp-Source: APXvYqxMZPOVNbNzB2zUcrBrywxZ58Sd3aqgoomkw7zQ7j5pbce1yBivJm1/VDNe2LGOHGlPfq3cGw== X-Received: by 2002:a0c:b09a:: with SMTP id o26mr10068802qvc.68.1559324714259; Fri, 31 May 2019 10:45:14 -0700 (PDT) Received: from localhost.localdomain ([2804:14c:482:3c8:56cb:1049:60d2:137b]) by smtp.gmail.com with ESMTPSA id f129sm3184879qkj.47.2019.05.31.10.45.10 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 31 May 2019 10:45:13 -0700 (PDT) From: Fabio Estevam To: hverkuil-cisco@xs4all.nl Cc: rmfrfs@gmail.com, p.zabel@pengutronix.de, slongerbeam@gmail.com, linux-media@vger.kernel.org, Fabio Estevam Subject: [PATCH 1/3] media: imx7-mipi-csis: Propagate the error if clock enabling fails Date: Fri, 31 May 2019 14:45:04 -0300 Message-Id: <20190531174506.13251-1-festevam@gmail.com> X-Mailer: git-send-email 2.17.1 Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Currently the return value from clk_bulk_prepare_enable() is checked, but it is not propagate it in the case of failure. Fix it and also move the error message to the caller of mipi_csis_clk_enable(). Signed-off-by: Fabio Estevam Reviewed-by: Rui Miguel Silva --- drivers/staging/media/imx/imx7-mipi-csis.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/drivers/staging/media/imx/imx7-mipi-csis.c b/drivers/staging/media/imx/imx7-mipi-csis.c index 042837b8ea28..1b538ae77364 100644 --- a/drivers/staging/media/imx/imx7-mipi-csis.c +++ b/drivers/staging/media/imx/imx7-mipi-csis.c @@ -456,13 +456,9 @@ static void mipi_csis_set_params(struct csi_state *state) MIPI_CSIS_CMN_CTRL_UPDATE_SHADOW_CTRL); } -static void mipi_csis_clk_enable(struct csi_state *state) +static int mipi_csis_clk_enable(struct csi_state *state) { - int ret; - - ret = clk_bulk_prepare_enable(state->num_clks, state->clks); - if (ret < 0) - dev_err(state->dev, "failed to enable clocks\n"); + return clk_bulk_prepare_enable(state->num_clks, state->clks); } static void mipi_csis_clk_disable(struct csi_state *state) @@ -989,7 +985,11 @@ static int mipi_csis_probe(struct platform_device *pdev) if (ret < 0) return ret; - mipi_csis_clk_enable(state); + ret = mipi_csis_clk_enable(state); + if (ret < 0) { + dev_err(state->dev, "failed to enable clocks: %d\n", ret); + return ret; + } ret = devm_request_irq(dev, state->irq, mipi_csis_irq_handler, 0, dev_name(dev), state); From patchwork Fri May 31 17:45:05 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabio Estevam X-Patchwork-Id: 10970613 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 F09A51398 for ; Fri, 31 May 2019 17:45:23 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E265D28CF4 for ; Fri, 31 May 2019 17:45:23 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D665128CF9; Fri, 31 May 2019 17:45:23 +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=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8118D28CF4 for ; Fri, 31 May 2019 17:45:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726807AbfEaRpT (ORCPT ); Fri, 31 May 2019 13:45:19 -0400 Received: from mail-qt1-f195.google.com ([209.85.160.195]:43877 "EHLO mail-qt1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726674AbfEaRpT (ORCPT ); Fri, 31 May 2019 13:45:19 -0400 Received: by mail-qt1-f195.google.com with SMTP id z24so1847202qtj.10 for ; Fri, 31 May 2019 10:45:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=KxRT6szwafUKmLjNrTvi5HJlhOBD/5MSNwHOifE/5ok=; b=C9BUFRKTAh1Ik+QXKq145KnsG253zvakYY0f7Katr837GX1zJtzB2aZZUzpCg0USLP o/5AVOMsG65SzljVlYG8POK3zr+H61wLLDXWYZ8Sc0Q4l5oBl7klj6jseJHzQ1Vf92vD 4bQn4t4Au4S9rLAJzICJTTo0V32AP4las0ruNXOlCwMneigi1z7n+Lx8Yxl937WjyTA3 fHytHXQJef+xeHhI0iYuQkB6wtNSddkCss0N6YI5gIc2lFN6+u85JIF6jqL1jcpRdXKu J9zdb3/lBSaRNX0NeeQRV37pA5vBR6+c6JpbHqHJH927pHlyBdD/lGiZ/ypbuJrYI5gg GrCA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=KxRT6szwafUKmLjNrTvi5HJlhOBD/5MSNwHOifE/5ok=; b=pxlAShYd+Cy2diTMZXr0AHF3bsdFyzyme77h+z4A4jJupq4EyQ6Ggq4jRKXAaYVtqu HOWiJLxYN/vM0vOx9dZBQh8skC7vkDtzHKrRV72kkS7t0RYWSEgqRUrsFAb/zvSrft1W EGU3f2sYxjqaQHXmlKZKEPjwP31GAv8dPnXjVQaxeqCeUko59Uq5mEAG1clIXVsmiiZM zrnsSF6W4zoYAf8rnCYJtJiexTomrar3aT87K5Z59KZNn3vAc6lY/n93wbjA+qogEtY6 zdHa7Mlzu7ICIA0Ecm1cO0NEffi+qT2OdwFAoDDpXDBDVq3+QVU9m6HnMdf6V/Cvd7dk F7Gw== X-Gm-Message-State: APjAAAX+x0ra1k5rkMCfUCh3ocdYBOSRxDEkQihIdvTZktX3hHMcNifQ WCFV/MqPTirmfpQ4cVA+WJI= X-Google-Smtp-Source: APXvYqwltfgPETgj0JMosaudLiMKX8GoxK7qNpNbXWJvQidRpInxxhyD26nYHt0cP2o+i3jOXlpGjA== X-Received: by 2002:ac8:5315:: with SMTP id t21mr593017qtn.229.1559324718548; Fri, 31 May 2019 10:45:18 -0700 (PDT) Received: from localhost.localdomain ([2804:14c:482:3c8:56cb:1049:60d2:137b]) by smtp.gmail.com with ESMTPSA id f129sm3184879qkj.47.2019.05.31.10.45.14 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 31 May 2019 10:45:17 -0700 (PDT) From: Fabio Estevam To: hverkuil-cisco@xs4all.nl Cc: rmfrfs@gmail.com, p.zabel@pengutronix.de, slongerbeam@gmail.com, linux-media@vger.kernel.org, Fabio Estevam Subject: [PATCH 2/3] media: imx7-mipi-csis: Remove unneeded 'ret' initialization Date: Fri, 31 May 2019 14:45:05 -0300 Message-Id: <20190531174506.13251-2-festevam@gmail.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190531174506.13251-1-festevam@gmail.com> References: <20190531174506.13251-1-festevam@gmail.com> Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP There is no need for initializing the 'ret' variable as it will be assigned at: ret = mipi_csis_parse_dt(pdev, state); Remove the unneeded initialization. Signed-off-by: Fabio Estevam --- drivers/staging/media/imx/imx7-mipi-csis.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/media/imx/imx7-mipi-csis.c b/drivers/staging/media/imx/imx7-mipi-csis.c index 1b538ae77364..acc9936dd075 100644 --- a/drivers/staging/media/imx/imx7-mipi-csis.c +++ b/drivers/staging/media/imx/imx7-mipi-csis.c @@ -950,7 +950,7 @@ static int mipi_csis_probe(struct platform_device *pdev) struct device *dev = &pdev->dev; struct resource *mem_res; struct csi_state *state; - int ret = -ENOMEM; + int ret; state = devm_kzalloc(dev, sizeof(*state), GFP_KERNEL); if (!state) From patchwork Fri May 31 17:45:06 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabio Estevam X-Patchwork-Id: 10970615 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 38EC71398 for ; Fri, 31 May 2019 17:45:25 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2A01A28CF7 for ; Fri, 31 May 2019 17:45:25 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1E6CC28CFD; Fri, 31 May 2019 17:45:25 +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=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C903328CFE for ; Fri, 31 May 2019 17:45:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726808AbfEaRpX (ORCPT ); Fri, 31 May 2019 13:45:23 -0400 Received: from mail-qk1-f193.google.com ([209.85.222.193]:34283 "EHLO mail-qk1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725934AbfEaRpX (ORCPT ); Fri, 31 May 2019 13:45:23 -0400 Received: by mail-qk1-f193.google.com with SMTP id t64so6847985qkh.1 for ; Fri, 31 May 2019 10:45:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=VB3zl1B/8/7HsGS2Ke7GXMR2Fdc2kY6m17qfQPTjjfc=; b=gj4f1V6q/TOzWP3gLLzhPxaYgkZXEb/dEQsU7QeVvAQYdjceLpPa+wc+KGEdep7sya Irw4fa2/SVXojwsbYrN1mF1WA1aXriNVpc3v0FYe/S2Fe8g3AyiDOGAqALtxyvIsH3h1 NZdxO3YQm1MdlsWLtfYN4iIKe43tX1cfWZcADAyWwtOiEKAPH3yegDLa4XjH2iU0a+jl s4Uz56pRYe5BHfxjFmufpxhyDMJVSBZFfIpQFydZtD1jQz6pzBBFTb70W8f6U1lfn2y/ lAiVjDExiPTzwu5riDIxaH3qi04u+oXGJcjoNf2TYQ6C9Hdp7uyzn0awn+EjiWNAEHfy az7A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=VB3zl1B/8/7HsGS2Ke7GXMR2Fdc2kY6m17qfQPTjjfc=; b=IB01CppTdIf2JdJfqyH1MxQOdkK4ogOLHVAoov4UxbhqvaEo2XVuMEx992a9qbby4a neBBQF6q9ir2wKM0tEm6qeGY7LRPQV3O3bTB9sW/Dsw8HLYB3ZH6xUPlq6ybCGvxIpJS /8U9ckAMzZ64BpJ3lpKBaFhRDJDxg5yKuZDowdOC0d6MwTz5GYeEkF3OvktNuNt1/lAP K0AUFGJrp3n8iaFL//sxOmtR6ysjaB1zPhv6QwGAQTCBsU3PU8ATI6MoJhp3+G1Toao4 OVC45qCpQMV1v1o0jRQmHTD/Inrn+lcMzhHA+03p+hwNyn1q2GqPeJMPBuYKL5rCYVTE zuiA== X-Gm-Message-State: APjAAAU5OTk/PNlYpXGUGDNr+c5EGlY++JIQ631RwZP38pYlmRgE5R/U Bilv0ZUTazC7bs5Fj/uv8Um50aOi X-Google-Smtp-Source: APXvYqwlyPg1H+CGQceKbCE72kqety4amRHI47CA5Bzav+qcXap+fiXKRSKmmDX4WktBVr6NBttlLQ== X-Received: by 2002:a37:a643:: with SMTP id p64mr9748333qke.36.1559324722585; Fri, 31 May 2019 10:45:22 -0700 (PDT) Received: from localhost.localdomain ([2804:14c:482:3c8:56cb:1049:60d2:137b]) by smtp.gmail.com with ESMTPSA id f129sm3184879qkj.47.2019.05.31.10.45.18 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 31 May 2019 10:45:21 -0700 (PDT) From: Fabio Estevam To: hverkuil-cisco@xs4all.nl Cc: rmfrfs@gmail.com, p.zabel@pengutronix.de, slongerbeam@gmail.com, linux-media@vger.kernel.org, Fabio Estevam Subject: [PATCH 3/3] media: imx7-mipi-csis: Remove extra blank line Date: Fri, 31 May 2019 14:45:06 -0300 Message-Id: <20190531174506.13251-3-festevam@gmail.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190531174506.13251-1-festevam@gmail.com> References: <20190531174506.13251-1-festevam@gmail.com> Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Checkpatch reports an extra blank line, so remove such unneeded line. Signed-off-by: Fabio Estevam --- drivers/staging/media/imx/imx7-mipi-csis.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/staging/media/imx/imx7-mipi-csis.c b/drivers/staging/media/imx/imx7-mipi-csis.c index acc9936dd075..d1cdf011c8f1 100644 --- a/drivers/staging/media/imx/imx7-mipi-csis.c +++ b/drivers/staging/media/imx/imx7-mipi-csis.c @@ -902,7 +902,6 @@ static int mipi_csis_subdev_init(struct v4l2_subdev *mipi_sd, return ret; } - static int mipi_csis_dump_regs_show(struct seq_file *m, void *private) { struct csi_state *state = m->private;