From patchwork Fri Jan 20 20:10:59 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Umang Jain X-Patchwork-Id: 46614 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp404036wrn; Fri, 20 Jan 2023 12:12:10 -0800 (PST) X-Google-Smtp-Source: AMrXdXveOpO6N2h6wVqQcRSCY/9PtK53VoPFGP7pPk04mq+5XjjpvxEs+J2Ro00zzA3qyOYqUPDZ X-Received: by 2002:a05:6a20:c990:b0:a4:aa40:2253 with SMTP id gy16-20020a056a20c99000b000a4aa402253mr13536444pzb.21.1674245530271; Fri, 20 Jan 2023 12:12:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1674245530; cv=none; d=google.com; s=arc-20160816; b=B/yeTNEiC5EUzK1Ob+a4N/WW17/acr1qeepo3q61TdpPM1V/gL6NneRjzQKk+ebnh2 VtGECWbg4i9tbqZangJ696dSInvEZk5tpKwx4ZCGL+W+WIIjQ+s/skAemHBFuytAaT7/ 5eHSAi6+DtBO2QpLYAkgT4CLvOe2ixSJn0byxKcAH55tLJq0adMMZfo3PpGCFnVyWfro ECwPTqrGYZwOgWSJ40R9AniORpNoiwgTtju6X0Gn2x42hzAB8hohwl+OnG2k4sG1odPQ icdtnvTOyf4VTm7SOQQ8INtV7mkbhUCkqPZ5o+Po+DjUV/yjQAbNRq3ie9dr5lFxGzLB TUfw== 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=2WCkK36UOgzcoVnxKVbzMg+mhXeSZ0+Nm4cBHMJddc8=; b=I7H2BOMF0zpXTXuRuXKB6adW6Zh+PV9k6K7Y4Uab4vEVwnTpBwpEMiaDXTNvUf60I1 6FJC0NloW7ReXFfB538zrpNtICbTA9aN/ixEHtVj3FiaawgGaSLwWrUBs8bsxlrYTg/m cDMAait4nqNBfIkf8qESPN1FXyaxl8kuWveYSH64z4ylHh+RrmobTHXBaSKCzZt45dQD Ama3Rf7mvHI4aN3+Zt+mKOJkHLzQtmFrWYjN4SuABP1lVOVQKzFlBWwgOkJ2sZfBt95J R0nBr4HoTqP2WafVgYeb3HCGyYilLrjsMDhY+tY+1BZgs3gYu6mZM4F/zMqTVKUK+ziL hbog== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass (test mode) header.i=@ideasonboard.com header.s=mail header.b=iOxKrguM; 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: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id l64-20020a639143000000b004c0b118aba6si23940353pge.270.2023.01.20.12.11.58; Fri, 20 Jan 2023 12:12:10 -0800 (PST) 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=iOxKrguM; 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 S229667AbjATUL3 (ORCPT + 99 others); Fri, 20 Jan 2023 15:11:29 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55822 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229776AbjATUL1 (ORCPT ); Fri, 20 Jan 2023 15:11:27 -0500 Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AF1B9BD163; Fri, 20 Jan 2023 12:11:24 -0800 (PST) Received: from umang.jainideasonboard.com (unknown [103.251.226.6]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 2DB36558; Fri, 20 Jan 2023 21:11:16 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1674245482; bh=k77WTxAn/feFnTF+zmqDuZWd/SZKbGH7e+gY4VOai8Q=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=iOxKrguMlsRMJkNG6dE2FkEIoYWJSd5w/ONgleoVLQnA4Rp0+B5o6W3actR1vyBL+ KAhzlrQECQ8P1+9qyuZYDV7Ec5xu1s3JX1HkWaS891ZpmVUfoj8U/Q7wB69jr3Rz6v xvjquxNJSpMVQKH7UW5/0NU1xpcDpo4pgIw6YKVo= From: Umang Jain To: 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 Cc: Stefan Wahren , Greg Kroah-Hartman , Florian Fainelli , Adrien Thierry , Dan Carpenter , Dave Stevenson , Kieran Bingham , Laurent Pinchart , Paul Elder , Umang Jain Subject: [PATCH v6 1/6] staging: vc04_services: Drop __VCCOREVER__ remnants Date: Sat, 21 Jan 2023 01:40:59 +0530 Message-Id: <20230120201104.606876-2-umang.jain@ideasonboard.com> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230120201104.606876-1-umang.jain@ideasonboard.com> References: <20230120201104.606876-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-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1755573681163065208?= X-GMAIL-MSGID: =?utf-8?q?1755573681163065208?= Commit 8ba5f91bab63 ("staging: vc04_services: remove __VCCOREVER__") was meant to remove all of __VCCOREVER__ definitions but missed to remove a few. Hence, drop them now. Signed-off-by: Umang Jain Reviewed-by: Laurent Pinchart --- drivers/staging/vc04_services/bcm2835-audio/Makefile | 2 +- drivers/staging/vc04_services/bcm2835-camera/Makefile | 3 +-- drivers/staging/vc04_services/vchiq-mmal/Makefile | 3 +-- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/drivers/staging/vc04_services/bcm2835-audio/Makefile b/drivers/staging/vc04_services/bcm2835-audio/Makefile index d59fe4dde615..fc7ac6112a3e 100644 --- a/drivers/staging/vc04_services/bcm2835-audio/Makefile +++ b/drivers/staging/vc04_services/bcm2835-audio/Makefile @@ -2,4 +2,4 @@ obj-$(CONFIG_SND_BCM2835) += snd-bcm2835.o snd-bcm2835-objs := bcm2835.o bcm2835-ctl.o bcm2835-pcm.o bcm2835-vchiq.o -ccflags-y += -I $(srctree)/$(src)/../include -D__VCCOREVER__=0x04000000 +ccflags-y += -I $(srctree)/$(src)/../include diff --git a/drivers/staging/vc04_services/bcm2835-camera/Makefile b/drivers/staging/vc04_services/bcm2835-camera/Makefile index 3a76d6ade428..3494c82b271a 100644 --- a/drivers/staging/vc04_services/bcm2835-camera/Makefile +++ b/drivers/staging/vc04_services/bcm2835-camera/Makefile @@ -7,5 +7,4 @@ obj-$(CONFIG_VIDEO_BCM2835) += bcm2835-v4l2.o ccflags-y += \ -I $(srctree)/$(src)/.. \ - -I $(srctree)/$(src)/../vchiq-mmal/ \ - -D__VCCOREVER__=0x04000000 + -I $(srctree)/$(src)/../vchiq-mmal/ diff --git a/drivers/staging/vc04_services/vchiq-mmal/Makefile b/drivers/staging/vc04_services/vchiq-mmal/Makefile index b2a830f48acc..c7d3b06e17ce 100644 --- a/drivers/staging/vc04_services/vchiq-mmal/Makefile +++ b/drivers/staging/vc04_services/vchiq-mmal/Makefile @@ -5,5 +5,4 @@ obj-$(CONFIG_BCM2835_VCHIQ_MMAL) += bcm2835-mmal-vchiq.o ccflags-y += \ -I$(srctree)/$(src)/.. \ - -I$(srctree)/$(src)/../include \ - -D__VCCOREVER__=0x04000000 + -I$(srctree)/$(src)/../include From patchwork Fri Jan 20 20:11:00 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Umang Jain X-Patchwork-Id: 46615 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp404321wrn; Fri, 20 Jan 2023 12:12:44 -0800 (PST) X-Google-Smtp-Source: AMrXdXuCHEynvV+bM4lYlQr1GtIRAOZK0VcbnXV5lzbS1BL89n+V4Yysseu5zEIAub5G/frsi5T2 X-Received: by 2002:a17:906:1851:b0:7b8:882d:43ef with SMTP id w17-20020a170906185100b007b8882d43efmr21529687eje.0.1674245564085; Fri, 20 Jan 2023 12:12:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1674245564; cv=none; d=google.com; s=arc-20160816; b=r8BM2i8eM5p/7M9//uEXkxkuAUkoIx7hoakeD7nwafMw9p4k8GwphPIJMrcd4BQYH7 ei+rNPAsfQCwyqoADEyI7mRdyJXdGLOWGwxP1b1ao24wb9jd3vx1ZeNSS1RwY/16+0QE mw4QRfB6/JZyLJXmMa1fH8ZEAf8BKLqdoRotCgffb+rd8y9PMEf2OSTcb8xUsFmvXAZX LYs9tN1IusAzXVLhfcfN5NPBPGbgZTuv4I+r8O+PCqlOhoADiEgWoWMny1Xl3cfLnOcd 5KYavRJZOdbgrEnjwJp0c8Gac+o9163qEou0D31yWWhdXy7I0TZkEEoxuQnw02cTrNyq 7ECA== 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=V0jz9ofl9/dRXk+ECVDzls6hUzZ/WPqcFsky5wbswNs=; b=sAOcvMJKUX5ixLBFm7uSC+QBO4ESteg4vTfMj3XxlrCDvVQqoj2sJz6g6Wx1dancqR MZ8/Y2VbGWlTmcq5CRPJ5IzAOh7ueQ5arLpYi10xJdpTmYUWhdTV78ocJefEB/u/h34V Mx0dzn5iiZ0d/DGxZ5Cg+HCbX6HRX5bvTfFNsvIvxEHw8ImwrLLU1n/1nTVSnwVGFymF Ehqkkd17Q3feXQL8U4nDZo+Kvph/cS/ymiCh00GhM/P2/x0iXjqJ2hrZUehg4ia64FaY LPIN72r+Yr4/7jOaHU19Vrjnn3YVL6s1JU36/zZZFObOvYBKQ+NeOGYgZX88tj0KoI50 sZRA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass (test mode) header.i=@ideasonboard.com header.s=mail header.b="v/8dn6xJ"; 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: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id xj1-20020a170906db0100b007c1753251a4si19587774ejb.928.2023.01.20.12.12.20; Fri, 20 Jan 2023 12:12:44 -0800 (PST) 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="v/8dn6xJ"; 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 S230041AbjATULh (ORCPT + 99 others); Fri, 20 Jan 2023 15:11:37 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56108 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229944AbjATULd (ORCPT ); Fri, 20 Jan 2023 15:11:33 -0500 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 56A75BC8A3; Fri, 20 Jan 2023 12:11:29 -0800 (PST) Received: from umang.jainideasonboard.com (unknown [103.251.226.6]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id E0C23104C; Fri, 20 Jan 2023 21:11:22 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1674245487; bh=Zngsaz8GwwntFvLzEgh5Y8P+7IVbo+ADRxKcwraGzEY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=v/8dn6xJI/Mzj+iQlZxdBMqv4b3EKDKQ1Y1zkq6G00D0eDkmyAZy9LaTX8wHhPLA6 DZ188CMIyxxRKruhcSHQplKjYu11VHSquypetOGeNQVXbyAfAaqowfS/93AJ27RH6N nwUUQhrxeypcnK4EROcEBvLdrYKNNJ/UfBCJEdCA= From: Umang Jain To: 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 Cc: Stefan Wahren , Greg Kroah-Hartman , Florian Fainelli , Adrien Thierry , Dan Carpenter , Dave Stevenson , Kieran Bingham , Laurent Pinchart , Paul Elder , Umang Jain Subject: [PATCH v6 2/6] staging: vc04_services: bcm2835-audio: Drop include Makefile directive Date: Sat, 21 Jan 2023 01:41:00 +0530 Message-Id: <20230120201104.606876-3-umang.jain@ideasonboard.com> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230120201104.606876-1-umang.jain@ideasonboard.com> References: <20230120201104.606876-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-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1755573716630369274?= X-GMAIL-MSGID: =?utf-8?q?1755573716630369274?= Drop the include directive. They can break the build, when one only wants to build a subdirectory. Replace with "../" for the includes, in the bcm2835.h instead. Suggested-by: Greg Kroah-Hartman Signed-off-by: Umang Jain --- drivers/staging/vc04_services/bcm2835-audio/Makefile | 2 -- drivers/staging/vc04_services/bcm2835-audio/bcm2835.h | 3 ++- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/staging/vc04_services/bcm2835-audio/Makefile b/drivers/staging/vc04_services/bcm2835-audio/Makefile index fc7ac6112a3e..01ceebdf88e7 100644 --- a/drivers/staging/vc04_services/bcm2835-audio/Makefile +++ b/drivers/staging/vc04_services/bcm2835-audio/Makefile @@ -1,5 +1,3 @@ # SPDX-License-Identifier: GPL-2.0 obj-$(CONFIG_SND_BCM2835) += snd-bcm2835.o snd-bcm2835-objs := bcm2835.o bcm2835-ctl.o bcm2835-pcm.o bcm2835-vchiq.o - -ccflags-y += -I $(srctree)/$(src)/../include diff --git a/drivers/staging/vc04_services/bcm2835-audio/bcm2835.h b/drivers/staging/vc04_services/bcm2835-audio/bcm2835.h index 38b7451d77b2..0a81383c475a 100644 --- a/drivers/staging/vc04_services/bcm2835-audio/bcm2835.h +++ b/drivers/staging/vc04_services/bcm2835-audio/bcm2835.h @@ -6,11 +6,12 @@ #include #include -#include #include #include #include +#include "../include/linux/raspberrypi/vchiq.h" + #define MAX_SUBSTREAMS (8) #define AVAIL_SUBSTREAMS_MASK (0xff) From patchwork Fri Jan 20 20:11:01 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Umang Jain X-Patchwork-Id: 46616 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp404336wrn; Fri, 20 Jan 2023 12:12:47 -0800 (PST) X-Google-Smtp-Source: AMrXdXtWVSi/MrxwIBwtpmcl6PwNFXrWI6xZD/qwc/ZjivcDXDa2ZetFG+E19EXCF26D5dagd2yB X-Received: by 2002:a17:907:c99c:b0:7c0:d6ba:c934 with SMTP id uj28-20020a170907c99c00b007c0d6bac934mr10680796ejc.13.1674245567278; Fri, 20 Jan 2023 12:12:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1674245567; cv=none; d=google.com; s=arc-20160816; b=Q6HFKgsJShFy0YTBqQdY469iZ3HhiHgZbBSLnFQNPnpue742pbMqI7ZI9VVGdNWcIk 26tDFguWwsOMsltMtxXcogT3c4pSUXH5csDXt9hqYOq5E244mWHUByqNOXhCyGcZM+MM XDKR1zym2gh7QbwNcUbAFvSfpDwkvMzxpZCHbnon+yspb5OE02uTIEWiSfTpuMXHrSY8 CisJYwBCactyVxznnZCyllOgy9iElXczUsE02fGMdIhWbcpru4FcAxe8SkZO3GBrV057 9t2MCdlahrAORbJMJtDGePxLNd6RLen1dDd09EWrBM3x0lAgIorDzeeH4zLW09xRPE70 p46A== 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=BZMhQRR+8sxbDzeopux3+mkdLFL+9h9tfFrhC+w00so=; b=eONYv/6pW8rMyWumJ2+8ujDutWQ2Sn3d0fAycrd9XaOGWAB0b6R/lRM/h52UsuDFB8 SU4qpCvGJM6UXbbgMPBHlhUxwOo4pEFtNGIWQvzkLcXRCubqAzokxH63R2Q9PpPyM50q UpdFn1YvhHnLOyq5/8tYFvvKwqmfLMAiQ+EC3jnYBk0OgKl84hzPdqCE9dlDu2XBD1IO qkF3a1nquePytQJaOLVmE1Nf++4q4Fd4uaYFc9faypllWPrs7qQxDn1h5xl+QTHOJwo6 /MoKHsvH++X/OH730woheJYkhSZ2qbJuujiPWZFjSkKhS7c01//w+AYBy7QHySWSidlE bbiw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass (test mode) header.i=@ideasonboard.com header.s=mail header.b=I8jBM2xd; 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: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id he36-20020a1709073da400b0087203e71c56si16948388ejc.406.2023.01.20.12.12.23; Fri, 20 Jan 2023 12:12:47 -0800 (PST) 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=I8jBM2xd; 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 S229944AbjATULo (ORCPT + 99 others); Fri, 20 Jan 2023 15:11:44 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56126 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229841AbjATULm (ORCPT ); Fri, 20 Jan 2023 15:11:42 -0500 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 326E7BCE2F; Fri, 20 Jan 2023 12:11:34 -0800 (PST) Received: from umang.jainideasonboard.com (unknown [103.251.226.6]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 5E418514; Fri, 20 Jan 2023 21:11:28 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1674245492; bh=t1jVHnyjTLn+8diFp3kpC/3VLmeZuSUcT97KqhG2Zug=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=I8jBM2xdB6vt7LVScOWAqk5MQQ/p0vWs1BMoGg8Qs//sPGH6b1S5KxFSZhqLHhPOp rMgpZcuuFoIy291iGr/ETckrjUV5/CpHFTaGEwRjXaJ0vCMJ0dT9Sm+rqE/oZ8Fy+t FU2B1cgNj7DOQ27BwBD+H9gFIOwhZY1LOsNowjvA= From: Umang Jain To: 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 Cc: Stefan Wahren , Greg Kroah-Hartman , Florian Fainelli , Adrien Thierry , Dan Carpenter , Dave Stevenson , Kieran Bingham , Laurent Pinchart , Paul Elder , Umang Jain Subject: [PATCH v6 3/6] staging: vc04_services: bcm2835-camera: Drop include Makefile directive Date: Sat, 21 Jan 2023 01:41:01 +0530 Message-Id: <20230120201104.606876-4-umang.jain@ideasonboard.com> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230120201104.606876-1-umang.jain@ideasonboard.com> References: <20230120201104.606876-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-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1755573719838567812?= X-GMAIL-MSGID: =?utf-8?q?1755573719838567812?= Drop the include directive. They can break the build, when one only wants to build a subdirectory. Replace with "../" for the includes, in the bcm2835-camera files instead. Suggested-by: Greg Kroah-Hartman Signed-off-by: Umang Jain Reviewed-by: Laurent Pinchart --- drivers/staging/vc04_services/bcm2835-camera/Makefile | 4 ---- .../vc04_services/bcm2835-camera/bcm2835-camera.c | 10 +++++----- .../staging/vc04_services/bcm2835-camera/controls.c | 6 +++--- 3 files changed, 8 insertions(+), 12 deletions(-) diff --git a/drivers/staging/vc04_services/bcm2835-camera/Makefile b/drivers/staging/vc04_services/bcm2835-camera/Makefile index 3494c82b271a..203b93899b20 100644 --- a/drivers/staging/vc04_services/bcm2835-camera/Makefile +++ b/drivers/staging/vc04_services/bcm2835-camera/Makefile @@ -4,7 +4,3 @@ bcm2835-v4l2-$(CONFIG_VIDEO_BCM2835) := \ controls.o obj-$(CONFIG_VIDEO_BCM2835) += bcm2835-v4l2.o - -ccflags-y += \ - -I $(srctree)/$(src)/.. \ - -I $(srctree)/$(src)/../vchiq-mmal/ diff --git a/drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.c b/drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.c index 797ebe2a973a..4f81765912ea 100644 --- a/drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.c +++ b/drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.c @@ -26,11 +26,11 @@ #include #include -#include "mmal-common.h" -#include "mmal-encodings.h" -#include "mmal-vchiq.h" -#include "mmal-msg.h" -#include "mmal-parameters.h" +#include "../vchiq-mmal/mmal-common.h" +#include "../vchiq-mmal/mmal-encodings.h" +#include "../vchiq-mmal/mmal-vchiq.h" +#include "../vchiq-mmal/mmal-msg.h" +#include "../vchiq-mmal/mmal-parameters.h" #include "bcm2835-camera.h" #define MIN_WIDTH 32 diff --git a/drivers/staging/vc04_services/bcm2835-camera/controls.c b/drivers/staging/vc04_services/bcm2835-camera/controls.c index 5644d1d457b9..6bce45925bf1 100644 --- a/drivers/staging/vc04_services/bcm2835-camera/controls.c +++ b/drivers/staging/vc04_services/bcm2835-camera/controls.c @@ -23,9 +23,9 @@ #include #include -#include "mmal-common.h" -#include "mmal-vchiq.h" -#include "mmal-parameters.h" +#include "../vchiq-mmal/mmal-common.h" +#include "../vchiq-mmal/mmal-vchiq.h" +#include "../vchiq-mmal/mmal-parameters.h" #include "bcm2835-camera.h" /* The supported V4L2_CID_AUTO_EXPOSURE_BIAS values are from -4.0 to +4.0. From patchwork Fri Jan 20 20:11:02 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Umang Jain X-Patchwork-Id: 46618 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp404414wrn; Fri, 20 Jan 2023 12:13:00 -0800 (PST) X-Google-Smtp-Source: AMrXdXu8vRfUoSEc3cUFtTQlmJbRSlmMsObzn6kPASOQxdDuzUZYxlCVDdvRlDg/nDqQ9MVJ6lxE X-Received: by 2002:a05:6402:e01:b0:49b:65cc:faa6 with SMTP id h1-20020a0564020e0100b0049b65ccfaa6mr21143934edh.16.1674245580609; Fri, 20 Jan 2023 12:13:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1674245580; cv=none; d=google.com; s=arc-20160816; b=ncQce5Yn5MJ1RB42WXTJLtYq5coVE6IH4YUZ9RI49vNUXghDZ/VABwd0UmB1y2cyTE uK6+9OUIF1GRc+tBTk8wZK1gnQdjNr2jPpkml/IuMFWagmWSwtJu1KzPc/ZSFPT0C3jv nDCcR1zLyGAKc+6YfJk1CF4xCTol90U7PQovxzRyeDrba02kfKISASr04Z7UeDU2WsFS yOKLMd0iPzNaAwMX1GG4/lNJqldXhisDhZ378Pap+0uueddFcZz5ZjsAGaONOJoixcuy AH3njNoCSSTp6Jrc7Pg3r8yJNok1icYuLz+1TbyVxKqhLkBehyF+yPuxv0GIJapbT69j F9wA== 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=ddZvRkdP6m+j+etJnxrVRpAzGdxpb4LGbVwi1ZKQ9E0=; b=zBf7zy+NqJdBcAxG8AAc8nUcyFtHhzu1FiwpXi1oys05i2hUOtqt8QHQNhVFaontqR KGkRhF3ENxNd9LqMN6AN13bZ9gwgaM81m1FdoYe5M6gLPLErsJF8689ghGGDiuUo71NP trvGlhHA/rGrFHWBRO0j0ugAKfDnvvW/AzItVGcOVYoiAS3omcvMh0xo825Wsvc3ksv9 9M0Qh55XH4DO8piRNwVRU5oB+zuEWwckiXsvVSINF1wKES/BVjFuczHldP+ShP3KwRvt jIGipNGN246bxA/GENEF4dFHIRk9eRQn2cRXJ4tjVVFgZeyvHImJy7PSKDlTAOl0034+ YhxA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass (test mode) header.i=@ideasonboard.com header.s=mail header.b=EOa7jbvZ; 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: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id cb10-20020a0564020b6a00b0049cb1901e95si22234715edb.563.2023.01.20.12.12.34; Fri, 20 Jan 2023 12:13:00 -0800 (PST) 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=EOa7jbvZ; 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 S230047AbjATUL5 (ORCPT + 99 others); Fri, 20 Jan 2023 15:11:57 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56844 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230023AbjATULz (ORCPT ); Fri, 20 Jan 2023 15:11:55 -0500 Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0A1A7CC5D1; Fri, 20 Jan 2023 12:11:40 -0800 (PST) Received: from umang.jainideasonboard.com (unknown [103.251.226.6]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 72188558; Fri, 20 Jan 2023 21:11:33 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1674245498; bh=6sUxsMYifknXqTZnpOmp7J0hJXonrqK3mhOk07C6T5k=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=EOa7jbvZHe0VkBiJ4wiFoUVBuawHERb1fWjei6eOTqtkJCcjewuDIKMEMAZI7Ynhk JqtSGMvNbZPb7py5T8FNz/XF11Mem2z7Dr3nQoZCqp7aOUlTmx9fIVq+80HiWn99CU +zyS07xixvLTcIQFwL2HG4ij/Ldzn7ibUoe9cLvs= From: Umang Jain To: 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 Cc: Stefan Wahren , Greg Kroah-Hartman , Florian Fainelli , Adrien Thierry , Dan Carpenter , Dave Stevenson , Kieran Bingham , Laurent Pinchart , Paul Elder , Umang Jain Subject: [PATCH v6 4/6] staging: vc04_services: vchiq-mmal: Drop include Makefile directive Date: Sat, 21 Jan 2023 01:41:02 +0530 Message-Id: <20230120201104.606876-5-umang.jain@ideasonboard.com> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230120201104.606876-1-umang.jain@ideasonboard.com> References: <20230120201104.606876-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-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1755573733686156289?= X-GMAIL-MSGID: =?utf-8?q?1755573733686156289?= Drop the include directive. They can break the build, when one only wants to build a subdirectory. Replace with "../" for the includes, in the mmal-vchiq.c instead. Suggested-by: Greg Kroah-Hartman Signed-off-by: Umang Jain --- drivers/staging/vc04_services/vchiq-mmal/Makefile | 4 ---- drivers/staging/vc04_services/vchiq-mmal/mmal-vchiq.c | 2 +- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/drivers/staging/vc04_services/vchiq-mmal/Makefile b/drivers/staging/vc04_services/vchiq-mmal/Makefile index c7d3b06e17ce..6937f6534c26 100644 --- a/drivers/staging/vc04_services/vchiq-mmal/Makefile +++ b/drivers/staging/vc04_services/vchiq-mmal/Makefile @@ -2,7 +2,3 @@ bcm2835-mmal-vchiq-objs := mmal-vchiq.o obj-$(CONFIG_BCM2835_VCHIQ_MMAL) += bcm2835-mmal-vchiq.o - -ccflags-y += \ - -I$(srctree)/$(src)/.. \ - -I$(srctree)/$(src)/../include diff --git a/drivers/staging/vc04_services/vchiq-mmal/mmal-vchiq.c b/drivers/staging/vc04_services/vchiq-mmal/mmal-vchiq.c index 6b5879a33780..234e3764db64 100644 --- a/drivers/staging/vc04_services/vchiq-mmal/mmal-vchiq.c +++ b/drivers/staging/vc04_services/vchiq-mmal/mmal-vchiq.c @@ -23,9 +23,9 @@ #include #include #include -#include #include +#include "../include/linux/raspberrypi/vchiq.h" #include "mmal-common.h" #include "mmal-vchiq.h" #include "mmal-msg.h" From patchwork Fri Jan 20 20:11:03 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Umang Jain X-Patchwork-Id: 46619 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp404664wrn; Fri, 20 Jan 2023 12:13:29 -0800 (PST) X-Google-Smtp-Source: AMrXdXvyk23py67ivA6RPBfDQuVOEshA8gjNZUl6KhyX2B5Ue4VOm7LXrxH89r28ut/ejjAbbPEK X-Received: by 2002:a17:906:af13:b0:86d:f370:19ab with SMTP id lx19-20020a170906af1300b0086df37019abmr16078539ejb.5.1674245609623; Fri, 20 Jan 2023 12:13:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1674245609; cv=none; d=google.com; s=arc-20160816; b=uQnQzMKaB3NCXQDmQdwMkblpKAviQ/KiHtABZOQnShQMyegnOz3BpVC+FBVzeTCzdq fGkYzYXTExjNVluvE9GSWEyCfunxly0iR5LVrUpD81MRwaK7GnHxAvEpejJr7CU40PjQ 3eeHEf09YhiwHYUvaqF6u7Hi/GQTRC0FQNiEjQpIQznGLfi3JVxfT217Fptx0tAqWr4D OaE39pHEh0QCsN0BC+ERwc9oEffBtl79OuUGPNc+mHvjZzse2mGyJtJ0b5ekiH4BfxC9 yg2NQtWAYAsu5J6tp8Jwe1MWsWY4thztYF9d23xbnISDG6N407bbyZTKxfSuGMKZ/vdu d8aQ== 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=keHVe57regB2DvpdAGY1ME0EdLRFf9BSYPs/KCZ6y78=; b=ZuoujMSHfS6DDhwL8Dfjt+BdiJYQKgf2n5UrjfV9YzWW1cu5JPU33BX5Tk34oRtJlq z+fLbKL/gylonv00o+14sZi0kxBa7gzSAwizNU9gyumFwfoysngU0ua6p6ZlDS12VW+O ss9qXuoDbekeN+Qx9ho+uEOW2E9MQUhgLLi1aLnl9JnkUZjzr4BzzTIPAmJhYOt2kB0j yuiMjAGqma51xKqOzl3wpD6fO+1FEdq8gyHaNothMek2CiEAXHWo29+gk1SdJuBARI9K OhejgG4rRbR7zRgzbyl5/MjI+KM/SeLiZgQ+IJJFv2uCJCOtxANwAcdEj3FmMz1Kx/63 N4hg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass (test mode) header.i=@ideasonboard.com header.s=mail header.b=WVYCcrYJ; 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: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id he35-20020a1709073da300b007ae814af66bsi16539921ejc.389.2023.01.20.12.13.06; Fri, 20 Jan 2023 12:13:29 -0800 (PST) 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=WVYCcrYJ; 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 S229992AbjATUMD (ORCPT + 99 others); Fri, 20 Jan 2023 15:12:03 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57046 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230057AbjATUMB (ORCPT ); Fri, 20 Jan 2023 15:12:01 -0500 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 E607AC41D0; Fri, 20 Jan 2023 12:11:45 -0800 (PST) Received: from umang.jainideasonboard.com (unknown [103.251.226.6]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 310F9104C; Fri, 20 Jan 2023 21:11:38 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1674245504; bh=foOzqx8i0GwXFtcfRogUR42Bcu3qNaPa5Xq+4eZ5fIE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=WVYCcrYJavyX4YwixmDS7AXxUgXGBClSZQqMX/C0QO2IXVtVsXM9vExqz6yAwIs7c rl0//1OQYdbc5k1HreEnw2drUV/atpOw2/FObrDjsAz7n1OJQuYFedetR6elpgFsxJ 07kKCZ27c0C1qCN9kZzcvJlbg8dZT9u6b/5ALp84= From: Umang Jain To: 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 Cc: Stefan Wahren , Greg Kroah-Hartman , Florian Fainelli , Adrien Thierry , Dan Carpenter , Dave Stevenson , Kieran Bingham , Laurent Pinchart , Paul Elder , Umang Jain Subject: [PATCH v6 5/6] staging: vc04_services: interface: Drop include Makefile directive Date: Sat, 21 Jan 2023 01:41:03 +0530 Message-Id: <20230120201104.606876-6-umang.jain@ideasonboard.com> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230120201104.606876-1-umang.jain@ideasonboard.com> References: <20230120201104.606876-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-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1755573764277528063?= X-GMAIL-MSGID: =?utf-8?q?1755573764277528063?= Drop the include directive. They can break the build, when one only wants to build a subdirectory. Replace with "../" for the includes, in the interface/ files instead. Suggested-by: Greg Kroah-Hartman Signed-off-by: Umang Jain --- drivers/staging/vc04_services/Makefile | 2 -- drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.h | 2 +- .../staging/vc04_services/interface/vchiq_arm/vchiq_ioctl.h | 3 ++- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/staging/vc04_services/Makefile b/drivers/staging/vc04_services/Makefile index 1fd191e2e2a5..44794bdf6173 100644 --- a/drivers/staging/vc04_services/Makefile +++ b/drivers/staging/vc04_services/Makefile @@ -15,5 +15,3 @@ obj-$(CONFIG_SND_BCM2835) += bcm2835-audio/ obj-$(CONFIG_VIDEO_BCM2835) += bcm2835-camera/ obj-$(CONFIG_BCM2835_VCHIQ_MMAL) += vchiq-mmal/ -ccflags-y += -I $(srctree)/$(src)/include - diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.h b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.h index 3c198eb1c77a..ec1a3caefaea 100644 --- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.h +++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.h @@ -10,8 +10,8 @@ #include #include #include -#include +#include "../../include/linux/raspberrypi/vchiq.h" #include "vchiq_cfg.h" /* Do this so that we can test-build the code on non-rpi systems */ diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_ioctl.h b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_ioctl.h index 96f50beace44..17550831f86c 100644 --- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_ioctl.h +++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_ioctl.h @@ -5,7 +5,8 @@ #define VCHIQ_IOCTLS_H #include -#include + +#include "../../include/linux/raspberrypi/vchiq.h" #define VCHIQ_IOC_MAGIC 0xc4 #define VCHIQ_INVALID_HANDLE (~0) From patchwork Fri Jan 20 20:11:04 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Umang Jain X-Patchwork-Id: 46620 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp405429wrn; Fri, 20 Jan 2023 12:15:30 -0800 (PST) X-Google-Smtp-Source: AMrXdXvAkm+uegjLjyYqkyll/RWNYcH0nhghDnnwJj/pyEPBMYwx522mypKz82XL4XIJRBcy1JXI X-Received: by 2002:a17:906:abd8:b0:7b1:316c:38f5 with SMTP id kq24-20020a170906abd800b007b1316c38f5mr17914234ejb.30.1674245730349; Fri, 20 Jan 2023 12:15:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1674245730; cv=none; d=google.com; s=arc-20160816; b=rSU8SpGlah0LWJ8NFKhbt9Zyr8Lny6bcE1L3zQx81JDJDS80hoMwiiujo0t9Aaie6X 0L7juAhXVjRfCqG/VZ9wHXliw8M+6jtafk5sAZkJxxE/1L84uDv22aq6XRM0bh1L9CH0 Prw7BegkEOLKkLqeSqkh55K9jtHzvlX/+d0ybkV0NJAdkOHpkesllHWdiPy/Eii0A6eK LFWIODCrRTCCrVma+3LlTjmjqNJJ9l4qkM2UffHQA0i3CHYLCtL9abjhtZxIdc9xCwKI yvcrO1OL28Y0Y+FeI6WSEwSJkfipjvncJCgQElNZUShfQ6htViaA1Lgbdz9YNdL+FdcB HBYg== 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=ui26rB4FQrLj/nT+zZC3kWEBEW7gW5YxaEsTq0jE/uE=; b=dLxu9i6Re5S3FJyjnxkbf6MujXrrrssTnwcIyhNnjtPnCwQHikvUovhL5H8ehhyWtR UrNh1pphJPcwD5fqRllDlhZGYAKKKuAMefeAY4LkoLQeSMIZpaETXkcKDpAIv+X5npI3 WhMQ3SPeaw9mLxNuRG7M+QxI97WX0FeDfqf1NGgWBQFiEB8WDoNgTGmty0t4OvbVCvtw 10MCjMIWiWIEkr04rBDCLTi/mbVkOGSzG2be6L6AMA316rvblI+NHJ5RRpCxcU8/Zqh/ l00nO5Q/+mWhahiC3xvtqG0afYp5v5nbN6U6K42zB2lOCsrPQHBNtzYLZB4adaGwEoBH ooMw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass (test mode) header.i=@ideasonboard.com header.s=mail header.b=H2iELKIg; 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: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id js18-20020a17090797d200b0086dd3de7985si24390842ejc.864.2023.01.20.12.15.06; Fri, 20 Jan 2023 12:15:30 -0800 (PST) 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=H2iELKIg; 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 S230169AbjATUMW (ORCPT + 99 others); Fri, 20 Jan 2023 15:12:22 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57510 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230051AbjATUMU (ORCPT ); Fri, 20 Jan 2023 15:12:20 -0500 Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4496FC13F6; Fri, 20 Jan 2023 12:11:56 -0800 (PST) Received: from umang.jainideasonboard.com (unknown [103.251.226.6]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id CBEF0514; Fri, 20 Jan 2023 21:11:44 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1674245509; bh=8INZZ8USfo2qwFvF451N1PJs0Q18jBa0xLUVpEuT6pY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=H2iELKIgn3t65ZO1pjda+RaLunoAlnP9bKYYKM3E1EUg6+gnd83UuHUwISsy/rA9M h2TvBDBHlcU5FRl9Zu3jHVSTQRk/n9I9bhwdRL6i1EWdlWY4qtMC0kWjA8Xf8HnMXn 43dDoohSxOVIZ5ZB539fWcf+zOIh3ZFrVQTapPus= From: Umang Jain To: 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 Cc: Stefan Wahren , Greg Kroah-Hartman , Florian Fainelli , Adrien Thierry , Dan Carpenter , Dave Stevenson , Kieran Bingham , Laurent Pinchart , Paul Elder , Umang Jain Subject: [PATCH v6 6/6] staging: vc04_services: vchiq: Register devices with a custom bus_type Date: Sat, 21 Jan 2023 01:41:04 +0530 Message-Id: <20230120201104.606876-7-umang.jain@ideasonboard.com> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230120201104.606876-1-umang.jain@ideasonboard.com> References: <20230120201104.606876-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-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1755573663873393202?= X-GMAIL-MSGID: =?utf-8?q?1755573891016883375?= The devices that the vchiq interface registers (bcm2835-audio, bcm2835-camera) are implemented and exposed by the VC04 firmware. The device tree describes the VC04 itself with the resources required to communicate with it through a mailbox interface. However, the vchiq interface registers these devices as platform devices. This also means the specific drivers for these devices are getting registered as platform drivers. This is not correct and a blatant abuse of platform device/driver. Replace the platform device/driver model with a standard device driver model. A custom bus_type, vchiq_bus_type, is created in the vchiq interface which matches the devices to their specific device drivers thereby, establishing driver binding. A struct vchiq_device wraps the struct device for each device being registered on the bus by the vchiq interface. On the other hand, struct vchiq_driver wraps the struct device_driver and the module_vchiq_driver() macro is provided for the driver registration. Each device registered will expose a 'name' read-only device attribute in sysfs (/sys/bus/vchiq-bus/devices). New devices and drivers can be added by registering on vchiq_bus_type and adding a corresponding device name entry in the static list of devices, vchiq_devices. There is currently no way to enumerate the VCHIQ devices that are available from the firmware. Signed-off-by: Umang Jain --- drivers/staging/vc04_services/Makefile | 1 + .../vc04_services/bcm2835-audio/bcm2835.c | 27 +++-- .../bcm2835-camera/bcm2835-camera.c | 25 ++--- .../interface/vchiq_arm/vchiq_arm.c | 52 +++++---- .../interface/vchiq_arm/vchiq_device.c | 102 ++++++++++++++++++ .../interface/vchiq_arm/vchiq_device.h | 39 +++++++ 6 files changed, 192 insertions(+), 54 deletions(-) create mode 100644 drivers/staging/vc04_services/interface/vchiq_arm/vchiq_device.c create mode 100644 drivers/staging/vc04_services/interface/vchiq_arm/vchiq_device.h diff --git a/drivers/staging/vc04_services/Makefile b/drivers/staging/vc04_services/Makefile index 44794bdf6173..2d071e55e175 100644 --- a/drivers/staging/vc04_services/Makefile +++ b/drivers/staging/vc04_services/Makefile @@ -5,6 +5,7 @@ vchiq-objs := \ interface/vchiq_arm/vchiq_core.o \ interface/vchiq_arm/vchiq_arm.o \ interface/vchiq_arm/vchiq_debugfs.o \ + interface/vchiq_arm/vchiq_device.o \ interface/vchiq_arm/vchiq_connected.o \ ifdef CONFIG_VCHIQ_CDEV diff --git a/drivers/staging/vc04_services/bcm2835-audio/bcm2835.c b/drivers/staging/vc04_services/bcm2835-audio/bcm2835.c index 00bc898b0189..05118dafe62d 100644 --- a/drivers/staging/vc04_services/bcm2835-audio/bcm2835.c +++ b/drivers/staging/vc04_services/bcm2835-audio/bcm2835.c @@ -1,12 +1,12 @@ // SPDX-License-Identifier: GPL-2.0 /* Copyright 2011 Broadcom Corporation. All rights reserved. */ -#include - #include #include #include +#include "../interface/vchiq_arm/vchiq_arm.h" +#include "../interface/vchiq_arm/vchiq_device.h" #include "bcm2835.h" static bool enable_hdmi; @@ -268,9 +268,8 @@ static int snd_add_child_devices(struct device *device, u32 numchans) return 0; } -static int snd_bcm2835_alsa_probe(struct platform_device *pdev) +static int snd_bcm2835_alsa_probe(struct device *dev) { - struct device *dev = &pdev->dev; int err; if (num_channels <= 0 || num_channels > MAX_SUBSTREAMS) { @@ -292,32 +291,32 @@ static int snd_bcm2835_alsa_probe(struct platform_device *pdev) #ifdef CONFIG_PM -static int snd_bcm2835_alsa_suspend(struct platform_device *pdev, +static int snd_bcm2835_alsa_suspend(struct device *pdev, pm_message_t state) { return 0; } -static int snd_bcm2835_alsa_resume(struct platform_device *pdev) +static int snd_bcm2835_alsa_resume(struct device *pdev) { return 0; } #endif -static struct platform_driver bcm2835_alsa_driver = { - .probe = snd_bcm2835_alsa_probe, +static struct vchiq_driver bcm2835_alsa_driver = { + .driver = { + .probe = snd_bcm2835_alsa_probe, #ifdef CONFIG_PM - .suspend = snd_bcm2835_alsa_suspend, - .resume = snd_bcm2835_alsa_resume, + .suspend = snd_bcm2835_alsa_suspend, + .resume = snd_bcm2835_alsa_resume, #endif - .driver = { .name = "bcm2835_audio", - }, + } }; -module_platform_driver(bcm2835_alsa_driver); +module_vchiq_driver(bcm2835_alsa_driver); MODULE_AUTHOR("Dom Cobley"); MODULE_DESCRIPTION("Alsa driver for BCM2835 chip"); MODULE_LICENSE("GPL"); -MODULE_ALIAS("platform:bcm2835_audio"); +MODULE_ALIAS("bcm2835_audio"); diff --git a/drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.c b/drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.c index 4f81765912ea..57f053de53b9 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 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, "%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 int bcm2835_mmal_remove(struct platform_device *pdev) +static int bcm2835_mmal_remove(struct device *device) { int camera; struct vchiq_mmal_instance *instance = gdev[0]->instance; @@ -1990,17 +1991,17 @@ static int bcm2835_mmal_remove(struct platform_device *pdev) return 0; } -static struct platform_driver bcm2835_camera_driver = { - .probe = bcm2835_mmal_probe, - .remove = bcm2835_mmal_remove, - .driver = { - .name = "bcm2835-camera", - }, +static struct vchiq_driver bcm2835_camera_driver = { + .driver = { + .name = "bcm2835-camera", + .probe = bcm2835_mmal_probe, + .remove = bcm2835_mmal_remove, + } }; -module_platform_driver(bcm2835_camera_driver) +module_vchiq_driver(bcm2835_camera_driver) MODULE_DESCRIPTION("Broadcom 2835 MMAL video capture"); MODULE_AUTHOR("Vincent Sanders"); MODULE_LICENSE("GPL"); -MODULE_ALIAS("platform:bcm2835-camera"); +MODULE_ALIAS("bcm2835-camera"); 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 22de23f3af02..4a57ff760106 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,8 @@ #include #include #include +#include +#include #include #include #include @@ -34,6 +36,7 @@ #include "vchiq_ioctl.h" #include "vchiq_arm.h" #include "vchiq_debugfs.h" +#include "vchiq_device.h" #include "vchiq_connected.h" #include "vchiq_pagelist.h" @@ -65,9 +68,6 @@ int vchiq_susp_log_level = VCHIQ_LOG_ERROR; DEFINE_SPINLOCK(msg_queue_spinlock); struct vchiq_state g_state; -static struct platform_device *bcm2835_camera; -static struct platform_device *bcm2835_audio; - struct vchiq_drvdata { const unsigned int cache_line_size; struct rpi_firmware *fw; @@ -132,6 +132,11 @@ struct vchiq_pagelist_info { unsigned int scatterlist_mapped; }; +static const char *const vchiq_devices[] = { + "bcm2835_audio", + "bcm2835-camera", +}; + static void __iomem *g_regs; /* This value is the size of the L2 cache lines as understood by the * VPU firmware, which determines the required alignment of the @@ -1763,33 +1768,13 @@ 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; const struct of_device_id *of_id; struct vchiq_drvdata *drvdata; + unsigned int i; int err; of_id = of_match_node(vchiq_of_match, pdev->dev.of_node); @@ -1832,8 +1817,12 @@ static int vchiq_probe(struct platform_device *pdev) goto error_exit; } - bcm2835_camera = vchiq_register_child(pdev, "bcm2835-camera"); - bcm2835_audio = vchiq_register_child(pdev, "bcm2835_audio"); + for (i = 0; i < ARRAY_SIZE(vchiq_devices); i++) { + err = vchiq_device_register(&pdev->dev, vchiq_devices[i]); + if (!err) + dev_err(&pdev->dev, "Failed to register %s vchiq device\n", + vchiq_devices[i]); + } return 0; @@ -1845,8 +1834,8 @@ static int vchiq_probe(struct platform_device *pdev) static int vchiq_remove(struct platform_device *pdev) { - platform_device_unregister(bcm2835_audio); - platform_device_unregister(bcm2835_camera); + bus_for_each_dev(&vchiq_bus_type, NULL, NULL, vchiq_device_unregister); + vchiq_debugfs_deinit(); vchiq_deregister_chrdev(); @@ -1866,6 +1855,12 @@ 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) pr_err("Failed to register vchiq driver\n"); @@ -1876,6 +1871,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); diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_device.c b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_device.c new file mode 100644 index 000000000000..ec542d6bc68a --- /dev/null +++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_device.c @@ -0,0 +1,102 @@ +// SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause +/* + * vchiq_device.c - VCHIQ generic device and bus-type + * + * Copyright (c) 2023 Ideas On Board Oy + */ + +#include +#include +#include + +#include "vchiq_device.h" + +static int vchiq_bus_type_match(struct device *dev, struct device_driver *drv); + +static ssize_t vchiq_dev_show(struct device *dev, + struct device_attribute *attr, char *buf) +{ + struct vchiq_device *device = container_of(dev, struct vchiq_device, dev); + + return sprintf(buf, "%s", device->name); +} + +static DEVICE_ATTR_RO(vchiq_dev); + +static struct attribute *vchiq_dev_attrs[] = { + &dev_attr_vchiq_dev.attr, + NULL +}; + +ATTRIBUTE_GROUPS(vchiq_dev); + +static const struct device_type vchiq_device_type = { + .groups = vchiq_dev_groups +}; + +struct bus_type vchiq_bus_type = { + .name = "vchiq-bus", + .match = vchiq_bus_type_match, +}; +EXPORT_SYMBOL_GPL(vchiq_bus_type); + +static int vchiq_bus_type_match(struct device *dev, struct device_driver *drv) +{ + if (dev->bus == &vchiq_bus_type && + strcmp(dev_name(dev), drv->name) == 0) + return 1; + return 0; +} + +static void vchiq_device_release(struct device *dev) +{ + struct vchiq_device *device; + + device = container_of(dev, struct vchiq_device, dev); + kfree(device); +} + +int vchiq_device_register(struct device *parent, const char *name) +{ + struct vchiq_device *device = NULL; + int ret; + + device = kzalloc(sizeof(*device), GFP_KERNEL); + if (!device) + return -ENOMEM; + + device->name = name; + device->dev.init_name = name; + device->dev.parent = parent; + device->dev.bus = &vchiq_bus_type; + device->dev.type = &vchiq_device_type; + device->dev.release = vchiq_device_release; + + ret = device_register(&device->dev); + if (ret) { + put_device(&device->dev); + return -EINVAL; + } + + return 0; +} + +int vchiq_device_unregister(struct device *dev, void *data) +{ + device_unregister(dev); + return 0; +} + +int vchiq_driver_register(struct vchiq_driver *vchiq_drv) +{ + vchiq_drv->driver.bus = &vchiq_bus_type; + + return driver_register(&vchiq_drv->driver); +} +EXPORT_SYMBOL_GPL(vchiq_driver_register); + +void vchiq_driver_unregister(struct vchiq_driver *vchiq_drv) +{ + driver_unregister(&vchiq_drv->driver); +} +EXPORT_SYMBOL_GPL(vchiq_driver_unregister); diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_device.h b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_device.h new file mode 100644 index 000000000000..0848c1b353f8 --- /dev/null +++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_device.h @@ -0,0 +1,39 @@ +/* SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause */ +/* + * Copyright (c) 2023 Ideas On Board Oy + */ + +#ifndef _VCHIQ_DEVICE_H +#define _VCHIQ_DEVICE_H + +#include + +struct vchiq_device { + struct device dev; + const char *name; +}; + +struct vchiq_driver { + struct device_driver driver; +}; + +extern struct bus_type vchiq_bus_type; + +int vchiq_device_register(struct device *parent, const char *name); +int vchiq_device_unregister(struct device *dev, void *data); + +int vchiq_driver_register(struct vchiq_driver *vchiq_drv); +void vchiq_driver_unregister(struct vchiq_driver *vchiq_drv); + +/** + * module_vchiq_driver() - Helper macro for registering a vchiq driver + * @__vchiq_driver: vchiq driver struct + * + * Helper macro for vchiq drivers which do not do anything special in + * module init/exit. This eliminates a lot of boilerplate. Each module may only + * use this macro once, and calling it replaces module_init() and module_exit() + */ +#define module_vchiq_driver(__vchiq_driver) \ + module_driver(__vchiq_driver, vchiq_driver_register, vchiq_driver_unregister) + +#endif /* _VCHIQ_DEVICE_H */