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 040B4CE7A8C for ; Sat, 23 Sep 2023 14:32:35 +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:MIME-Version:Message-Id:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=wpd+1lnHkwvZQEatQFpsciyqxWZnF8USc0j2BI94j/4=; b=4/MerypgfGdqBH kVl9QbtAhhwnnumx4fNe5BA7jaO+qXmdUJAs8vXcol0cPXobPokFxqeZXv8hTKIHZxKp4H2EgWMSh LO1uLg8eNkrE+W4Xre2ZEXF/KqD+IZCKXMR8tOmw+j3j2PhYmdNtgob9WOli8160A7sIolUJ4R/uY 88s3X2nPq21LT2B6wgSAfEvh+YKfiRN+931dI60JAw5PO9+YEiFi95umlYQCxcfRhA3bAVNsRa6Bo Umbrx0qkttkUYG3u3XvSrPUl6LDjfxjfo2QfqKwa+13V9PfKasB9Gv8UmcMGKXMB0i3K5ULPh2GST WNWwVzVC8iytp4D31bBg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qk3g1-00B5CN-0K; Sat, 23 Sep 2023 14:32:09 +0000 Received: from perceval.ideasonboard.com ([213.167.242.64]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qk3fy-00B5Bc-1h; Sat, 23 Sep 2023 14:32:08 +0000 Received: from umang.lan (unknown [IPv6:2001:818:e7d2:8300:2412:6733:7e63:fb46]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id CF687DE2; Sat, 23 Sep 2023 16:30:25 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1695479426; bh=bxWVw8EW1+W8KgrEDRuKz0AmWsn/M3h+CZ8KlUIwVbg=; h=From:To:Cc:Subject:Date:From; b=fGX3rgVbAP0RYWUm8TZ+PELGogVVXTADwIdpC/NhibEjVMuQD7TFrOlEjdL5fZOl3 BnhPtPSPC5Ss2nGmFu3lahnEmkYEl6S6apZOczbbT2lIr39q8p482Ff72B+4HpnCwy GpCETpicU/579FmYN+DQTucpj64W9wmomg+78AAM= From: Umang Jain To: linux-staging@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-rpi-kernel@lists.infradead.org, linux-media@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Stefan Wahren , Greg Kroah-Hartman , Florian Fainelli , Adrien Thierry , Dan Carpenter , Dave Stevenson , Kieran Bingham , Laurent Pinchart , Umang Jain Subject: [PATCH v12 0/6] staging: vc04_services: vchiq: Register devices with a custom bus_type Date: Sat, 23 Sep 2023 20:01:54 +0530 Message-Id: <20230923143200.268063-1-umang.jain@ideasonboard.com> X-Mailer: git-send-email 2.40.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230923_073206_717058_4A761E67 X-CRM114-Status: GOOD ( 14.21 ) 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="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org The patch series added a new bus type vchiq_bus_type and registers child devices in order to move them away from using platform device/driver. Tested on RPi-3-b with media tree master branch. Patch 1/6 and 2/6 adds explicit DMA mask to bcm2835-camera and bcm2835-audio respectively to avoid regression when moving to away from platform device/driver model. Patch 3/6 and 4/6 adds a new bus_type and registers them to vchiq interface Patch 5/6 and 6/6 moves the bcm2835-camera and bcm2835-audio to the new bus respectively Patch 5/5 removes a platform registeration helper which is no longer required. Changes in v12: - Add initial two patches to set DMA Mask explicitly to avoid regression - fixup vchiq_device.c bad squash in v11 - Rename vchiq_device.[ch] to vchiq_bus.[ch] - Fix memory leak if device cannot be registered - Make vchiq_bus_type_match() use bool values - vchiq_register_child() helper removal folded in 6/6 instead of creating extra patch. Changes in v11: - Move setting of DMA mask in child devices (3/5 and 4/5) - Fixes "DMA mask not set issue" reported in v10. Changes in v10: - fix dma_attr WARN issue with bcm2835-audio module loading - Unregister bus on parent platform device fails to register - Reword commit to highlight bcm2835_audio to bcm2835-audio name change Changes in v9: - Fix module autoloading - Implement bus_type's probe() callback to load drivers - Implement bus_type's uevent() to make sure appropriate drivers are loaded when device are registed from vchiq. Changes in v8: - Drop dual licensing. Instead use GPL-2.0 only for patch 1/5 Changes in v7: (5 out of 6 patches from v6 merged) - Split the main patch (6/6) as requested. - Use struct vchiq_device * instead of struct device * in all bus functions. - Drop additional name attribute displayed in sysfs (redundant info) - Document vchiq_interface doesn't enumerate device discovery - remove EXPORT_SYMBOL_GPL(vchiq_bus_type) Changes in v6: - Split struct device and struct driver wrappers in vchiq_device.[ch] - Move vchiq_bus_type definition to vchiq_device.[ch] as well - return error on bus_register() failure - drop dma_set_mask_and_coherent - trivial variable name change Changes in v5: - Fixup missing "staging: " in commits' subject line - No code changes from v4 Changes in v4: - Introduce patches to drop include directives from Makefile Changes in v3: - Rework entirely to replace platform devices/driver model -v2: https://lore.kernel.org/all/20221222191500.515795-1-umang.jain@ideasonboard.com/ -v1: https://lore.kernel.org/all/20221220084404.19280-1-umang.jain@ideasonboard.com/ Umang Jain (6): staging: vc04_services: bcm2835-camera: Explicitly set DMA mask staging: vc04_services: bcm2835-audio: Explicitly set DMA mask staging: vc04_services: vchiq_arm: Add new bus type and device type staging: vc04_services: vchiq_arm: Register vchiq_bus_type staging: bcm2835-camera: Register bcm2835-camera with vchiq_bus_type staging: bcm2835-audio: Register bcm2835-audio with vchiq_bus_type drivers/staging/vc04_services/Makefile | 1 + .../vc04_services/bcm2835-audio/bcm2835.c | 26 +++-- .../bcm2835-camera/bcm2835-camera.c | 23 ++-- .../interface/vchiq_arm/vchiq_arm.c | 52 ++++----- .../interface/vchiq_arm/vchiq_bus.c | 100 ++++++++++++++++++ .../interface/vchiq_arm/vchiq_bus.h | 54 ++++++++++ 6 files changed, 209 insertions(+), 47 deletions(-) create mode 100644 drivers/staging/vc04_services/interface/vchiq_arm/vchiq_bus.c create mode 100644 drivers/staging/vc04_services/interface/vchiq_arm/vchiq_bus.h base-commit: 0bb80ecc33a8fb5a682236443c1e740d5c917d1d -- 2.40.1 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel