From patchwork Thu Dec 6 18:28:51 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Wahren X-Patchwork-Id: 10716573 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id CDA2013BB for ; Thu, 6 Dec 2018 18:29:48 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BE7462F0D0 for ; Thu, 6 Dec 2018 18:29:48 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B2BA02F0D3; Thu, 6 Dec 2018 18:29:48 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 6406B2F0D0 for ; Thu, 6 Dec 2018 18:29:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=LqiYMF8gKlbg+oAuLBSkvlxn26unoI9X/KYp5imnjUs=; b=qGoBhND9/Pa4e/eWqnqYt8WVWd FYPRFERBTZ7Pypg92aHoSGQAExzv3ywHRmfbAYrfXoPiBceo/qtHMteGVuuOHjeuYI+sWD4/w6kC4 wGGrfItR+b+gXlzPjxNnxZuwqWFP43G0YxAFXgk7tlDEkVlA9dVsJaOjvuY9oshdUgki19WBpC9Iw Nv48wP5+gIuoi5xxqc6QRUG11BYpLf8x0oNnAkWvOFbU0ltM6dtZ3M3u393Zuz2bG92ETjZDixg+7 uu630tvrQtlZ5aLml2oYybbQwMR+0N0wueRpVhoU4RGa4kg3+ccqfcmYeZ6vUPdE2n7eZDl9iT1H6 wubCLq5w==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1gUyP8-00051a-9z; Thu, 06 Dec 2018 18:29:42 +0000 Received: from mout.kundenserver.de ([212.227.126.130]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gUyOu-0004ol-QP for linux-arm-kernel@lists.infradead.org; Thu, 06 Dec 2018 18:29:30 +0000 Received: from localhost.localdomain ([37.4.249.153]) by mrelayeu.kundenserver.de (mreue012 [212.227.15.167]) with ESMTPSA (Nemesis) id 1MF2YC-1gfwk70DOq-00FUZS; Thu, 06 Dec 2018 19:29:07 +0100 From: Stefan Wahren To: Greg Kroah-Hartman Subject: [PATCH 01/10] staging: bcm2835-camera: Abort probe if there is no camera Date: Thu, 6 Dec 2018 19:28:51 +0100 Message-Id: <1544120940-13716-2-git-send-email-stefan.wahren@i2se.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1544120940-13716-1-git-send-email-stefan.wahren@i2se.com> References: <1544120940-13716-1-git-send-email-stefan.wahren@i2se.com> X-Provags-ID: V03:K1:XvAVjqs6KgnP4g7WXUG/unGRmYutJ1EvDtdxvPNEr0q3AAHovfR IX1NQ1hYPpUi4UhcglcgG9qNepfq3c6qmF0v4YFqClhMCAoH7cEWSFxrg9oOwDRuntAmq9D x9vVlVqjYzyogVesGhmMHrsnz9jjolDwq3eMcGF7uxYixeAC8rSqjsMX/FcKw3huHqW28iL s9634eNwM0ZzvQLFLkeBA== X-UI-Out-Filterresults: notjunk:1;V03:K0:IejI2bNWRnE=:bhw9v6sqGP7gdHsIiANXLQ bMWGWVQEPOwiuYQ8hjeqfJPOk2vZQBBjK9XLQZi85cbZ709+tylxxl7+oP8KTrI1aCQ8UYyTW PBYsGIqoypMjzzUQKTFZs1lpf63qg95Tu8EyAgBXcOp6pLwbi1ffmY+wOJBFuQQmSkiuHLLf/ RrpL84jEzlVRnLmUljCHOnnW50KhvR1gSSj7DHzIOrmhrVKP3dMHi/aEbQ+Sn/dQF5AxYYhqA OyGd9RHREoLVA0vFilSS9Bci+NsZY4ai+oppUoyp7jxHuCEzsS9KDnnGT3imx9+zGA9XrzfNA ldeeJUo1xaMd0O1l8ZdwPclOzZ5YCXCdCFMI5wKskFhExfVupI0lKtOdTCVOw8fNA8cXSjvn3 FV254gQ1vGw8tt4k/KHKLsq5cDNhz+fA6PPsHnFF/hXpMvQf731UdZwvau90/H0VfDL5CgIfh uu/OCXvE3NMZ9GbbKORhA8EjRGRM2zSBnQf52oT/IOQgQBF/NRN5dySm2JxJyzM89/hYZzdkC 9CUEhPSrlOH+IVUx2b5vGmW62ocpnFrz7Ulifa9iHWpGZ+904yuVUQDMbLMl9POTEqRxu2Mt2 xSmsexxg4YPazLJGvxyEkS+i/GKfIxoYilrAbFTbdSFvQrkmdESZ9109CGxkZGDz6OBGw4//3 +nrjRoc9cClCF8uQEzGRcAtPrYY+QK0Kh8Ki80yLSVnoWqJkJ4c7eNhxucGQ5+7SgJ44W5knz IlUHEdxY5U2+DMsKFXWxYT/6nW5yW6Up+zFLxyWlebLxM/KgiNlSSW8KVh4= X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181206_102929_174214_21669284 X-CRM114-Status: GOOD ( 13.21 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devel@driverdev.osuosl.org, Stefan Wahren , Takashi Iwai , Eric Anholt , linux-arm-kernel@lists.infradead.org, Dave Stevenson , Nicolas Saenz Julienne MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Abort the probing of the camera driver in case there isn't a camera actually connected to the Raspberry Pi. This solution also avoids a NULL ptr dereference of mmal instance on driver unload. Fixes: 7b3ad5abf027 ("staging: Import the BCM2835 MMAL-based V4L2 camera driver.") Signed-off-by: Stefan Wahren Reviewed-by: Nicolas Saenz Julienne --- drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.c b/drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.c index c04bdf0..d6fbef7 100644 --- a/drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.c +++ b/drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.c @@ -1841,6 +1841,12 @@ static int bcm2835_mmal_probe(struct platform_device *pdev) num_cameras = get_num_cameras(instance, resolutions, MAX_BCM2835_CAMERAS); + + if (num_cameras < 1) { + ret = -ENODEV; + goto cleanup_mmal; + } + if (num_cameras > MAX_BCM2835_CAMERAS) num_cameras = MAX_BCM2835_CAMERAS; @@ -1940,6 +1946,9 @@ static int bcm2835_mmal_probe(struct platform_device *pdev) pr_info("%s: error %d while loading driver\n", BM2835_MMAL_MODULE_NAME, ret); +cleanup_mmal: + vchiq_mmal_finalise(instance); + return ret; } From patchwork Thu Dec 6 18:28:52 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Wahren X-Patchwork-Id: 10716577 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 9A7B415A6 for ; Thu, 6 Dec 2018 18:30:26 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8DF9C2F0EF for ; Thu, 6 Dec 2018 18:30:26 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 825BE2F0F8; Thu, 6 Dec 2018 18:30:26 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 172212F0EF for ; Thu, 6 Dec 2018 18:30:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=BJsiEYhUP02QkyBdUmvstEv+o2JrhddB9T9l3mLhlno=; b=nUg7JMp6BaCtOkOI97GZfHKS// eImQmTMKqwtDfMpzyIymIYSOxN/lT1UrJ4YbeLB5DkakorrIUzmgGmmBtxYigNdqxUF/beK9StSE6 962akhFmo77QHn1GUtvU1j3X2G5mKw+iqfdambKUonKIGYkfQ16TMlgdB1uCFXFOjZppAhSfEsXyi Z8O1jSaSc5k7VOqqe58v0UwLCEn5PqwKBwV7m7BwS2bGUYtbKaIEqTjzDSXO84jW/MMNY6T/Bs+AT o+DbrkvOK9Uky8JFfEPlKCjBMjtR/Gcpqzb+Hoh5GQWlUNw9GEAvO7OAgzKoW0ByY/nSCjFtd5gyV z8p0W4lg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1gUyPn-0006rB-Q6; Thu, 06 Dec 2018 18:30:23 +0000 Received: from mout.kundenserver.de ([212.227.126.130]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gUyOu-0004on-Po for linux-arm-kernel@lists.infradead.org; Thu, 06 Dec 2018 18:29:32 +0000 Received: from localhost.localdomain ([37.4.249.153]) by mrelayeu.kundenserver.de (mreue012 [212.227.15.167]) with ESMTPSA (Nemesis) id 1N3omW-1hUbUR1a5Y-00zkUw; Thu, 06 Dec 2018 19:29:07 +0100 From: Stefan Wahren To: Greg Kroah-Hartman Subject: [PATCH 02/10] staging: bcm2835-camera: fix module autoloading Date: Thu, 6 Dec 2018 19:28:52 +0100 Message-Id: <1544120940-13716-3-git-send-email-stefan.wahren@i2se.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1544120940-13716-1-git-send-email-stefan.wahren@i2se.com> References: <1544120940-13716-1-git-send-email-stefan.wahren@i2se.com> X-Provags-ID: V03:K1:a2IcIlzqtIrY3YPM6J8V8mb1uVDI1cCfmLh+rNb01M2UOeKxYus KnR9fVH1qPAAAwN5A1F/n7g0b+Gv9wJzCBwtXJudCIYWyryzRgjcf5vvElsT7Syan30jDu/ 2eKuWg3WC92kA/ISVPWhi6hENuX48cQkzZYwKt9bcfTxCTmSUZZjkW/4c6fcJ8moLs4XzDv anCALaizjfBuKGX4U7thA== X-UI-Out-Filterresults: notjunk:1;V03:K0:TdFd5eKOo/I=:thWaF6Fhy3jJWvSPtqtf2j AFcx8RNM8CXGGerISwEPCloq+RV7MIPS8LHdOf7cDk7xUJWP8X6x+AkPoeochLxJAMxsgmwQG AfjLabHhCTRmv4/rWywVGb8VOlSswintZOyethSb7UXNYK8GwxdJ4Ye5SpOc18r67yfD1qlWn VwoAdBy2QOGZbLNgCdeJG0aJJceiNLc784P1pFiNY/a0ZmnQito8slF+Nk8miRBNFBXHGQ7/o ul91kse8n58nAkY0KpbSnaZQhdLW4K2McPyOC2soILZwmXqQcKI62ai9Jyf5YKBSTbU8MtE4K nqx2yp/2VAR9L20Vd37k9FF5qcPRFp3LfLzc36xAlK4ZXuOI46NuOTnSO3s0pXS2JiApkm+1a ynO3N0x9iIP7ByOXFTJF8epgKoa7GwkGD+f01S9vWq7D3Uyq7vXZp3ncsTgs0btTZefiDzOqW FqoI4ZYk5PLk85qahTuqB4kvZwaP7lSm/TrIuZNCWAn3gFWfYi24gJSwpEt5kLNloNgcXBJ23 w5C9ZaZnrRZNWbePJbxxiBJ2j4aakUHA9G4FTR8X0Q1EOG665eq3yCnVRnJZjZDkOyjo283+q Ht3JDZzyHIfZXW3Yxwffl/R74uYG2cV3k8yXWvnSLT9Fnzf2/ucU4z/Yy2SxGf78kgmDfh6fk sKeS/nKSp1zRLk3qtrfUX+29TdurwnHCu9vTdkFaLNhr+bJP1g2OoiOynVtMRKuhnSXqUGbIA S+NdCgAhUwtETwrE1R70M27ATy45DoAEqyNzty9goVTmJnMQP0uVO03r3pg= X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181206_102929_176463_0A2D67BC X-CRM114-Status: GOOD ( 10.68 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devel@driverdev.osuosl.org, Stefan Wahren , Takashi Iwai , Eric Anholt , linux-arm-kernel@lists.infradead.org, Dave Stevenson , Nicolas Saenz Julienne MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP In order to make the module bcm2835-camera load automatically, we need to add a module alias. Fixes: 4bebb0312ea9 ("staging/bcm2835-camera: Set ourselves up as a platform driver.") Signed-off-by: Stefan Wahren Reviewed-by: Nicolas Saenz Julienne --- drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.c b/drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.c index d6fbef7..7d3222c 100644 --- a/drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.c +++ b/drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.c @@ -47,6 +47,7 @@ MODULE_DESCRIPTION("Broadcom 2835 MMAL video capture"); MODULE_AUTHOR("Vincent Sanders"); MODULE_LICENSE("GPL"); MODULE_VERSION(BM2835_MMAL_VERSION); +MODULE_ALIAS("platform:bcm2835-camera"); int bcm2835_v4l2_debug; module_param_named(debug, bcm2835_v4l2_debug, int, 0644); From patchwork Thu Dec 6 18:28:53 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Wahren X-Patchwork-Id: 10716587 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 65F9F109C for ; Thu, 6 Dec 2018 18:31:49 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 594202F185 for ; Thu, 6 Dec 2018 18:31:49 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 446F22F1B7; Thu, 6 Dec 2018 18:31:49 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id C68E52F1B5 for ; Thu, 6 Dec 2018 18:31:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=cx6xiRfpW4U6clOJeHm6+vCLPgC0GEYkSPu36pk9gh0=; b=rbq1hU1HOojMq2E5d9jNYf+LYc szHbXoCTfJ+OFHcq18649PiiSKmXmCBnnd2h+ryGJuZycgRpuZtGOJrrMDQf9n+0PEHqosnDw39Dr 6LOTAkzFxU1znkh6vlnuWISQksdnquddvgI7vG/ZndYvn7J6yCCSNRKL/npZRvjw532ABk01Y5B71 nzyoci5so6nknB734y2335sZcoM6U7W1KHZjYV33S5CVdx3yeUm6UFdcZaR8aBCXpFNcVCfrOX7Ra EkXRh+YH+dAFXnlt2bHsGL5qr5XNbBx8CCaw6MzETacL1e/nhZTj1DaXxWYNRXaSUGbi8th0gGSf5 Wy0F19BA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1gUyQz-00088g-Ok; Thu, 06 Dec 2018 18:31:37 +0000 Received: from mout.kundenserver.de ([212.227.126.133]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gUyOv-0004ot-IW for linux-arm-kernel@lists.infradead.org; Thu, 06 Dec 2018 18:29:34 +0000 Received: from localhost.localdomain ([37.4.249.153]) by mrelayeu.kundenserver.de (mreue012 [212.227.15.167]) with ESMTPSA (Nemesis) id 1MPK73-1gpXeI31lF-00PcwN; Thu, 06 Dec 2018 19:29:07 +0100 From: Stefan Wahren To: Greg Kroah-Hartman Subject: [PATCH 03/10] staging: bcm2835-camera: Move module info to the end Date: Thu, 6 Dec 2018 19:28:53 +0100 Message-Id: <1544120940-13716-4-git-send-email-stefan.wahren@i2se.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1544120940-13716-1-git-send-email-stefan.wahren@i2se.com> References: <1544120940-13716-1-git-send-email-stefan.wahren@i2se.com> X-Provags-ID: V03:K1:pB8Hkjk/juzrdGos3gGxmcSj8goktZxtCwcwHwrEiMCAb+WcPN/ bzmoPOj5mDQdyVbVXxvveLUuNMxtvfwwEHLWSLo1rZTLgaYhmKEThyww3XYh77+bFziJ/Bq NKklGn7c1K1WmnwWSI0AjpDq2qDZxYyB6cx+AyeJc9F1XRT9xxcEbJf824N9eeFOgAV8Jxb iUvWrpw3YHZSotXUy8+2Q== X-UI-Out-Filterresults: notjunk:1;V03:K0:TqFJF/GlPs8=:2vt59bXwOKvKABy78nTJ9o dCTeTYCpvZLdswC+EQw+jJhBtBZi1oRK2V2OAeYVbm6Wv5Xoa2TSw6slW7XTRvWRR6VrCJtzO oQ8mkLvLnfxetimuXHew/S/sQwPYruIii1PqE1WjWpUbS+10ycePfF0EM9eq58e14UzWk25zT DAXT0+fGzmOYzQhkGpkO5lLaBTkUgKLcgsIy6bvin9kvt0xemBYMkn8v8BRtnxptz1euxIe7T 6z6dZaNMezfyiO0DovKNZzQAVaypOqqTuaS83Z47gYgYkogKKi/GMUYYA+4Q6tI4tCCT5ENN3 Px9vhK7hMwjks7nIXBlodtbPg3ZZ1Z7GPM1t3rKwd2plqjQPFj3g4l6FcSlDbPU6u2s34rvNY k3spezMI/HGaedLxg+tVp/X8gmrRjmWF8s7RLGkdscLNfM1dsX4TDE3K4gE2I7m+VQbzU/EHg feSdzbadhhktWIcBr+3fQlheLAVahT3f6Eh7k7gJKAs9bbSH8YpoEDyDlXULLKOoZUIs6AW7f jj1Ee8TN85U6qrm1TautnlcqNBx+JEiHrna0diVDTZv+B7geyCg01oGyDAvV/fBeyyLundrFb 9UEjgaiZI1uGclULgdZ9+bcuVkpwfIz4BI5UJY4FmakEEekpHPHbkJc9CF7X5MzLYTAWXvC50 NhwQxBK7AfVgK9HbnKS024LhYniY38hzTd35Hao9oU3jTJbVVX2FvJ4n6OtiGIExXrA42Nfrq zCUjnFOSgp5vwmQgvkQr4hy70Mvu/4rr+0VQU6nk0Tc5kpCAs5QN+btPRwY= X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181206_102929_904367_A64329FD X-CRM114-Status: GOOD ( 10.74 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devel@driverdev.osuosl.org, Stefan Wahren , Takashi Iwai , Eric Anholt , linux-arm-kernel@lists.infradead.org, Dave Stevenson , Nicolas Saenz Julienne MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP In order to have this more consistent between the vc04 services move the module information to the end of the file. Signed-off-by: Stefan Wahren Reviewed-by: Nicolas Saenz Julienne --- .../staging/vc04_services/bcm2835-camera/bcm2835-camera.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.c b/drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.c index 7d3222c..cd773eb 100644 --- a/drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.c +++ b/drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.c @@ -43,12 +43,6 @@ #define MAX_BCM2835_CAMERAS 2 -MODULE_DESCRIPTION("Broadcom 2835 MMAL video capture"); -MODULE_AUTHOR("Vincent Sanders"); -MODULE_LICENSE("GPL"); -MODULE_VERSION(BM2835_MMAL_VERSION); -MODULE_ALIAS("platform:bcm2835-camera"); - int bcm2835_v4l2_debug; module_param_named(debug, bcm2835_v4l2_debug, int, 0644); MODULE_PARM_DESC(bcm2835_v4l2_debug, "Debug level 0-2"); @@ -1976,3 +1970,9 @@ static struct platform_driver bcm2835_camera_driver = { }; module_platform_driver(bcm2835_camera_driver) + +MODULE_DESCRIPTION("Broadcom 2835 MMAL video capture"); +MODULE_AUTHOR("Vincent Sanders"); +MODULE_LICENSE("GPL"); +MODULE_VERSION(BM2835_MMAL_VERSION); +MODULE_ALIAS("platform:bcm2835-camera"); From patchwork Thu Dec 6 18:28:54 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Wahren X-Patchwork-Id: 10716575 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 0BACA109C for ; Thu, 6 Dec 2018 18:30:10 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id F0FEB2F0D3 for ; Thu, 6 Dec 2018 18:30:09 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E3E942F0F0; Thu, 6 Dec 2018 18:30:09 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id CB51C2F0DD for ; Thu, 6 Dec 2018 18:30:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=NgABWu4GRYKy/lijhCcDhHoYii2Jm/QwlleXvChqrZU=; b=fcBKQmWiro0F2T8Fo69y0mfLRT 9Htlfa+C1k5iX+MdTkveb7RYKuRUd2wz9VBCS7ZS73vBPfnhOrojkIvPc5OEbB9pPyyhXmuKOCKeX mOMDcsCci6gtqe6K95ePv6qYpOYyVfgRF2zy2r7SH38WAE88aI3AoM3qCoAMLQdQArmKJoZdGHwSm wjwl9ZkPpG02EGNxJLb9dJgyc3ApSct/uEp4GEKq8QtyQtdLWtdSXoe86B+TErLz5FAaklttn6odw quxbXcza9sx8AITrF0UFIdZNc8s8Gms9xa23JnB7wt8JjQ0+VujU16zPHg7r8hLwBkvhUStad9tKe GwpnE/qA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1gUyPW-0005c1-Cl; Thu, 06 Dec 2018 18:30:06 +0000 Received: from mout.kundenserver.de ([212.227.126.134]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gUyOv-0004op-8B for linux-arm-kernel@lists.infradead.org; Thu, 06 Dec 2018 18:29:32 +0000 Received: from localhost.localdomain ([37.4.249.153]) by mrelayeu.kundenserver.de (mreue012 [212.227.15.167]) with ESMTPSA (Nemesis) id 1My6xz-1hPQQl0J2N-00zVej; Thu, 06 Dec 2018 19:29:08 +0100 From: Stefan Wahren To: Greg Kroah-Hartman Subject: [PATCH 04/10] staging: vchiq_arm: Fix camera device registration Date: Thu, 6 Dec 2018 19:28:54 +0100 Message-Id: <1544120940-13716-5-git-send-email-stefan.wahren@i2se.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1544120940-13716-1-git-send-email-stefan.wahren@i2se.com> References: <1544120940-13716-1-git-send-email-stefan.wahren@i2se.com> X-Provags-ID: V03:K1:RNRNSadj1RZ7N0BB46g43eo8zHPBOZ2r0T7RdX4o8WKt2QdxAFq K13hprJK3vI3c91hc7EmexEbjsm1+/hQNxELBlsUxo4zkAe7i1X0omqaI0a5NQ1WdPPcIsc XzDkAFOEkgo2qDodXzINNOyy/874cmqLTubTwPs6GGPTN4UBDXNyU1iuk5D4sZzB1UAncRJ zY4tWnCqWGclN6Oqen9Zg== X-UI-Out-Filterresults: notjunk:1;V03:K0:q2AQONZiF9k=:RfmJ336hL9J4YbW/0KhHqh IqwUORzWl2OYOBp7xNqQEFHqWmIU6d6mdzdGzV4pop4G3F9uIkvc4GyL7OSFfNub45jLo5Fy0 2CoHTH1r+VzLlnDubJA6WFebKWklxERzI6N4SxKJetBBjPIrkfrrRD99YWLBJzFWpzu4ZY+6r bMtdJIXUpVbTGXYzEWO8vfX7yN8LAjlCgq3gdL1rPLtcqCper6pkGpcsE8BLUqOR/Dt3mDJoW 5H2wsaaLiRWgEzIr1/gNM3+7TIzDpF7kEfS7WGvhEVss3IvO+NbtAkdgkVY3ZZlZn+LqZ78dZ GxQ2ePenRP84jUn8YWpbquAqTvrB1e/AtHndPo7mO26fLCPn726ZhRj4h6Imo+oq8K85OfQwo +wnN0okzxNarLLieurlsQNV79JmN6dcdTQr4pNwnmq7KvUCtISvrhFEHIIk/KuQ8pP6bmMg4Z otW5muf10OHoqNRx6vNVhZf27e7sjN6BKogTi9wt+IEMTB4GJVz+qoq0vNqQjzeHLoqn1hhDd hwTAWU/gAc1N2/9EVjYsVId1Ou09+U4taNUgTwUBUNCbMaeDlLlRqWW4XDGNUeRixEEiOY5uu FDf96U82izST978h5w89c2wYXSEHE2HBGsxK/n1qu7tq1FRjYxVLUl8rAEZiqnu5G9SOaIbKL PGmm+bRfjMQGolrZM5UGtozrnTV2AkHJDfqUtnQA/rMn9c1fxOGXXObJA85RoQG1x3F2XSaC2 1d6mKBH8p8C5TcvYbY5VIdnq6XVMO4Q36ckSW/qWHk0ubd3He7dwHXGNv0A= X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181206_102929_591775_D85A2FCD X-CRM114-Status: GOOD ( 14.17 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devel@driverdev.osuosl.org, Stefan Wahren , Takashi Iwai , Eric Anholt , linux-arm-kernel@lists.infradead.org, Dave Stevenson , Nicolas Saenz Julienne MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Since the camera driver isn't probed via DT, we need to properly setup DMA. Fixes: 37b7b3087a2f ("staging/vc04_services: Register a platform device for the camera driver.") Signed-off-by: Stefan Wahren --- .../vc04_services/interface/vchiq_arm/vchiq_arm.c | 27 +++++++++++++++++++--- 1 file changed, 24 insertions(+), 3 deletions(-) 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 0caee2d..f2c1dcd 100644 --- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c +++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c @@ -49,6 +49,7 @@ #include #include #include +#include #include #include "vchiq_core.h" @@ -3479,6 +3480,28 @@ static const struct of_device_id vchiq_of_match[] = { }; MODULE_DEVICE_TABLE(of, vchiq_of_match); +static struct platform_device * +vchiq_register_child(struct platform_device *pdev, const char *name) +{ + struct platform_device_info pdevinfo; + struct platform_device *child; + + memset(&pdevinfo, 0, sizeof(pdevinfo)); + + pdevinfo.parent = &pdev->dev; + pdevinfo.name = name; + pdevinfo.id = PLATFORM_DEVID_NONE; + pdevinfo.dma_mask = DMA_BIT_MASK(32); + + child = platform_device_register_full(&pdevinfo); + if (IS_ERR(child)) { + dev_warn(&pdev->dev, "%s not registered\n", name); + child = NULL; + } + + return child; +} + static int vchiq_probe(struct platform_device *pdev) { struct device_node *fw_node; @@ -3529,9 +3552,7 @@ static int vchiq_probe(struct platform_device *pdev) VCHIQ_VERSION, VCHIQ_VERSION_MIN, MAJOR(vchiq_devid), MINOR(vchiq_devid)); - bcm2835_camera = platform_device_register_data(&pdev->dev, - "bcm2835-camera", -1, - NULL, 0); + bcm2835_camera = vchiq_register_child(pdev, "bcm2835-camera"); return 0; From patchwork Thu Dec 6 18:28:55 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Wahren X-Patchwork-Id: 10716581 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 2E764109C for ; Thu, 6 Dec 2018 18:30:54 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 219E32F0F0 for ; Thu, 6 Dec 2018 18:30:54 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 168862F12B; Thu, 6 Dec 2018 18:30:54 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id C546F2F11A for ; Thu, 6 Dec 2018 18:30:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=q6NB4GeeocILbB27l+COwLYQpAzf8MEBT+W+weZ3IJI=; b=Wuwhatd0kTtgQ0RdQClO98E/is gYCnrGCPEJ9VrVip26lR8otXVCFn6y/+NwUIvtRZ1T+3TkKSiB7Px2V0bJKPYKGhGl9ztcJn3rQVT 5kskFkxVpuEdSuK2hS+Hc1Dsrdr1crb1G5MLsUip0spQ6J8Wk5+mDZVHXDrJLR5kvxjPp+qLub/+Y NbhzSU3ippl6Z7YXwV4k1vQckNFZ/fv4IOhBzUvMur3ImbWw9Klb1Yy5wl96Oeritm+oJMbGYvdEw 1GT6vOcZ5EZt2K6opz9h2FTA1Fg2gb6TZ0EDPwlbTHxwtVEsmTaevE8lFF0cgsf+wKwqUfl5n4H8e UGw11Ckw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1gUyQE-0007MR-G8; Thu, 06 Dec 2018 18:30:50 +0000 Received: from mout.kundenserver.de ([212.227.126.135]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gUyOu-0004ok-Pl for linux-arm-kernel@lists.infradead.org; Thu, 06 Dec 2018 18:29:32 +0000 Received: from localhost.localdomain ([37.4.249.153]) by mrelayeu.kundenserver.de (mreue012 [212.227.15.167]) with ESMTPSA (Nemesis) id 1N5lvf-1hX5OZ1hM3-017B9Z; Thu, 06 Dec 2018 19:29:08 +0100 From: Stefan Wahren To: Greg Kroah-Hartman Subject: [PATCH 05/10] staging: vchiq_arm: Register a platform device for audio Date: Thu, 6 Dec 2018 19:28:55 +0100 Message-Id: <1544120940-13716-6-git-send-email-stefan.wahren@i2se.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1544120940-13716-1-git-send-email-stefan.wahren@i2se.com> References: <1544120940-13716-1-git-send-email-stefan.wahren@i2se.com> X-Provags-ID: V03:K1:ylzcCtmw+CSH+rNx4OFjaz4plOoBT8YxU8DNeUuIn/bm5vP8juS y3e/sF5qP8xw7aG1FpVd3OfQasPfzMZfz0s4tBrs/qpaYEwTFqocbuhRGTjMCVckf+YIJ2d rUzdRPSjHrzkcRDmbX64wi/drOqSBHD+lzixcfthOTElJ8835rK724uqA9JNjHxHo6Sy6iS 53BLjiB9l1+uHEa0Jg/0g== X-UI-Out-Filterresults: notjunk:1;V03:K0:i1LfEnlFtzY=:S5Kadg/ZJ6FKJ3b5KuOoVD ynpiwHRgN/ckerh4bO+xv74/4gvSmdJEHIqNTuiuuy7qdli1lSb3F51tvBIPxmI/pNlHMyKzz LY697phoTa0i0dSwegc4h55cPmV0lCNbsbRDM8ecblTGdFuPkBqlz3n+SFLKVrFHGPcpfm+XY FjB4GEdDKTwcFQao95DX+p4nCTpGoaD7angDo4flwPofJb1E1Y0mcjWjG96Qp0PqieuKzXoRt T55W4c2GtohnSezYM4zH+pqIC15RoYGjc/PiNEgCpvt9rr/JI1xk2FsA8kI9/+64oayTrNcv0 XCSskvYrJJmAEKigVnrT+HS5wO5GZtamrLuVo/Ys9XlJ66JEZxNGDcxgZVmrmiwYvbVtrxcXH LPUgWCh8yWL8Ce3A+vF3uwvvmNMNwerU3IJlBacAsqwWlYCxxnMGxrF2M8aXlRy6boS7xv6wd t0uacFHqjRYDlE+8ZuH8fFzpH26qKNbjUd9B290ShVENPwefDOi2PutzZW0fssV4mGpAeGwIn 8xkV6J0qV4yBybCLCZHJfZZx9NDuiIj3ZgoLHf+Wmfk4g1CuFdGzFwZReJqh7OlafF9KdueuU iAmdqMJcd7nC52dC4EAvMifI0oupMoJa8SIw5kxkrKFH5I9lxeocHTO3YEM4xF/jeyBvoHqK+ 6cs2JqX5QVAF4HMa29fnVBlMJz74hjIu8oA9GsmQAsASVTN/0D69Pm64CiA59mPm4B2a/Gm/y lBH2PLJasCDYhB106O8aWRhuYb14NA9kj6MBa9z+vkmyTPa+JdMgofuw1I4= X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181206_102929_173202_84AE9AA8 X-CRM114-Status: GOOD ( 11.93 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devel@driverdev.osuosl.org, Stefan Wahren , Takashi Iwai , Eric Anholt , linux-arm-kernel@lists.infradead.org, Dave Stevenson , Nicolas Saenz Julienne MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Following Eric's commit 37b7b3087a2f ("staging/vc04_services: Register a platform device for the camera driver.") this register the audio driver as a platform device, too. Signed-off-by: Stefan Wahren --- drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c | 2 ++ 1 file changed, 2 insertions(+) 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 f2c1dcd..b6cd0ed 100644 --- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c +++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c @@ -167,6 +167,7 @@ static VCHIQ_STATE_T g_state; static struct class *vchiq_class; static DEFINE_SPINLOCK(msg_queue_spinlock); static struct platform_device *bcm2835_camera; +static struct platform_device *bcm2835_audio; static struct vchiq_drvdata bcm2835_drvdata = { .cache_line_size = 32, @@ -3553,6 +3554,7 @@ static int vchiq_probe(struct platform_device *pdev) MAJOR(vchiq_devid), MINOR(vchiq_devid)); bcm2835_camera = vchiq_register_child(pdev, "bcm2835-camera"); + bcm2835_audio = vchiq_register_child(pdev, "bcm2835_audio"); return 0; From patchwork Thu Dec 6 18:28:56 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Wahren X-Patchwork-Id: 10716583 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 75A8715A6 for ; Thu, 6 Dec 2018 18:31:17 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 68ECB2F0F8 for ; Thu, 6 Dec 2018 18:31:17 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 50D392F13E; Thu, 6 Dec 2018 18:31:17 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id B7B252F0F8 for ; Thu, 6 Dec 2018 18:31:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=t8AxcZJXiEE/fv4kg+RjDSYflMCKSarEpHQSVaPJW8M=; b=Iq2yibP2OuIg57yeIC0ES9g9U3 MFwuvTxuM7U24Ng1pm5kbnD+CstnCYgIacr2GsFbKmEwR2wg3sKDZuN3AAOhR0nIvCV4m8HGcLZ+6 WZwcpOM9c7aGhAuT0ptzR70JKCsNHmqqttBHHZKk08/lU+QLSqxq6TNi7zaRxiwCHOkK5mTKNpYsq 9vA4wwXuAdesjTz38vVxhNtAVoydWUUxDL+MN7WKWZB6IntQ1brU1A6ZXAd9N5r8nnqnCZHL5GLdL 0O14bSK/xY9JTv5CuTkUhXGPW3cLveDsakvYbbsvGPYJCjJlHvpMGTCovXoBZEnL32uXw85IktHxR PkEyqw+A==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1gUyQW-0007dj-DD; Thu, 06 Dec 2018 18:31:08 +0000 Received: from mout.kundenserver.de ([212.227.126.134]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gUyOv-0004or-8L for linux-arm-kernel@lists.infradead.org; Thu, 06 Dec 2018 18:29:32 +0000 Received: from localhost.localdomain ([37.4.249.153]) by mrelayeu.kundenserver.de (mreue012 [212.227.15.167]) with ESMTPSA (Nemesis) id 1MALql-1gbnsl34oN-00BtfJ; Thu, 06 Dec 2018 19:29:08 +0100 From: Stefan Wahren To: Greg Kroah-Hartman Subject: [PATCH 06/10] staging: bcm2835-audio: Enable compile test Date: Thu, 6 Dec 2018 19:28:56 +0100 Message-Id: <1544120940-13716-7-git-send-email-stefan.wahren@i2se.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1544120940-13716-1-git-send-email-stefan.wahren@i2se.com> References: <1544120940-13716-1-git-send-email-stefan.wahren@i2se.com> X-Provags-ID: V03:K1:LLqfNGFnO7GtEV5Lql0ToaGmIOEyFi63E5C4n1Hl2T/CV2YwiiA 36OfXjmvShxAfgJ1dK+KN5REqekW9SCxK/6RzeffxivN/q5AztbHgvdR8nGZrloeGwXPLqI QO/zaO6lB5jDx/mB3QEklx+XgPisAywq+V0YIIpAmBuy3Hvshkyj2hFITKyRPdH6FXvTk2Y 0Q2/Zax9U0TfmcigWoNHg== X-UI-Out-Filterresults: notjunk:1;V03:K0:14WjUjnn2Io=:RdpmTU/54bzZTu9KuVl3wl 4uV3L69bbWJKg/Z2d7Di+cnsZkjnpGnGCHzk5VdjRuap47b3pBkGrvr6t6g3x9nOxnKoT1QCH BTDYcA5Cu6cGCAO4dUjqBGfB0P47etAF7Z6//0qyah4ixZbEFcBLUho8Zb0Hbe6YA6jdPUx6V 0+BX0AkGF4wN2yPum06c9lsL1Rk0SOA5l1Z+uO/i+DX23tPBec6bMRi1AUDPVx0N+2zwx6SqK Alla3Kt/v3qwm1HCpkNpLsuxDIh+BHRBG+AUDkBGpJs8x+tcB3ZnwUUaioTo6AmPTfCmevWY2 w0eL6Gf17C2flEy0uTtMzIj+3Joiv4r9NBeHJOAOVEqhsymU+dUOlUw+E0rxV5PURlCbArcX6 iDUbRZS+0ZAALEw5V4TbSNpzIPnA0zLuXEqT5hPJ6DJpTUPrEiKadok6rEjcovTEAfjcEHMQT MEWuK93kukLcohpHClTgNquw5EJzvhAxfaaz26wrLBUVzFfXfQHizvTCMGXII0VQK+13jr//f d0xpc5ZWMs2NcFgU/fA0ArX5a6ryRZm6j2ZluiqbAEywV52U1/XstiyD24KrbAGhEG1eqJvXw J5WqRo9YRdjc5MCEG+l/vxc+chBs6ww5omAsdU7JX/iMGtq3D/t3NwhaeRlFGmqex4w+rgsVJ OPtLI6EpQRCRpDeWUpB51q8hy7Ec05Wr+l3pevZ+4oMNR/ZPQX4CDFBvayncXctRXeoxmRGZA v7SFW9Do/AFdP/jVZHd+a9+9rw+rlmxzW8MA1s3T96AWpy7uicQ72R4xkT0= X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181206_102929_596513_BE927A0A X-CRM114-Status: GOOD ( 12.25 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devel@driverdev.osuosl.org, Stefan Wahren , Takashi Iwai , Eric Anholt , linux-arm-kernel@lists.infradead.org, Dave Stevenson , Nicolas Saenz Julienne MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Enable the compilation test for bcm2835-audio to gain more build coverage. Signed-off-by: Stefan Wahren Reviewed-by: Nicolas Saenz Julienne --- drivers/staging/vc04_services/bcm2835-audio/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/vc04_services/bcm2835-audio/Kconfig b/drivers/staging/vc04_services/bcm2835-audio/Kconfig index 9f53653..62c1c8b 100644 --- a/drivers/staging/vc04_services/bcm2835-audio/Kconfig +++ b/drivers/staging/vc04_services/bcm2835-audio/Kconfig @@ -1,6 +1,6 @@ config SND_BCM2835 tristate "BCM2835 Audio" - depends on ARCH_BCM2835 && SND + depends on (ARCH_BCM2835 || COMPILE_TEST) && SND select SND_PCM select BCM2835_VCHIQ help From patchwork Thu Dec 6 18:28:57 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Wahren X-Patchwork-Id: 10716571 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id B584315A6 for ; Thu, 6 Dec 2018 18:29:40 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A5E3E2F0CD for ; Thu, 6 Dec 2018 18:29:40 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 999CD2F0D1; Thu, 6 Dec 2018 18:29:40 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 378992F0CD for ; Thu, 6 Dec 2018 18:29:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=hvkNRUGOFSZUst/kZOo3nkqEhNR4GFD0pKNM/Qb79JU=; b=RF1y+A5gg0oLbxGHit/IteR0uf xVx7OpUcbCxhIxLcrNySBoyeN0rShDRBx/50hLzqQ6fJRyScJDU/rN0NshA7cTRAzFeONzgSUFT1d L2RDD9498To4+OhSS7K4smzl9Y7zItojGIDVcO6fgQzAsNePza2Ryhlj4DhC830OC2fIUTEKKlkgd /YWDJ33Cxz18QwYPfvVl2RGZxlRThVocY7EMm4yKBslJ5V09FSgcL9T6TzpGI7gK3hgDAc5p4QLjx 2ZfQBiAUp0Weg1GMTdLiDLzCifSpbKg0H7QESxGcL9RtFtWMwwE0fRUAbdZp8NvZHPOWRAi0B/QUr nFHVD4Pw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1gUyOz-0004sD-15; Thu, 06 Dec 2018 18:29:33 +0000 Received: from mout.kundenserver.de ([212.227.126.130]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gUyOu-0004om-Pl for linux-arm-kernel@lists.infradead.org; Thu, 06 Dec 2018 18:29:30 +0000 Received: from localhost.localdomain ([37.4.249.153]) by mrelayeu.kundenserver.de (mreue012 [212.227.15.167]) with ESMTPSA (Nemesis) id 1M6pck-1gYpkB0GvG-008N2O; Thu, 06 Dec 2018 19:29:09 +0100 From: Stefan Wahren To: Greg Kroah-Hartman Subject: [PATCH 07/10] staging: bcm2835-audio: use module_platform_driver() macro Date: Thu, 6 Dec 2018 19:28:57 +0100 Message-Id: <1544120940-13716-8-git-send-email-stefan.wahren@i2se.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1544120940-13716-1-git-send-email-stefan.wahren@i2se.com> References: <1544120940-13716-1-git-send-email-stefan.wahren@i2se.com> X-Provags-ID: V03:K1:OWnA9d9J+HDWzhJmyqCNKOPwrDFw9AW2VQy+1nSI0tNNUA2UcNS 9KlkwKvhH1KAymEjrpaCgHq1SNgU5FVQts4l3Zni+wNnfaBIn9WqOvehk0HY5GGmXhkWIUd TJJeabQkQrY0TsnfiWthnP+z88FoTwPe3oyNZqneWQ5O57LtWIH/EvrUwN5/VALM0JzMLFR hjeynlZqWLkOlV4aF/JeQ== X-UI-Out-Filterresults: notjunk:1;V03:K0:NoUZOmwLpsU=:XLFea0/HG80mPYp+73C9En vz2m3l/YwGgNLSpuZrtMLqtOHPHpc/ojHI0OR/AmyBKJn3EEm06VpYqGACcZ85BDz0Fuq47Xj 7KvLnKueJXcaS8BhcRJvep0aoKwkf4K4BL1BXrkr08NdSrMSKSX440ib79ieQ+DrrCVnG9p1V 2v440Arwst3ePPNtHtaESTlWANNeRL0/qlFA4stIMnmbLiSNnoucQjgzA7BRb6ZLfrEnbxuJj yxOJOb8h6exByWv9R/j4EdDIyEMyYN5udF5bzwo26WzFc3Is2MlEnjy6iehPWFhC8vfjbPLPb VP23F4hujqB/1NoH7fyxqcuZqXh4HoqGFXDEdpxjxO12UiRxRZB9AerBEDqGH7e2ElMSF8bSd 12rU3oA9voB5yV3ESPfrn2DvtGpggABx9sZGHd6+Md8I9rJLHnmu80ujbPHElqINjBbam8r9X veFLqXWwvd5NJm6LuKbwY+6NHpVz3AgW9G2MssUtN52sdUCbo6dzHnRwVYImTAoc8FThgmZwN s7jl4ddRMFrFK7yTMPU28XkTYtbV0gFWMKS70w1rq+mjLRnbnQsGCy6l6OB6zUDQOPZYChNod N9ETyWha4cZoSDyIpM4mFAQ/2spl2Um+BJoR3x9lyD/z9v4YiDhBpe/OoPO2EPd1/QkxXEwjB /FD1YZ729qKzBjEIog8iFMgOfHy0vKvvQklfgzXDdXJI8gNiHh1Jv5jf5HWewjou06iUE0FCc nYfukQCSVWJEOv6ygo9WttlIhEgEZwF8N/dyXYrz+qbxq+G916Vda2ks4Fg= X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181206_102929_161920_5031948F X-CRM114-Status: GOOD ( 11.82 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devel@driverdev.osuosl.org, Stefan Wahren , Takashi Iwai , Eric Anholt , linux-arm-kernel@lists.infradead.org, Dave Stevenson , Nicolas Saenz Julienne MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP There is not much value behind this boilerplate, so use module_platform_driver() instead. Signed-off-by: Stefan Wahren Reviewed-by: Nicolas Saenz Julienne --- .../staging/vc04_services/bcm2835-audio/bcm2835.c | 20 +------------------- 1 file changed, 1 insertion(+), 19 deletions(-) diff --git a/drivers/staging/vc04_services/bcm2835-audio/bcm2835.c b/drivers/staging/vc04_services/bcm2835-audio/bcm2835.c index e14b7c5..86b9210 100644 --- a/drivers/staging/vc04_services/bcm2835-audio/bcm2835.c +++ b/drivers/staging/vc04_services/bcm2835-audio/bcm2835.c @@ -354,25 +354,7 @@ static struct platform_driver bcm2835_alsa_driver = { .of_match_table = snd_bcm2835_of_match_table, }, }; - -static int bcm2835_alsa_device_init(void) -{ - int retval; - - retval = platform_driver_register(&bcm2835_alsa_driver); - if (retval) - pr_err("Error registering bcm2835_audio driver %d .\n", retval); - - return retval; -} - -static void bcm2835_alsa_device_exit(void) -{ - platform_driver_unregister(&bcm2835_alsa_driver); -} - -late_initcall(bcm2835_alsa_device_init); -module_exit(bcm2835_alsa_device_exit); +module_platform_driver(bcm2835_alsa_driver); MODULE_AUTHOR("Dom Cobley"); MODULE_DESCRIPTION("Alsa driver for BCM2835 chip"); From patchwork Thu Dec 6 18:28:58 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Wahren X-Patchwork-Id: 10716579 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 21BD615A6 for ; Thu, 6 Dec 2018 18:30:42 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 137112F115 for ; Thu, 6 Dec 2018 18:30:42 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id EBE082F11C; Thu, 6 Dec 2018 18:30:41 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 6E2762F115 for ; Thu, 6 Dec 2018 18:30:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=AkoikDyore70f2ZldSEgv5XZG+Q9L1Y96b70fKGS3SE=; b=iDbsRb3Xdn/FRodKnpZfSbAv37 uW5oCZPtlzKX57sTM5IFsm+G1YKwCuja/1aB9Dr0g/zhkTAY4Zta8kOqAerwSILzBismLCuW3R2TQ 7Qj6SHgDg6D/II+Ok7OzXWgzh3Y7fsUwK6FzH402ZD4YoArsbxhPJrR+aq/uvm/FoKugmrhOoHkXI 3UkP/xhVZp3TEYButtsI1Ca/VprKRvFLtj5U7yDUU5QMqtiYlFUraIGR6XrbffvlpYKjsCCX0mLlK NdgQZtxisCAjyV8/vAWlOX1r5gux1++GhoLRllRv8GyLtYMiXmMCB4LG32vylitbQ4OLLkfAOQuaf lhb5MMmA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1gUyQ0-00075r-E1; Thu, 06 Dec 2018 18:30:36 +0000 Received: from mout.kundenserver.de ([212.227.126.135]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gUyOu-0004oo-Sj for linux-arm-kernel@lists.infradead.org; Thu, 06 Dec 2018 18:29:32 +0000 Received: from localhost.localdomain ([37.4.249.153]) by mrelayeu.kundenserver.de (mreue012 [212.227.15.167]) with ESMTPSA (Nemesis) id 1M4384-1gUyOb1hxI-0007R8; Thu, 06 Dec 2018 19:29:09 +0100 From: Stefan Wahren To: Greg Kroah-Hartman Subject: [PATCH 08/10] staging: bcm2835-audio: Drop DT dependency Date: Thu, 6 Dec 2018 19:28:58 +0100 Message-Id: <1544120940-13716-9-git-send-email-stefan.wahren@i2se.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1544120940-13716-1-git-send-email-stefan.wahren@i2se.com> References: <1544120940-13716-1-git-send-email-stefan.wahren@i2se.com> X-Provags-ID: V03:K1:g3/xPB2IGZVn+TfoSW6YeKqg/QZWyo3+WnfD5hMil16XKJT8KQi ZnWxlb9dCq5D6jfzCupxInfvIt1pUOWL9/pZmLG+hxnT9W10AlGf8twztuLpLuTACbMeNAc GY5m6/Z3ryJR0gqgwm5c6p2LVZ6y9a2VHAN8YFhhY9mNvb6BTgPtRxsSzNKAnlCnj0UWsX5 s8vc4OnI5VjtEOOKgVLGw== X-UI-Out-Filterresults: notjunk:1;V03:K0:0iYxVdPIVdk=:HAlGrHHchaRyyrfjyGwlYb oPeYsCuJmPYI1bNk1zUezvTfjOY28UtFbhg1ztPSyv8FvLYdn6PQnL5tAByiqICb8QeQNLLl8 0JDJavX3eo/Sh5hNCgh3oEr9peNhNEd0tPxszrfdncXZQ5i24J2KGGvqPdQbSeZ0vcwoQPnSu K0uACd/Xlavb+0sJ7xbILK/r371T9WuluAaygeCudjYOcd9GVDTVEm25IautVI575AGJHBJuy hKI9dO2Pz3iZR3aDo30ey1cZxbI4SsZfJo/Ki1+BsnFzH1TLNXWGmk9PexKPHcQ+Nqw5aH0Gh tml77k2Ch4dZlTQMZvpe4RP8SBFZN8NVAPATGNbvrbodJ7BRcm8Z/iWF1hsV+0p4s/75qlxI6 vwfT3wSdKPbWGmSEeJfCDl43FGJRL0Z4YKhcAuJ/PQRGcBNlxjbBJ/+49GgxsPpfug8gE4VNk 97S5hfsHC/01DErNIM96HuWRC/gtLWtT4fyGGO2skHvyolLbZ4KRCzY0QPeble0xJ0fLDEEUw 8KI8fDr4ZjCWwpdzIkerx4vHHwptIyHUWkGcF3qx50SEJeZX4mDacG9SFcYb7UidwBcqSUeVg gayfQwvNQtitliyy6HTtLbrQiLtNu45y7WPqFaCpioNhMNn3NL3iyyWIOf2vgYrdH7F5kWBR5 7KMQRGCQUUuKDFQNPYbTXXoOzWPBYFuJfMU621HNDjOXQyNwIRRER6CR8KPMRRLzCZ+EjQ+ZN 6h7kKjZ98di8DoS1q/yCvrEyg4xN/WqxPbkUukqBtndxGAhulwFrbdFtvL4= X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181206_102929_300727_3B98F1C8 X-CRM114-Status: GOOD ( 14.90 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devel@driverdev.osuosl.org, Stefan Wahren , Takashi Iwai , Eric Anholt , linux-arm-kernel@lists.infradead.org, Dave Stevenson , Nicolas Saenz Julienne MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Just like the bcm2835-video make this a platform driver which is probed by vchiq. In order to change the number of channels use a module parameter instead, but use the maximum as default. Signed-off-by: Stefan Wahren Reviewed-by: Nicolas Saenz Julienne --- .../staging/vc04_services/bcm2835-audio/bcm2835.c | 31 +++++++--------------- 1 file changed, 9 insertions(+), 22 deletions(-) diff --git a/drivers/staging/vc04_services/bcm2835-audio/bcm2835.c b/drivers/staging/vc04_services/bcm2835-audio/bcm2835.c index 86b9210..cf5f80f 100644 --- a/drivers/staging/vc04_services/bcm2835-audio/bcm2835.c +++ b/drivers/staging/vc04_services/bcm2835-audio/bcm2835.c @@ -6,13 +6,13 @@ #include #include #include -#include #include "bcm2835.h" static bool enable_hdmi; static bool enable_headphones; static bool enable_compat_alsa = true; +static int num_channels = MAX_SUBSTREAMS; module_param(enable_hdmi, bool, 0444); MODULE_PARM_DESC(enable_hdmi, "Enables HDMI virtual audio device"); @@ -21,6 +21,8 @@ MODULE_PARM_DESC(enable_headphones, "Enables Headphones virtual audio device"); module_param(enable_compat_alsa, bool, 0444); MODULE_PARM_DESC(enable_compat_alsa, "Enables ALSA compatibility virtual audio device"); +module_param(num_channels, int, 0644); +MODULE_PARM_DESC(num_channels, "Number of audio channels (default: 8)"); static void bcm2835_devm_free_vchi_ctx(struct device *dev, void *res) { @@ -294,28 +296,19 @@ static int snd_add_child_devices(struct device *device, u32 numchans) static int snd_bcm2835_alsa_probe(struct platform_device *pdev) { struct device *dev = &pdev->dev; - u32 numchans; int err; - err = of_property_read_u32(dev->of_node, "brcm,pwm-channels", - &numchans); - if (err) { - dev_err(dev, "Failed to get DT property 'brcm,pwm-channels'"); - return err; - } - - if (numchans == 0 || numchans > MAX_SUBSTREAMS) { - numchans = MAX_SUBSTREAMS; - dev_warn(dev, - "Illegal 'brcm,pwm-channels' value, will use %u\n", - numchans); + if (num_channels <= 0 || num_channels > MAX_SUBSTREAMS) { + num_channels = MAX_SUBSTREAMS; + dev_warn(dev, "Illegal num_channels value, will use %u\n", + num_channels); } err = bcm2835_devm_add_vchi_ctx(dev); if (err) return err; - err = snd_add_child_devices(dev, numchans); + err = snd_add_child_devices(dev, num_channels); if (err) return err; @@ -337,12 +330,6 @@ static int snd_bcm2835_alsa_resume(struct platform_device *pdev) #endif -static const struct of_device_id snd_bcm2835_of_match_table[] = { - { .compatible = "brcm,bcm2835-audio",}, - {}, -}; -MODULE_DEVICE_TABLE(of, snd_bcm2835_of_match_table); - static struct platform_driver bcm2835_alsa_driver = { .probe = snd_bcm2835_alsa_probe, #ifdef CONFIG_PM @@ -351,7 +338,6 @@ static struct platform_driver bcm2835_alsa_driver = { #endif .driver = { .name = "bcm2835_audio", - .of_match_table = snd_bcm2835_of_match_table, }, }; module_platform_driver(bcm2835_alsa_driver); @@ -359,3 +345,4 @@ module_platform_driver(bcm2835_alsa_driver); MODULE_AUTHOR("Dom Cobley"); MODULE_DESCRIPTION("Alsa driver for BCM2835 chip"); MODULE_LICENSE("GPL"); +MODULE_ALIAS("platform:bcm2835_audio"); From patchwork Thu Dec 6 18:28:59 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Wahren X-Patchwork-Id: 10716585 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id CD6DD1923 for ; Thu, 6 Dec 2018 18:31:24 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C05672F0FC for ; Thu, 6 Dec 2018 18:31:24 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B51642F115; Thu, 6 Dec 2018 18:31:24 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 139602F194 for ; Thu, 6 Dec 2018 18:31:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=K2m06hzFsVQA5rkvs4slh0L8Qi13p4h5MT5vroDVvBU=; b=RdtitsZ+2TDa7iNTFwVIZyZrKY u3mqwZDT01AsskN/TOemZ6/yNi9Y7dZ+OlYQOn/Mcdc3T5iDY4pIxPtwEIGqhX+IYilsYkAEI8EiD 5ppUD1r52GayYEaQtAAdXCQ5nwUGEIyOSGqQh4jtKnFK0mFoJHO8pYVC1og5m69ifTDshfnnW+PXl pxGpQZ6aqB8gRlQQQhRX9SB9cVApW6VNIPRBTHP1HwyjMvC/W2THVyPu7+7o729pXYnSZtwRxqgMb S6ZefQIqtJX4k8M9hlccNUfLmqr6GX8iC/upVDU8IIU+7nasA0m2F1QLFZZwmYnUgvMAV+Kp9erh/ Xdq5k13w==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1gUyQh-0007py-LH; Thu, 06 Dec 2018 18:31:19 +0000 Received: from mout.kundenserver.de ([212.227.126.134]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gUyOv-0004oq-8A for linux-arm-kernel@lists.infradead.org; Thu, 06 Dec 2018 18:29:34 +0000 Received: from localhost.localdomain ([37.4.249.153]) by mrelayeu.kundenserver.de (mreue012 [212.227.15.167]) with ESMTPSA (Nemesis) id 1MQy0N-1gsIXC36UJ-00Nz33; Thu, 06 Dec 2018 19:29:09 +0100 From: Stefan Wahren To: Greg Kroah-Hartman Subject: [PATCH 09/10] staging: bcm2835-camera: Provide more specific probe error messages Date: Thu, 6 Dec 2018 19:28:59 +0100 Message-Id: <1544120940-13716-10-git-send-email-stefan.wahren@i2se.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1544120940-13716-1-git-send-email-stefan.wahren@i2se.com> References: <1544120940-13716-1-git-send-email-stefan.wahren@i2se.com> X-Provags-ID: V03:K1:foBtAdjdHW16fFFyLo30gcfAhdS2GSIEQlTliUpkODAm+OBYsOc nqYCzY2yBIeH4BB4Uxzrl8ivfocVXM2459vrB2uhwLLZX0dboSNRHYGriym1Y3qLHHurr0N UC9r3RD6/WShCjTk6zahF9wq5raNMKzLO371AGX/2CKk0n+o3yn64u35UL2Iyo3OHXmc3Fx x+jUCKKTZz23pjCt6RquA== X-UI-Out-Filterresults: notjunk:1;V03:K0:RdQLuEGBtSE=:J5MVcEG2vm8hRT48fvLIr/ 94t9J11n5cczuro7qbHIIs1x5wHnz0iZDDoc//XamjKst7ZSUH2X2TUz8Z50+WzFEr14eCr7E y5DJoMzMO5HISHCINF9ZGkey+/1wVCuCeIh80K2YZ94H7EtSajUViQXnTmdM8iDbku+4MaEsp srjHpotMcrHVYd5PHaKbLV+yRzBfzovypyUsYHUP6A5X40/iDdG035Yc9GH6eif2z+lrbIhv0 R28o+vFBen4sLvAYSEzRu3PCA0fcE9HHvXCM1DWqgEqZdBkExvcY9aDown4hhyszJ2ma7MnyO LvE2PeHmsn1lUuYuf5+nhGn36IIJL0di0NXl7D1glG5gT4a6z6h9GV0v8+dkyfCXClAT48JYB Rw3f7X6vtTJTyRtaQc+AupH6lZbV0YqDeXJr89S5K2/6K8B+WdLG/nrX5LiUUfV47fdOAskmo E8Wzhm/P5ETln90NOgi7KeyGdfvtub2pON4MNgAJ88YLwEr4lIYZnVWXF0TFXm9ai4nAl0xz6 vj3Z6NUUL1ix8yA5Kwtg2D5LgZpkYgR2t3D+YnsgeuPQ98hydstU0z9fsG9QiRGBCqQ8nKp8M 3fM53rjdtrGukurTQ2Kd8pmhCvSn+E+qCoG23gitqnGzVBFw1aW+yo85GcKaCcihTOVYXzI73 GbmYRNwm9j2Z6wgXYfkTEfpTP5/vIdazuo5JqiS87UdOJukSRIxFz219ruJnNZyeMF0tBczB6 k+jGTs2TKECbNLSIxOxQ9oPGNpPADuIsn9MNfEQTXH1YYBCaTXvd/r7rvJ8= X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181206_102929_592348_07C295DD X-CRM114-Status: GOOD ( 16.02 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devel@driverdev.osuosl.org, Stefan Wahren , Takashi Iwai , Eric Anholt , linux-arm-kernel@lists.infradead.org, Dave Stevenson , Nicolas Saenz Julienne MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Currently there is only a catch-all info message which print the relevant error code without any context. So add more specific error messages in order to narrow down possible issues. Signed-off-by: Stefan Wahren Reviewed-by: Nicolas Saenz Julienne --- .../vc04_services/bcm2835-camera/bcm2835-camera.c | 58 +++++++++++++++------- 1 file changed, 39 insertions(+), 19 deletions(-) diff --git a/drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.c b/drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.c index cd773eb..611a6ee 100644 --- a/drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.c +++ b/drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.c @@ -1539,8 +1539,11 @@ static int mmal_init(struct bm2835_mmal_dev *dev) struct vchiq_mmal_component *camera; ret = vchiq_mmal_init(&dev->instance); - if (ret < 0) + if (ret < 0) { + v4l2_err(&dev->v4l2_dev, "%s: vchiq mmal init failed %d\n", + __func__, ret); return ret; + } /* get the camera component ready */ ret = vchiq_mmal_component_init(dev->instance, "ril.camera", @@ -1549,7 +1552,9 @@ static int mmal_init(struct bm2835_mmal_dev *dev) goto unreg_mmal; camera = dev->component[MMAL_COMPONENT_CAMERA]; - if (camera->outputs < MMAL_CAMERA_PORT_COUNT) { + if (camera->outputs < MMAL_CAMERA_PORT_COUNT) { + v4l2_err(&dev->v4l2_dev, "%s: too few camera outputs %d needed %d\n", + __func__, camera->outputs, MMAL_CAMERA_PORT_COUNT); ret = -EINVAL; goto unreg_camera; } @@ -1557,8 +1562,11 @@ static int mmal_init(struct bm2835_mmal_dev *dev) ret = set_camera_parameters(dev->instance, camera, dev); - if (ret < 0) + if (ret < 0) { + v4l2_err(&dev->v4l2_dev, "%s: unable to set camera parameters: %d\n", + __func__, ret); goto unreg_camera; + } /* There was an error in the firmware that meant the camera component * produced BGR instead of RGB. @@ -1647,8 +1655,8 @@ static int mmal_init(struct bm2835_mmal_dev *dev) if (dev->component[MMAL_COMPONENT_PREVIEW]->inputs < 1) { ret = -EINVAL; - pr_debug("too few input ports %d needed %d\n", - dev->component[MMAL_COMPONENT_PREVIEW]->inputs, 1); + v4l2_err(&dev->v4l2_dev, "%s: too few input ports %d needed %d\n", + __func__, dev->component[MMAL_COMPONENT_PREVIEW]->inputs, 1); goto unreg_preview; } @@ -1661,8 +1669,8 @@ static int mmal_init(struct bm2835_mmal_dev *dev) if (dev->component[MMAL_COMPONENT_IMAGE_ENCODE]->inputs < 1) { ret = -EINVAL; - v4l2_err(&dev->v4l2_dev, "too few input ports %d needed %d\n", - dev->component[MMAL_COMPONENT_IMAGE_ENCODE]->inputs, + v4l2_err(&dev->v4l2_dev, "%s: too few input ports %d needed %d\n", + __func__, dev->component[MMAL_COMPONENT_IMAGE_ENCODE]->inputs, 1); goto unreg_image_encoder; } @@ -1676,8 +1684,8 @@ static int mmal_init(struct bm2835_mmal_dev *dev) if (dev->component[MMAL_COMPONENT_VIDEO_ENCODE]->inputs < 1) { ret = -EINVAL; - v4l2_err(&dev->v4l2_dev, "too few input ports %d needed %d\n", - dev->component[MMAL_COMPONENT_VIDEO_ENCODE]->inputs, + v4l2_err(&dev->v4l2_dev, "%s: too few input ports %d needed %d\n", + __func__, dev->component[MMAL_COMPONENT_VIDEO_ENCODE]->inputs, 1); goto unreg_vid_encoder; } @@ -1706,8 +1714,11 @@ static int mmal_init(struct bm2835_mmal_dev *dev) sizeof(enable)); } ret = bm2835_mmal_set_all_camera_controls(dev); - if (ret < 0) + if (ret < 0) { + v4l2_err(&dev->v4l2_dev, "%s: failed to set all camera controls: %d\n", + __func__, ret); goto unreg_vid_encoder; + } return 0; @@ -1873,21 +1884,29 @@ static int bcm2835_mmal_probe(struct platform_device *pdev) snprintf(dev->v4l2_dev.name, sizeof(dev->v4l2_dev.name), "%s", BM2835_MMAL_MODULE_NAME); ret = v4l2_device_register(NULL, &dev->v4l2_dev); - if (ret) + if (ret) { + dev_err(&pdev->dev, "%s: could not register V4L2 device: %d\n", + __func__, ret); goto free_dev; + } /* setup v4l controls */ ret = bm2835_mmal_init_controls(dev, &dev->ctrl_handler); - if (ret < 0) + if (ret < 0) { + v4l2_err(&dev->v4l2_dev, "%s: could not init controls: %d\n", + __func__, ret); goto unreg_dev; + } dev->v4l2_dev.ctrl_handler = &dev->ctrl_handler; /* mmal init */ dev->instance = instance; ret = mmal_init(dev); - if (ret < 0) + if (ret < 0) { + v4l2_err(&dev->v4l2_dev, "%s: mmal init failed: %d\n", + __func__, ret); goto unreg_dev; - + } /* initialize queue */ q = &dev->capture.vb_vidq; memset(q, 0, sizeof(*q)); @@ -1905,16 +1924,19 @@ static int bcm2835_mmal_probe(struct platform_device *pdev) /* initialise video devices */ ret = bm2835_mmal_init_device(dev, &dev->vdev); - if (ret < 0) + if (ret < 0) { + v4l2_err(&dev->v4l2_dev, "%s: could not init device: %d\n", + __func__, ret); goto unreg_dev; + } /* Really want to call vidioc_s_fmt_vid_cap with the default * format, but currently the APIs don't join up. */ ret = mmal_setup_components(dev, &default_v4l2_format); if (ret < 0) { - v4l2_err(&dev->v4l2_dev, - "%s: could not setup components\n", __func__); + v4l2_err(&dev->v4l2_dev, "%s: could not setup components: %d\n", + __func__, ret); goto unreg_dev; } @@ -1938,8 +1960,6 @@ static int bcm2835_mmal_probe(struct platform_device *pdev) bcm2835_cleanup_instance(gdev[i]); gdev[i] = NULL; } - pr_info("%s: error %d while loading driver\n", - BM2835_MMAL_MODULE_NAME, ret); cleanup_mmal: vchiq_mmal_finalise(instance); From patchwork Thu Dec 6 18:29:00 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Wahren X-Patchwork-Id: 10716591 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 2E1C9109C for ; Thu, 6 Dec 2018 18:32:13 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1F9072F185 for ; Thu, 6 Dec 2018 18:32:13 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 13B7A2F1D1; Thu, 6 Dec 2018 18:32:13 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id B41F72F185 for ; Thu, 6 Dec 2018 18:32:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=F6IEawwJwtZYqanFtZWvzEm0v1/iZEV0aVOBP8OFxjo=; b=TouQ5cxPKCCBLIm6VlQK9Punu9 6EFXMyaxnw0vrflA1POu4fqWAO6XeYfZ3nyZ6xp623Niq1s40h0zhbjBkQmebDxSFZmEoGOriQMhI Hzk683qoIMMRzcqwt3JpsCfYQmm056mKVyPK4yT1QZ4/FNXVvuOrCEVWWE39FgsM+OW0qLyVb/npm GDN4LLMtCEKL/QtrSoD+OsUAna5s1JNEvq6LawannQkDQAH+dF9bc5Jxv4TrKnNHx3r8vKiRaFSCL IUQLPdtYpBIq6psL7BF8eMAMkkiG8Ah/jUYhAy6emjyqt9mIR3GZNzRJOlCjRRx5LunOpKOENpKgQ oEaKVtKQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1gUyRV-0000AS-O8; Thu, 06 Dec 2018 18:32:09 +0000 Received: from mout.kundenserver.de ([212.227.126.187]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gUyOx-0004ow-IB for linux-arm-kernel@lists.infradead.org; Thu, 06 Dec 2018 18:29:35 +0000 Received: from localhost.localdomain ([37.4.249.153]) by mrelayeu.kundenserver.de (mreue012 [212.227.15.167]) with ESMTPSA (Nemesis) id 1MW9zm-1gy1Yi0U8I-00XZQ4; Thu, 06 Dec 2018 19:29:10 +0100 From: Stefan Wahren To: Greg Kroah-Hartman Subject: [PATCH 10/10] staging: bcm2835-camera: Add hint about possible faulty config Date: Thu, 6 Dec 2018 19:29:00 +0100 Message-Id: <1544120940-13716-11-git-send-email-stefan.wahren@i2se.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1544120940-13716-1-git-send-email-stefan.wahren@i2se.com> References: <1544120940-13716-1-git-send-email-stefan.wahren@i2se.com> X-Provags-ID: V03:K1:bFbhHBlh0Cu3o2Sb1PomtWj0Qs6eFQK8I4iv9TBUzu/EazXbwBS 2KhcS/EPgxlxTIACQuJVYPora4jPQ4V8GvMqbf7ggSI7G/1kZHlyYs7TZKAGgbBnKfQHq0p L2/E+TGoIxv3zU9b92d5E5d7hCo3r5/Dte3df28UNG0VxYJ4mfcUZXTfpl0WSPNM/vV67X0 2snQbyBT+A0McVIg0cahA== X-UI-Out-Filterresults: notjunk:1;V03:K0:orSZP+W48ac=:nADR6WKxBEDTXHFzLVWBHV Nb3AttcR7Ol8b4ngUHD8ssYECY49EyyVD9yarYqXn7o0lHDqPNl9F2ouL/W4K4d8zTprsQq5H Gr15uameq6Korbeee8GXj3XJ5Bs+twT2QE+oSeuK7vjwQsmDVl1+qujM3+6ru3nE/ZdZeCPcf JB3MOBcOgai03QaT4uq42y10/cE0akFPoP3+xXSejs/Pylx4VKehuLwNlrFG4mQfwCMPjlEn9 djdPOb4+m6cfhpMJIKu3E+Dm9FgT/vgxHa4Rkg16GKtWyb4Mtyf68ncQ39yQqaIpRdmoGPIvv Vb6f6p6wPT1yHm+K2sNh8n+airn7mNhgFgXs/LImW1pce9ucehEFz+fwqRl+Iim4vsYyXsw+H YC4dX7MRU1I3q7TLix58h/5HlmP/l0aG1tk5GTA4c07EOFD55p/PAtOKwXU7OquFKtc9PS/iI 0bEtR/zXS/eAbyWJGV0P1zb54+6yKa+twgeKxTGl/L7JYiNQ8ArV9wETUBL6iI1rC3O2J4JCD KrZvPYYCXdXhnZSfe1VVK+5ui5awcp+hhSeS9SZhnijrcfAx6Rau15kFGDbGeAGFOM02oNNCW lg1rigXjiKWTcVo4wDIIzGW5QkPtQCbhpAuo+R1YKM+D/tTwFdEygEIwIBH5LQPcybkaywAwu glCFkrrPWfNxCsROsl3QhsmVYcumyVAYFxmMlJ2GXIUPfJGfAxKYVJOQz4HzBnEVXLpLUXe6w WW4NxD+K1lTKBwi65R9hTQeaLacwP5x196ZyGoIqaye6N6wg6J2Y+bqDijI= X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181206_102931_897316_B93ACF27 X-CRM114-Status: GOOD ( 13.20 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devel@driverdev.osuosl.org, Stefan Wahren , Takashi Iwai , Eric Anholt , linux-arm-kernel@lists.infradead.org, Dave Stevenson , Nicolas Saenz Julienne MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP As per default the GPU memory config of the Raspberry Pi isn't sufficient for the camera usage. Even worse the bcm2835 camera driver doesn't provide a helpful error message in this case. So let's add a hint to point the user to the likely cause. Signed-off-by: Stefan Wahren Reviewed-by: Nicolas Saenz Julienne --- drivers/staging/vc04_services/bcm2835-camera/mmal-vchiq.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/staging/vc04_services/bcm2835-camera/mmal-vchiq.c b/drivers/staging/vc04_services/bcm2835-camera/mmal-vchiq.c index cc2d993..bffd75d 100644 --- a/drivers/staging/vc04_services/bcm2835-camera/mmal-vchiq.c +++ b/drivers/staging/vc04_services/bcm2835-camera/mmal-vchiq.c @@ -1623,8 +1623,11 @@ int vchiq_mmal_component_init(struct vchiq_mmal_instance *instance, component = &instance->component[instance->component_idx]; ret = create_component(instance, component, name); - if (ret < 0) + if (ret < 0) { + pr_err("%s: failed to create component %d (Not enough GPU mem?)\n", + __func__, ret); goto unlock; + } /* ports info needs gathering */ component->control.type = MMAL_PORT_TYPE_CONTROL;