From patchwork Thu Jun 30 23:06:40 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Pinchart X-Patchwork-Id: 586233 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id B7D34C433EF for ; Thu, 30 Jun 2022 23:09:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231477AbiF3XJI (ORCPT ); Thu, 30 Jun 2022 19:09:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57144 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229767AbiF3XJG (ORCPT ); Thu, 30 Jun 2022 19:09:06 -0400 Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 616295924C for ; Thu, 30 Jun 2022 16:08:51 -0700 (PDT) Received: from pendragon.lan (62-78-145-57.bb.dnainternet.fi [62.78.145.57]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 6EA516BB; Fri, 1 Jul 2022 01:07:51 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1656630471; bh=SeOZyeZ1yTB675rmxIyXKFIUobXZfiQt61LX4lHqU30=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=qfv0p5gDwBFpgRAH8vmFHoIOtL97PScyhf26pbjL9H+ifmDPZYaDgl022Ayh1YF3c LBmj9S1ORdDb6mL5XwJMA8FJ60if9kVHzh7Ib99m0LIehbRKGv0zYisqvyFiFLjLf1 jHJIdq5qUPOjPrWO6vPYZYSEZGd6KRNbSIWNA0VM= From: Laurent Pinchart To: linux-media@vger.kernel.org Cc: linux-rockchip@lists.infradead.org, Dafna Hirschfeld , Heiko Stuebner , Helen Koike , Paul Elder Subject: [PATCH v2 22/55] media: rkisp1: csi: Rename CSI functions with a common rkisp1_csi prefix Date: Fri, 1 Jul 2022 02:06:40 +0300 Message-Id: <20220630230713.10580-23-laurent.pinchart@ideasonboard.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220630230713.10580-1-laurent.pinchart@ideasonboard.com> References: <20220630230713.10580-1-laurent.pinchart@ideasonboard.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org The CSI-related functions are not named consistently. Fix it by using a common rkisp1_csi prefix. Signed-off-by: Laurent Pinchart Reviewed-by: Dafna Hirschfeld --- .../platform/rockchip/rkisp1/rkisp1-common.h | 2 +- .../platform/rockchip/rkisp1/rkisp1-csi.c | 20 +++++++++---------- .../platform/rockchip/rkisp1/rkisp1-csi.h | 6 +++--- .../platform/rockchip/rkisp1/rkisp1-dev.c | 4 ++-- .../platform/rockchip/rkisp1/rkisp1-isp.c | 6 +++--- 5 files changed, 19 insertions(+), 19 deletions(-) diff --git a/drivers/media/platform/rockchip/rkisp1/rkisp1-common.h b/drivers/media/platform/rockchip/rkisp1/rkisp1-common.h index 4ba30f172c8b..d07c5c8e5b0d 100644 --- a/drivers/media/platform/rockchip/rkisp1/rkisp1-common.h +++ b/drivers/media/platform/rockchip/rkisp1/rkisp1-common.h @@ -541,7 +541,7 @@ void rkisp1_params_disable(struct rkisp1_params *params); /* irq handlers */ irqreturn_t rkisp1_isp_isr(int irq, void *ctx); -irqreturn_t rkisp1_mipi_isr(int irq, void *ctx); +irqreturn_t rkisp1_csi_isr(int irq, void *ctx); irqreturn_t rkisp1_capture_isr(int irq, void *ctx); void rkisp1_stats_isr(struct rkisp1_stats *stats, u32 isp_ris); void rkisp1_params_isr(struct rkisp1_device *rkisp1); diff --git a/drivers/media/platform/rockchip/rkisp1/rkisp1-csi.c b/drivers/media/platform/rockchip/rkisp1/rkisp1-csi.c index 25e1183cdbac..102deb877aa4 100644 --- a/drivers/media/platform/rockchip/rkisp1/rkisp1-csi.c +++ b/drivers/media/platform/rockchip/rkisp1/rkisp1-csi.c @@ -18,7 +18,7 @@ #include "rkisp1-common.h" #include "rkisp1-csi.h" -static int rkisp1_config_mipi(struct rkisp1_csi *csi) +static int rkisp1_csi_config(struct rkisp1_csi *csi) { struct rkisp1_device *rkisp1 = csi->rkisp1; const struct rkisp1_mbus_info *sink_fmt = rkisp1->isp.sink_fmt; @@ -69,7 +69,7 @@ static int rkisp1_config_mipi(struct rkisp1_csi *csi) return 0; } -void rkisp1_mipi_start(struct rkisp1_csi *csi) +static void rkisp1_csi_enable(struct rkisp1_csi *csi) { struct rkisp1_device *rkisp1 = csi->rkisp1; u32 val; @@ -79,7 +79,7 @@ void rkisp1_mipi_start(struct rkisp1_csi *csi) val | RKISP1_CIF_MIPI_CTRL_OUTPUT_ENA); } -void rkisp1_mipi_stop(struct rkisp1_csi *csi) +static void rkisp1_csi_disable(struct rkisp1_csi *csi) { struct rkisp1_device *rkisp1 = csi->rkisp1; u32 val; @@ -93,8 +93,8 @@ void rkisp1_mipi_stop(struct rkisp1_csi *csi) val & (~RKISP1_CIF_MIPI_CTRL_OUTPUT_ENA)); } -int rkisp1_mipi_csi2_start(struct rkisp1_csi *csi, - struct rkisp1_sensor_async *sensor) +int rkisp1_csi_start(struct rkisp1_csi *csi, + struct rkisp1_sensor_async *sensor) { struct rkisp1_device *rkisp1 = csi->rkisp1; union phy_configure_opts opts; @@ -102,7 +102,7 @@ int rkisp1_mipi_csi2_start(struct rkisp1_csi *csi, s64 pixel_clock; int ret; - ret = rkisp1_config_mipi(csi); + ret = rkisp1_csi_config(csi); if (ret) return ret; @@ -119,19 +119,19 @@ int rkisp1_mipi_csi2_start(struct rkisp1_csi *csi, phy_configure(csi->dphy, &opts); phy_power_on(csi->dphy); - rkisp1_mipi_start(csi); + rkisp1_csi_enable(csi); return 0; } -void rkisp1_mipi_csi2_stop(struct rkisp1_csi *csi) +void rkisp1_csi_stop(struct rkisp1_csi *csi) { - rkisp1_mipi_stop(csi); + rkisp1_csi_disable(csi); phy_power_off(csi->dphy); } -irqreturn_t rkisp1_mipi_isr(int irq, void *ctx) +irqreturn_t rkisp1_csi_isr(int irq, void *ctx) { struct device *dev = ctx; struct rkisp1_device *rkisp1 = dev_get_drvdata(dev); diff --git a/drivers/media/platform/rockchip/rkisp1/rkisp1-csi.h b/drivers/media/platform/rockchip/rkisp1/rkisp1-csi.h index 1f921d534865..7d3f01cfb49f 100644 --- a/drivers/media/platform/rockchip/rkisp1/rkisp1-csi.h +++ b/drivers/media/platform/rockchip/rkisp1/rkisp1-csi.h @@ -17,8 +17,8 @@ struct rkisp1_sensor_async; int rkisp1_csi_init(struct rkisp1_device *rkisp1); void rkisp1_csi_cleanup(struct rkisp1_device *rkisp1); -int rkisp1_mipi_csi2_start(struct rkisp1_csi *csi, - struct rkisp1_sensor_async *sensor); -void rkisp1_mipi_csi2_stop(struct rkisp1_csi *csi); +int rkisp1_csi_start(struct rkisp1_csi *csi, + struct rkisp1_sensor_async *sensor); +void rkisp1_csi_stop(struct rkisp1_csi *csi); #endif /* _RKISP1_CSI_H */ diff --git a/drivers/media/platform/rockchip/rkisp1/rkisp1-dev.c b/drivers/media/platform/rockchip/rkisp1/rkisp1-dev.c index 2afaa9f26f29..2c441665c017 100644 --- a/drivers/media/platform/rockchip/rkisp1/rkisp1-dev.c +++ b/drivers/media/platform/rockchip/rkisp1/rkisp1-dev.c @@ -383,7 +383,7 @@ static irqreturn_t rkisp1_isr(int irq, void *ctx) */ rkisp1_capture_isr(irq, ctx); rkisp1_isp_isr(irq, ctx); - rkisp1_mipi_isr(irq, ctx); + rkisp1_csi_isr(irq, ctx); return IRQ_HANDLED; } @@ -398,7 +398,7 @@ static const char * const px30_isp_clks[] = { static const struct rkisp1_isr_data px30_isp_isrs[] = { { "isp", rkisp1_isp_isr }, { "mi", rkisp1_capture_isr }, - { "mipi", rkisp1_mipi_isr }, + { "mipi", rkisp1_csi_isr }, }; static const struct rkisp1_info px30_isp_info = { diff --git a/drivers/media/platform/rockchip/rkisp1/rkisp1-isp.c b/drivers/media/platform/rockchip/rkisp1/rkisp1-isp.c index f477368dcec9..d2343f166f42 100644 --- a/drivers/media/platform/rockchip/rkisp1/rkisp1-isp.c +++ b/drivers/media/platform/rockchip/rkisp1/rkisp1-isp.c @@ -763,7 +763,7 @@ static int rkisp1_isp_s_stream(struct v4l2_subdev *sd, int enable) v4l2_subdev_call(rkisp1->active_sensor->sd, video, s_stream, false); - rkisp1_mipi_csi2_stop(&rkisp1->csi); + rkisp1_csi_stop(&rkisp1->csi); rkisp1_isp_stop(rkisp1); return 0; @@ -789,7 +789,7 @@ static int rkisp1_isp_s_stream(struct v4l2_subdev *sd, int enable) rkisp1_isp_start(rkisp1); - ret = rkisp1_mipi_csi2_start(&rkisp1->csi, rkisp1->active_sensor); + ret = rkisp1_csi_start(&rkisp1->csi, rkisp1->active_sensor); if (ret) { rkisp1_isp_stop(rkisp1); goto mutex_unlock; @@ -799,7 +799,7 @@ static int rkisp1_isp_s_stream(struct v4l2_subdev *sd, int enable) true); if (ret) { rkisp1_isp_stop(rkisp1); - rkisp1_mipi_csi2_stop(&rkisp1->csi); + rkisp1_csi_stop(&rkisp1->csi); goto mutex_unlock; }