From mboxrd@z Thu Jan 1 00:00:00 1970 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 6E77EEB64DC for ; Mon, 3 Jul 2023 14:47:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=x5NHXK71fzWo0eS9sI2+i4TERmHNipRKPE8Ys/RUun0=; b=ucTMgNblndL4xt eNkg3T2CxLhnDwfMemiJAqHpa+P5y9UaXXFhfDUa8oWNWRLuksC6Er7YicoZU4XzFFFTuSz6uzhSg K0ZacLFeuRNVqp0VH7+Y0NRNE6VMgh9xpKskxEIM8QDenSuRItt6uSZqbTXOwt/EHFo176rETis8L 7PraHWaEtv3705dHgj/5Ps7B5kv8GuOjx5Y4FlL8/bocj3KmKVhDXtKXv4EV8L5QbHi90MATpLBSK ZxMMu7X6SNA+VEWrxXPkGG5q3MqwGvWibhr08Y7BKgVhJXUfRVoZ3UcSrie10nibEwCU2u34SSrM9 kE6dlkdlPqwQsQiaFY7Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qGKpg-00AmjF-2q; Mon, 03 Jul 2023 14:47:16 +0000 Received: from dfw.source.kernel.org ([2604:1380:4641:c500::1]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qGKpd-00AmiF-0I; Mon, 03 Jul 2023 14:47:14 +0000 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 0834660F51; Mon, 3 Jul 2023 14:47:12 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id CB6A9C433C7; Mon, 3 Jul 2023 14:47:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1688395631; bh=0+HXRIje9Ard9diwM3PfMrFZZF9PNbX5EcSRVaV+SIc=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=mBEp3Y+/ivPwlfOe2N0+4Zc3M3+sctlgzv6KEosYsahzcLayVHqAiYVt/CPzLPuOK y7ydw10R8dsXPHWK3W7zszU/Qi2MeztWCLpgUVmx5kznDc9Fy1GruZzPCqL0HPDSHk kGMZ7SNrGylNEOlr9ZdDtcaVXYt5anIqlJNe+tRs= Date: Mon, 3 Jul 2023 16:46:25 +0200 From: Greg KH To: Umang Jain Cc: linux-staging@lists.linux.dev, linux-rpi-kernel@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, stefan.wahren@i2se.com, f.fainelli@gmail.com, athierry@redhat.com, error27@gmail.com, dave.stevenson@raspberrypi.com, kieran.bingham@ideasonboard.com, laurent.pinchart@ideasonboard.com Subject: Re: [PATCH v8 3/5] staging: bcm2835-camera: Register bcm2835-camera with vchiq_bus_type Message-ID: <2023070309-flashback-droplet-a938@gregkh> References: <20230627201628.207483-1-umang.jain@ideasonboard.com> <20230627201628.207483-4-umang.jain@ideasonboard.com> <2023070319-daycare-pointless-abba@gregkh> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230703_074713_228238_3D962780 X-CRM114-Status: GOOD ( 26.47 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Mon, Jul 03, 2023 at 04:44:39PM +0200, Umang Jain wrote: > Hi Greg, > = > On 7/3/23 3:29 PM, Greg KH wrote: > > On Tue, Jun 27, 2023 at 10:16:26PM +0200, Umang Jain wrote: > > > Register the bcm2835-camera with the vchiq_bus_type instead of using > > > platform driver/device. > > > = > > > Also the VCHIQ firmware doesn't support device enumeration, hence > > > one has to maintain a list of devices to be registered in the interfa= ce. > > > = > > > Signed-off-by: Umang Jain > > > --- > > > .../bcm2835-camera/bcm2835-camera.c | 16 +++++++------- > > > .../interface/vchiq_arm/vchiq_arm.c | 21 ++++++++++++++++= --- > > > 2 files changed, 26 insertions(+), 11 deletions(-) > > > = > > > diff --git a/drivers/staging/vc04_services/bcm2835-camera/bcm2835-cam= era.c b/drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.c > > > index 346d00df815a..f37b2a881d92 100644 > > > --- a/drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.c > > > +++ b/drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.c > > > @@ -24,8 +24,9 @@ > > > #include > > > #include > > > #include > > > -#include > > > +#include "../interface/vchiq_arm/vchiq_arm.h" > > > +#include "../interface/vchiq_arm/vchiq_device.h" > > > #include "../vchiq-mmal/mmal-common.h" > > > #include "../vchiq-mmal/mmal-encodings.h" > > > #include "../vchiq-mmal/mmal-vchiq.h" > > > @@ -1841,7 +1842,7 @@ static struct v4l2_format default_v4l2_format = =3D { > > > .fmt.pix.sizeimage =3D 1024 * 768, > > > }; > > > -static int bcm2835_mmal_probe(struct platform_device *pdev) > > > +static int bcm2835_mmal_probe(struct vchiq_device *device) > > > { > > > int ret; > > > struct bcm2835_mmal_dev *dev; > > > @@ -1896,7 +1897,7 @@ static int bcm2835_mmal_probe(struct platform_d= evice *pdev) > > > &camera_instance); > > > ret =3D v4l2_device_register(NULL, &dev->v4l2_dev); > > > if (ret) { > > > - dev_err(&pdev->dev, "%s: could not register V4L2 device: %d\n", > > > + dev_err(&device->dev, "%s: could not register V4L2 device: %d\n", > > > __func__, ret); > > > goto free_dev; > > > } > > > @@ -1976,7 +1977,7 @@ static int bcm2835_mmal_probe(struct platform_d= evice *pdev) > > > return ret; > > > } > > > -static void bcm2835_mmal_remove(struct platform_device *pdev) > > > +static void bcm2835_mmal_remove(struct vchiq_device *device) > > > { > > > int camera; > > > struct vchiq_mmal_instance *instance =3D gdev[0]->instance; > > > @@ -1988,17 +1989,16 @@ static void bcm2835_mmal_remove(struct platfo= rm_device *pdev) > > > vchiq_mmal_finalise(instance); > > > } > > > -static struct platform_driver bcm2835_camera_driver =3D { > > > +static struct vchiq_driver bcm2835_camera_driver =3D { > > > .probe =3D bcm2835_mmal_probe, > > > - .remove_new =3D bcm2835_mmal_remove, > > > + .remove =3D bcm2835_mmal_remove, > > No need to change this here, right? That's independant of this patch > > series. > = > Why not ? > = > Should I have "remove_new()"=A0 in the struct vchiq_driver {..} [Patch 1/= 5] > instead of "remove()"=A0 -=A0 match up with platform_driver virtual inter= face ? Ah, sorry, my fault, I thought this was just a platform driver change. This is fine. greg k-h _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel