Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp26292091rwd; Mon, 3 Jul 2023 07:51:07 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ740T1iA8/5IMABGgVXHGYfnpNDc1WQPWL2Y3JUfAUWNY/3Hel0Mi7SjtF/mC1XAbwjxBY3 X-Received: by 2002:a9d:76d2:0:b0:6b8:7ebd:2db9 with SMTP id p18-20020a9d76d2000000b006b87ebd2db9mr8203891otl.26.1688395867467; Mon, 03 Jul 2023 07:51:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1688395867; cv=none; d=google.com; s=arc-20160816; b=wwKjj9DO2+7NYU2N6YOtHOEBr6iID1/nMCLYOUBZTA3KBoVmP40+o3gywFvCd1TyAY 4GX7VZS4yBP09oNi9RCzIW86zdU9WouRGigvEnv9mmnpS/nECl/qFln0EnqKArJlnEfM 3CD3SZm/o9GY/162oy++AD16RjqQfH4EXpYHTMKEvj99qEmyqtyytnPA4lGPL1OHvaGu LOaKc7lJ58H+XUYwfxBsVBDN4whO7LempcLpPtPldry5vkX2rgAzTV7bfhVh2hthoOg4 DpfO9ntTE0SNo9if5K7YLDI+3UNw3jrJLqJ7Gt0KKs08WoHAua+BoywtMwxye2mrYdl5 EIKw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=7K9SugyVpHeyi+ZUYcERzWP5OOoEfk+Gx3Mysd224XQ=; fh=PXDxr3dUpqkwy+iUzqoMAFFQa5D8k1algixOgOf36Ew=; b=vWgGaQLxggu7GtxMLlaVyqb45YkG7imBA5ppSjvzgac3F42QUnJZyrKGJLY+0wz6Hv cpt2nGgdEbRBkvGIgq0qkGDyP61w+3u2EaSZWPwOFDq2lbvb/9FEjU8f/hGLQA7SltRP JpPnDJxJROZeiK7pCvJyTARZSbspC08kkJ2bJxaRS5wUbYmj7uDkg1+q9+HShDlN8eEB Oh6Ss5e//I7OGIQFb9Sgh+sj6HXpX3oHYp2fiHSMBzEzpk0Phg/Y7FAPv1B1T8Du4g20 ARoKxbmLcEMXVVVIzinIC/q1mSdN6DmtubhxECf+bV2VDLU7FOCWG7KEqoi5ttz0h3wL XS/A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass (test mode) header.i=@ideasonboard.com header.s=mail header.b=kvCmMAlO; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id e191-20020a6369c8000000b0054405fa924fsi18519225pgc.891.2023.07.03.07.50.54; Mon, 03 Jul 2023 07:51:07 -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 (test mode) header.i=@ideasonboard.com header.s=mail header.b=kvCmMAlO; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229861AbjGCOpZ (ORCPT + 99 others); Mon, 3 Jul 2023 10:45:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60250 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231511AbjGCOpL (ORCPT ); Mon, 3 Jul 2023 10:45:11 -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 6CB5010CE; Mon, 3 Jul 2023 07:44:52 -0700 (PDT) Received: from [192.168.0.136] (85-160-45-219.reb.o2.cz [85.160.45.219]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 6D019558; Mon, 3 Jul 2023 16:44:00 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1688395445; bh=gY4+xWjRxQqKzgbz5r4Gqf9iuuKb3qum48HfTwqVoME=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=kvCmMAlOGe3KhkmBcK3B67kVoraHZWy5ufOidnsjV5bHCemAe1MVvtRf8pSXemww7 jKKrwVTjJ3qSkL4cd+7+0mb4MEyw6S1cgiUZUmp3OI6vzVWF9HJf/Qzi8Zic0+Xe0N /xaafLDmvyd7Rmi9jfuj33F6V+DjiOH+T1zZUsbM= Message-ID: Date: Mon, 3 Jul 2023 16:44:39 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.7.1 Subject: Re: [PATCH v8 3/5] staging: bcm2835-camera: Register bcm2835-camera with vchiq_bus_type Content-Language: en-US To: Greg KH 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 References: <20230627201628.207483-1-umang.jain@ideasonboard.com> <20230627201628.207483-4-umang.jain@ideasonboard.com> <2023070319-daycare-pointless-abba@gregkh> From: Umang Jain In-Reply-To: <2023070319-daycare-pointless-abba@gregkh> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.2 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,SPF_HELO_PASS, 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 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 ? > > thanks, > > greg k-h