Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp26292854rwd; Mon, 3 Jul 2023 07:51:50 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6AJmeVWOo1cDVe/7VcD61IXY61peZbN1KgCnwTekd2J72uYMUXmg0wfG010Z1RWuuaVxY1 X-Received: by 2002:a05:6870:968e:b0:1b0:897d:1817 with SMTP id o14-20020a056870968e00b001b0897d1817mr12284890oaq.14.1688395910436; Mon, 03 Jul 2023 07:51:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1688395910; cv=none; d=google.com; s=arc-20160816; b=X2894RUZ6PqdB2CciLAKMlY4BHp+6D5gDcsf94V1wwRgCbO0PEHqw5VUdypxSnCXRu Ok4VwA0dtFnuYaUX+FlWqA4HhfkcgWL2zHL/xUP3IqQFuAQn15MOFrJefzih07EigeAe EsfSDgEHSjv72nfiHLbd3Al+CTK/q2rX5NqXvsQXy4NhEillRjtWvPUlWbPIp2wIi+Jr qOQ5L0AOdpDM8kCqnO6IyytZJajgnJmGBEW8VUZqERitF0neCXUszybxaNx5oyx+XmUe SMgp74RwlRsJ3g5uVXZ6M3mprn5LunQWcN70A2k1aoLQOPZsMS6OEoAhL/9Da4YM1sdT BZ+Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=taLhzh9xqczMLKrrFJhQ6fcMWC0Yx1MJpconr98cKwQ=; fh=V63XJ9BtxPFWswGINufr7A91AX4CHOnR9MZmix82EZs=; b=yujEsuMhH8PqgReQKfEvbYEGg4Edzi+Jb9uqHi9BqpdbsR7k9QLlaUXuEMSwpipI5p uKo5dQAHJViSRr8rQih88GbSuWku28Wv7A9Kx1n2ldiPcqI4l6g3+YbYDrZ9Kv5cUblT Bky3qxAGI42agTrg3XADBVj27D/CDETwPLK71Q/o++PG8Ek7rMNuLAoRhG1KymTmVtGN QZT1Ec48s8F4kGgAeDV4lzMk9v7fm3tgULI9x1VEsVMwI9C/NPrxDGEbvuEYAjn5Rl7d Q3CzlKSvzMcxcNCVDe6W3lzMbct6aECBXEDw9s/92ESIvCGcBc8ZRiN17iMu1lkkECzO J5uQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="mBEp3Y+/"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id t20-20020a17090ae51400b00262fc69ada3si14591398pjy.36.2023.07.03.07.51.37; Mon, 03 Jul 2023 07:51:50 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="mBEp3Y+/"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230338AbjGCOrf (ORCPT + 99 others); Mon, 3 Jul 2023 10:47:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35090 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229454AbjGCOre (ORCPT ); Mon, 3 Jul 2023 10:47:34 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4DB3810F9; Mon, 3 Jul 2023 07:47:13 -0700 (PDT) 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 0525060F59; 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-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.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 interface. > > > > > > 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-camera.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 = { > > > .fmt.pix.sizeimage = 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_device *pdev) > > > &camera_instance); > > > ret = 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_device *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 = gdev[0]->instance; > > > @@ -1988,17 +1989,16 @@ static void bcm2835_mmal_remove(struct platform_device *pdev) > > > vchiq_mmal_finalise(instance); > > > } > > > -static struct platform_driver bcm2835_camera_driver = { > > > +static struct vchiq_driver bcm2835_camera_driver = { > > > .probe = bcm2835_mmal_probe, > > > - .remove_new = bcm2835_mmal_remove, > > > + .remove = bcm2835_mmal_remove, > > No need to change this here, right? That's independant of this patch > > series. > > Why not ? > > Should I have "remove_new()"? in the struct vchiq_driver {..} [Patch 1/5] > instead of "remove()"? -? match up with platform_driver virtual interface ? Ah, sorry, my fault, I thought this was just a platform driver change. This is fine. greg k-h