Linux Media Controller development
 help / color / mirror / Atom feed
From: Ezequiel Garcia <ezequiel@collabora.com>
To: linux-media@vger.kernel.org, Hans Verkuil <hverkuil@xs4all.nl>
Cc: kernel@collabora.com, Arnd Bergmann <arnd@arndb.de>,
	Robert Jarzmik <robert.jarzmik@free.fr>,
	Petr Cvek <petrcvekcz@gmail.com>,
	Janusz Krzysztofik <jmkrzyszt@gmail.com>,
	Sakari Ailus <sakari.ailus@linux.intel.com>,
	Ezequiel Garcia <ezequiel@collabora.com>
Subject: [PATCH 2/6] media: pxa_camera: Drop the v4l2-clk clock register
Date: Mon,  4 Jan 2021 13:57:35 -0300	[thread overview]
Message-ID: <20210104165739.116404-3-ezequiel@collabora.com> (raw)
In-Reply-To: <20210104165739.116404-1-ezequiel@collabora.com>

Now that mach-based PXA platforms are registering proper
fixed-rate clocks through the CCF, the v4l2-clk clock
is no longer required.

Drop this clock, so the driver no longer depends on the
legacy v4l2-clk API.

Cc: Robert Jarzmik <robert.jarzmik@free.fr>
Signed-off-by: Ezequiel Garcia <ezequiel@collabora.com>
---
 drivers/media/platform/pxa_camera.c | 30 +----------------------------
 1 file changed, 1 insertion(+), 29 deletions(-)

diff --git a/drivers/media/platform/pxa_camera.c b/drivers/media/platform/pxa_camera.c
index b664ce7558a1..8cfa39108162 100644
--- a/drivers/media/platform/pxa_camera.c
+++ b/drivers/media/platform/pxa_camera.c
@@ -31,7 +31,6 @@
 #include <linux/dma/pxa-dma.h>
 
 #include <media/v4l2-async.h>
-#include <media/v4l2-clk.h>
 #include <media/v4l2-common.h>
 #include <media/v4l2-ctrls.h>
 #include <media/v4l2-device.h>
@@ -677,7 +676,6 @@ struct pxa_camera_dev {
 	unsigned long		ciclk;
 	unsigned long		mclk;
 	u32			mclk_divisor;
-	struct v4l2_clk		*mclk_clk;
 	u16			width_flags;	/* max 10 bits */
 
 	struct list_head	capture;
@@ -2030,9 +2028,6 @@ static const struct v4l2_ioctl_ops pxa_camera_ioctl_ops = {
 	.vidioc_unsubscribe_event	= v4l2_event_unsubscribe,
 };
 
-static const struct v4l2_clk_ops pxa_camera_mclk_ops = {
-};
-
 static const struct video_device pxa_camera_videodev_template = {
 	.name = "pxa-camera",
 	.minor = -1,
@@ -2140,11 +2135,6 @@ static void pxa_camera_sensor_unbind(struct v4l2_async_notifier *notifier,
 
 	pxa_camera_destroy_formats(pcdev);
 
-	if (pcdev->mclk_clk) {
-		v4l2_clk_unregister(pcdev->mclk_clk);
-		pcdev->mclk_clk = NULL;
-	}
-
 	video_unregister_device(&pcdev->vdev);
 	pcdev->sensor = NULL;
 
@@ -2278,7 +2268,6 @@ static int pxa_camera_probe(struct platform_device *pdev)
 		.src_maxburst = 8,
 		.direction = DMA_DEV_TO_MEM,
 	};
-	char clk_name[V4L2_CLK_NAME_SIZE];
 	int irq;
 	int err = 0, i;
 
@@ -2417,23 +2406,11 @@ static int pxa_camera_probe(struct platform_device *pdev)
 	if (err)
 		goto exit_notifier_cleanup;
 
-	v4l2_clk_name_i2c(clk_name, sizeof(clk_name),
-			  pcdev->asd.match.i2c.adapter_id,
-			  pcdev->asd.match.i2c.address);
-
-	pcdev->mclk_clk = v4l2_clk_register(&pxa_camera_mclk_ops, clk_name, NULL);
-	if (IS_ERR(pcdev->mclk_clk)) {
-		err = PTR_ERR(pcdev->mclk_clk);
-		goto exit_notifier_cleanup;
-	}
-
 	err = v4l2_async_notifier_register(&pcdev->v4l2_dev, &pcdev->notifier);
 	if (err)
-		goto exit_free_clk;
+		goto exit_notifier_cleanup;
 
 	return 0;
-exit_free_clk:
-	v4l2_clk_unregister(pcdev->mclk_clk);
 exit_notifier_cleanup:
 	v4l2_async_notifier_cleanup(&pcdev->notifier);
 exit_free_v4l2dev:
@@ -2463,11 +2440,6 @@ static int pxa_camera_remove(struct platform_device *pdev)
 	v4l2_async_notifier_unregister(&pcdev->notifier);
 	v4l2_async_notifier_cleanup(&pcdev->notifier);
 
-	if (pcdev->mclk_clk) {
-		v4l2_clk_unregister(pcdev->mclk_clk);
-		pcdev->mclk_clk = NULL;
-	}
-
 	v4l2_device_unregister(&pcdev->v4l2_dev);
 
 	dev_info(&pdev->dev, "PXA Camera driver unloaded\n");
-- 
2.29.2


  parent reply	other threads:[~2021-01-04 16:58 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-04 16:57 [PATCH 0/6] Remove last users of v4l2-clk and remove v4l2-clk Ezequiel Garcia
2021-01-04 16:57 ` [PATCH 1/6] media: mach-pxa: Register the camera sensor fixed-rate clock Ezequiel Garcia
2021-01-05 16:41   ` Petr Cvek
2021-01-06 15:53     ` Ezequiel Garcia
2021-01-08 11:02       ` Petr Cvek
2021-01-08 12:51         ` Ezequiel Garcia
2021-01-08 12:59   ` Arnd Bergmann
2021-01-04 16:57 ` Ezequiel Garcia [this message]
2021-01-04 16:57 ` [PATCH 3/6] media: ov9640: Use the generic clock framework Ezequiel Garcia
2021-01-05 16:18   ` Petr Cvek
2021-01-06 14:18     ` Ezequiel Garcia
2021-01-04 16:57 ` [PATCH 4/6] media: mt9m111: " Ezequiel Garcia
2021-01-04 16:57 ` [PATCH 5/6] media: ov6650: " Ezequiel Garcia
2021-01-08 11:42   ` Janusz Krzysztofik
2021-01-04 16:57 ` [PATCH 6/6] media: Remove the legacy v4l2-clk API Ezequiel Garcia
2021-01-04 20:51 ` [PATCH 0/6] Remove last users of v4l2-clk and remove v4l2-clk Ezequiel Garcia
2021-01-05 16:08 ` Petr Cvek
2021-01-06 14:24   ` Ezequiel Garcia
2021-01-08 11:04     ` Petr Cvek

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210104165739.116404-3-ezequiel@collabora.com \
    --to=ezequiel@collabora.com \
    --cc=arnd@arndb.de \
    --cc=hverkuil@xs4all.nl \
    --cc=jmkrzyszt@gmail.com \
    --cc=kernel@collabora.com \
    --cc=linux-media@vger.kernel.org \
    --cc=petrcvekcz@gmail.com \
    --cc=robert.jarzmik@free.fr \
    --cc=sakari.ailus@linux.intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox