From patchwork Sat Sep 23 14:31:58 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Umang Jain X-Patchwork-Id: 143942 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:cae8:0:b0:403:3b70:6f57 with SMTP id r8csp263419vqu; Sat, 23 Sep 2023 09:18:42 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHOlyTrTJ0e02txVcbhfrmQEo5pPyPgAIJqyKITNogmXQHv1mz+hRP+jS7HKOE8ctmYajZJ X-Received: by 2002:a17:902:c10d:b0:1c0:c4be:62ca with SMTP id 13-20020a170902c10d00b001c0c4be62camr2309940pli.17.1695485922465; Sat, 23 Sep 2023 09:18:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695485922; cv=none; d=google.com; s=arc-20160816; b=dhfNdETt/aJ0fmAktQoojv5i8XNOnmACsaqtab0Utkg/S+6OS92351/BZI/MEaiNq+ K6mA5N0S7j7gv11tAQw/2YB6PvPFtI1F9BlCD7nTgJQD8Laz3PAYyKgwgz8FDQDa4kl2 ofWfOIj7Bu8UBc+xS8HTuovmyRqf+Nb1VYFhjf2pC6gmd8SwOLcUiKzFOAt5eZwpZU4Y B8xJOeCSXDCT+iU2/u8//U7WrNpfpPB/z+FTtkxMMlKyHd0s8XS7Owsk9QNekpHn82ia 1/5+Mpj0KywBs13lHZ6XFDNSoCtfs+URpRFAs6UkeLe0K59SRPk50vuj44tJa4eAOmki UyVw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=fFdSZp/RAv5y+kwIQcxN3x8BkNjNF+sSvrjAIb4DDW8=; fh=x1hGPnZeYvyedQGDVaFY4F5NZX5OfdEJxyYqoMYIkPY=; b=WZ0Wavs0p2PLp58Kpv+WcRHAZDZihUiQZp9cWevZFPQa7SCRZvrOteJdlQCYHTxlzV GxNygM/rXxpG8MGQddVUVNtsTFEPLo2eSxiWufWYSkKvEMC6AsT9zEfAshfC3BdxEqZN QNs493LDKMAX+AOgAwk5PLfM5Na5BqWK4foZl3TZLyjGgjJMXI4ObRb241v/FMlv9Xnk lNcdVJNdwoqq7O9yeLdLvvx0iDg7Xuw31FrG6CE4A32PgnXCjszJcwXgotxKebfIIN/R HlglS78Z0LcRwCtIG1EpxdOsIP4BlsXHmNVMAynw5wgxKGyjJx77Db+wCf4Rr1miK/0G B8tg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass (test mode) header.i=@ideasonboard.com header.s=mail header.b=i0Uuzwne; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id b17-20020a170903229100b001bdd35033ebsi6520681plh.361.2023.09.23.09.18.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 23 Sep 2023 09:18:42 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; dkim=pass (test mode) header.i=@ideasonboard.com header.s=mail header.b=i0Uuzwne; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id DAD628217048; Sat, 23 Sep 2023 07:32:35 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231818AbjIWOc1 (ORCPT + 29 others); Sat, 23 Sep 2023 10:32:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58270 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231772AbjIWOcU (ORCPT ); Sat, 23 Sep 2023 10:32:20 -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 B1CDD113; Sat, 23 Sep 2023 07:32:12 -0700 (PDT) Received: from umang.lan (unknown [IPv6:2001:818:e7d2:8300:2412:6733:7e63:fb46]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id A1D831536; Sat, 23 Sep 2023 16:30:29 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1695479430; bh=OiS/6vUN9OZ5WEDhF9ICm3EsH9faDTmVyUTUv11Lyjg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=i0Uuzwneh5WRhM44uyo608ZSSywQ7WhkGMFNG8AIQHznLDIuZXZX2EE/aMykvcqxv MLE0+DaqVQBKGi2FMYaSmUuSwbAK1CgMGIgGeCbBZBzptmBpXoCGumVYDQAy8GTWo/ B5NAriMoauRDbuJdeIfB47H7mfaMnK1s/NCKeTjM= 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 4/6] staging: vc04_services: vchiq_arm: Register vchiq_bus_type Date: Sat, 23 Sep 2023 20:01:58 +0530 Message-Id: <20230923143200.268063-5-umang.jain@ideasonboard.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20230923143200.268063-1-umang.jain@ideasonboard.com> References: <20230923143200.268063-1-umang.jain@ideasonboard.com> MIME-Version: 1.0 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_PASS,SPF_PASS 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 X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Sat, 23 Sep 2023 07:32:35 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1777845846525635634 X-GMAIL-MSGID: 1777845846525635634 Register the vchiq_bus_type bus with the vchiq interface. The bcm2835-camera and bcm2835_audio will be registered to this bus type going ahead. Signed-off-by: Umang Jain Reviewed-by: Kieran Bingham --- .../vc04_services/interface/vchiq_arm/vchiq_arm.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c index aa2313f3bcab..9388859b9b56 100644 --- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c +++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c @@ -12,6 +12,7 @@ #include #include #include +#include #include #include #include @@ -33,6 +34,7 @@ #include "vchiq_core.h" #include "vchiq_ioctl.h" #include "vchiq_arm.h" +#include "vchiq_bus.h" #include "vchiq_debugfs.h" #include "vchiq_connected.h" #include "vchiq_pagelist.h" @@ -1870,9 +1872,17 @@ static int __init vchiq_driver_init(void) { int ret; + ret = bus_register(&vchiq_bus_type); + if (ret) { + pr_err("Failed to register %s\n", vchiq_bus_type.name); + return ret; + } + ret = platform_driver_register(&vchiq_driver); - if (ret) + if (ret) { pr_err("Failed to register vchiq driver\n"); + bus_unregister(&vchiq_bus_type); + } return ret; } @@ -1880,6 +1890,7 @@ module_init(vchiq_driver_init); static void __exit vchiq_driver_exit(void) { + bus_unregister(&vchiq_bus_type); platform_driver_unregister(&vchiq_driver); } module_exit(vchiq_driver_exit);