From patchwork Wed Jan 18 19:18:06 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Umang Jain X-Patchwork-Id: 45434 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp2517996wrn; Wed, 18 Jan 2023 11:21:57 -0800 (PST) X-Google-Smtp-Source: AMrXdXsPh5lMb2omplB9QCCRKyjaP4FRzhFXJGORNCPLfzDm7k6mzzKxS7oIXOfAeAZrtTsUJtM/ X-Received: by 2002:a17:906:7156:b0:86d:f880:5195 with SMTP id z22-20020a170906715600b0086df8805195mr8234091ejj.56.1674069717033; Wed, 18 Jan 2023 11:21:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1674069717; cv=none; d=google.com; s=arc-20160816; b=oWzDHLurCb+Z/B/0AHcTLcivEndbDJlWxvt0rfGhCzd9qk+a+CNi9QQw0vbSlQlYGv 2N378K5/c2IRvxZZCCsH36SDUdLi63ldtOt7izLC5+PbTI2IUGgDKbPsHAJBU8ScSHEP 7jjS+NSBMUTZWipPcE+iU6Xo2/zr932CD1y317jP11EsdyKp1NbwA5Pl4eivX643357h orjwQkQtdYnflV0TO4ZgtWJkJ7teofmznieQ8Z341Kfp3FkcIEigN6axc6uf5inDSz5J QnSfUekze1aMz652fgw5gVk4IpGdGSJ0GUMLt+0Gn0u+on3dL5WJGYl+pGTnaOqQmI8o BDoQ== 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=4Bz0YRGhyGJa4YD0UWvUkMcNtZxYYi6Y/fX6FR063HA=; b=AUHM9fmdy9gadlT+gI6LSXXsTECL2ATKSb9Hts/a3gco1SLOTDtstm9oCVNUPeneqG hsp83659Fs/czpoQUJAQWsp+5hwor/t4Z2OZV0bOlXGxwYlanVvxxNWv7O1JuKQ+SMYP 7y03lvqLV3hBPrpRQCjx/O4JbLxGl88G1z9ORDYciwGpf3xa6D63O0Ysx1YbbxkuUzN8 xR7z/4kdBBK2CCqxXOFz0aviPkXps0LZfeyFKNuQ/C+fLyVHF/MAr+PuBDKyzTsj3oWF eiLNoyigy7VFeKPs/v156gg2gCh7958xKpTG4n8ef4nqACECjMvDudu+uZY3KdKy27pZ 40bQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass (test mode) header.i=@ideasonboard.com header.s=mail header.b=Pz1CU3Pq; 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 dd11-20020a1709069b8b00b008775fc7095esi2533738ejc.899.2023.01.18.11.21.33; Wed, 18 Jan 2023 11:21:57 -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=Pz1CU3Pq; 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 S230003AbjARTSo (ORCPT + 99 others); Wed, 18 Jan 2023 14:18:44 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50366 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229997AbjARTSh (ORCPT ); Wed, 18 Jan 2023 14:18:37 -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 47B7E53B02; Wed, 18 Jan 2023 11:18:36 -0800 (PST) Received: from umang.jainideasonboard.com (unknown [IPv6:2405:204:820c:4b28:9aaf:3c:ef34:ecdd]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id E3293158E; Wed, 18 Jan 2023 20:18:26 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1674069514; bh=BwKY49SsGRfLKtwynm1ZtOjuQBk6X8yUktR1hkyodis=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Pz1CU3PqffAhIFYxIVlbenqt63EbVRewfW9KV/04OnuRZ8K8WgXJvU+xPJv4QnYsy LU5nnCcv5puDeeiru70KANkamo1qvsg6DbQn/hvC7i8czU4zDg7LM5Ll1t3ECYtbbQ Nk7atFrlBSX6ChjNugXvVVRrTh13l42obt6yIEwY= 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 , Nicolas Saenz Julienne , Phil Elwell , Dave Stevenson , Kieran Bingham , Laurent Pinchart , Umang Jain Subject: [PATCH v4 1/6] staging: vc04_services: Drop __VCCOREVER__ remnants Date: Thu, 19 Jan 2023 00:48:06 +0530 Message-Id: <20230118191811.208552-2-umang.jain@ideasonboard.com> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230118191811.208552-1-umang.jain@ideasonboard.com> References: <20230118191811.208552-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?1755389327602226936?= X-GMAIL-MSGID: =?utf-8?q?1755389327602226936?= 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 --- 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 Wed Jan 18 19:18:07 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Umang Jain X-Patchwork-Id: 45430 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp2517286wrn; Wed, 18 Jan 2023 11:20:25 -0800 (PST) X-Google-Smtp-Source: AMrXdXtrHCAOLPaKbuEby/WTpdQvwOAGFUJQP1DR5xsSZ9ScNxAnZ+gKE+XRFBMkIlOQ+LwhA7MC X-Received: by 2002:a17:907:8b92:b0:877:6a03:9aa4 with SMTP id tb18-20020a1709078b9200b008776a039aa4mr802346ejc.72.1674069624857; Wed, 18 Jan 2023 11:20:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1674069624; cv=none; d=google.com; s=arc-20160816; b=Whhs8e5iYPt5n8G8UZVlPnVbf9cl1RJpnzDRtQKCq6AWbmuUqUnOmaaAmQprNX2akM xqfQ65Pw8F3kNh9DG29WQq1Bd6DVH6qWib53N3Qm3LiSPAaVFJA+LnK+3AH26MrhYJgW yHfMDn2l7ND8Op/Vx0VuF+UsgzP/nsOzJ4QvWe3l+T6PFYefkuptIM73tDLoa1lcW84g PPQZdFdhjJgx71L75tEt2cn3+MsCJ+PKb7DLBooGt/1/YVGty6kZmZ0SQpH2Dl/BMiTD jy1iQpQIf3BWkzOkYoXZUpue3MjB7AmhoTOb75Sxd3uX5l+Ww+Zv9ogsObuqMdzUBjn7 3M6w== 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=Gda5stTJH+dR3+ZB+Ctlo5KO+bZFsI1S+HWApyH0WlM=; b=zfn4y0/NNvxvJrTGz6L58zKqaTdj8n6Oa9OPhLZ9RvT5jQ4ApVyvNGnsOBC4oSQ4uP FRQLFS8n7agUfKhbrvYutEsMBr6pFuN7ZuWK61aOtA22fQmpNHeteJNqbQ/bh7PvC0gn cCeG4J7pXaSkEio4deYaRcgAk7zTOFgsVqXQv/F9WvpsiQJOwSMveZIDM5ARJFNcO6pF pzCieZ+4j3mlpIPelFifR5nlnPo5xcpUCLu0AQraamTWlCsc6MKJyAWdrB1yMp5Gt2SA n+oTW+13X7zhy+wPETzC1yOmHF83NAa5VhE74rsKj3JhOqPj3CcRhnj0cIzUDIQuYQJa 1NlQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass (test mode) header.i=@ideasonboard.com header.s=mail header.b=nAJ9Y52A; 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 xf7-20020a17090731c700b007825337afeesi38438196ejb.273.2023.01.18.11.20.01; Wed, 18 Jan 2023 11:20:24 -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=nAJ9Y52A; 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 S230043AbjARTS6 (ORCPT + 99 others); Wed, 18 Jan 2023 14:18:58 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50574 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230110AbjARTSq (ORCPT ); Wed, 18 Jan 2023 14:18:46 -0500 Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6007A53FA2; Wed, 18 Jan 2023 11:18:43 -0800 (PST) Received: from umang.jainideasonboard.com (unknown [IPv6:2405:204:820c:4b28:9aaf:3c:ef34:ecdd]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 839E51056; Wed, 18 Jan 2023 20:18:35 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1674069522; bh=psqCt6za/rWwlS8mx3H67DzrDFITmHUqUzosgzjCokY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=nAJ9Y52AiPrqGZhBONG9RqjapRQzUKzvOGwsc8HSlPY+buefXW3uFeDrj9roboLs2 V9BKgWtND9DZQpgd56Kt32KWzQnt00jZaEbObbg8DdYjwLEdXZ95XmYvCzFRlfI/KK 2/7pe96HfLZtF+3uvSMFnqupGZUlRnSR1AEUBzQI= 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 , Nicolas Saenz Julienne , Phil Elwell , Dave Stevenson , Kieran Bingham , Laurent Pinchart , Umang Jain Subject: [PATCH v4 2/6] vc04_services: bcm2835-audio: Drop include Makefile directive Date: Thu, 19 Jan 2023 00:48:07 +0530 Message-Id: <20230118191811.208552-3-umang.jain@ideasonboard.com> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230118191811.208552-1-umang.jain@ideasonboard.com> References: <20230118191811.208552-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?1755389231452389805?= X-GMAIL-MSGID: =?utf-8?q?1755389231452389805?= Drop the include directive they can break the build 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 Wed Jan 18 19:18:08 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Umang Jain X-Patchwork-Id: 45432 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp2517647wrn; Wed, 18 Jan 2023 11:21:12 -0800 (PST) X-Google-Smtp-Source: AMrXdXuaivgTTZvaV046g0Zv7TrXZ8MJiz8am4MhQ3Krxpg90tvgPAbWNoIKKthWavPDga5ai4En X-Received: by 2002:a17:906:df49:b0:84c:f9b0:b54a with SMTP id if9-20020a170906df4900b0084cf9b0b54amr6795411ejc.58.1674069672540; Wed, 18 Jan 2023 11:21:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1674069672; cv=none; d=google.com; s=arc-20160816; b=FgUkUF28SicVc6C+eOCISH1xa9orDyZtjaHZrE+CidsVvGz6gb0UATLI08j5cSq9Vm 9cgdhi8WdT+h0MeGRv82HOiLtDgIHvfeI/pRI1pJWI2cHhplzgSgFo7zY6J854VjDfbm 3TRBLU01B2Mhr7DWldrghbxGYlTOLzhObKT0PD1LP43/HeTNRj7fARSgz774VX4A9Gae /QkVseHsvTHRs1T/YOzd/QrRjTdpNnDbSarYrQfw1qU2/5crwyoCdpIqfrbnVe5fNXTZ wh2DMkYiZfbW+LYg/MoG7+cC1TS1WxFC0V+/Txzs1gpe7EO3CyVcT/uoQ/pwCu+GPw+8 X8gg== 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=TbdXcXvadWanZx017JubbE729weboPIIX/66DtTtskE=; b=mHXqEJglRKs3teAbar0Uquvk8/xSRBTyAuVnVDv9fKYQimaHoS7aXk7OIpmsKKY5iR dsLlEjjccF4weyk/9fDLaGYEIBKiv0gfmxZd2z61qYaHoelrDgfkdA1VyFXW1xg3GjyV u9s4IqzZYmMM8SMFVENdW01/fAxN8nMaETApi+yK8taHVVHKnlzjIBDpydXtyKv1NN6H chaG0wlZ8o3T9ZYTxeVHo8VuT/D9nO+9Q/884LMIKmVZc61DhSSPw+rZtA1Ys+cV5SFh WcDhc6XiWvyK2ZEd8R2OZZIEsUcru9ilCxq5WsXJyqIM/BZQd75KUAUM8FncaDzRIIpA WGTQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass (test mode) header.i=@ideasonboard.com header.s=mail header.b=EUD7YRa2; 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 ga8-20020a1709070c0800b00870558f5f0fsi13564860ejc.256.2023.01.18.11.20.48; Wed, 18 Jan 2023 11:21:12 -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=EUD7YRa2; 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 S230114AbjARTTB (ORCPT + 99 others); Wed, 18 Jan 2023 14:19:01 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50434 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230151AbjARTSv (ORCPT ); Wed, 18 Jan 2023 14:18:51 -0500 Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CB1E153B1A; Wed, 18 Jan 2023 11:18:50 -0800 (PST) Received: from umang.jainideasonboard.com (unknown [IPv6:2405:204:820c:4b28:9aaf:3c:ef34:ecdd]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id AC6CB158E; Wed, 18 Jan 2023 20:18:42 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1674069529; bh=mqcrmgKlmNwZ/4j0H9w4QnhJtOQYVKklQnpKaMrxgQ8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=EUD7YRa2wdvmnQC4BXu+KgSvft4jaJHEjf3GNj1no0n1//Q0kZWtAhO/3BJ4AGM1U Pe8RhT3MVjGzNW+NDfnSwOZCA2tKpbKd3iq/NzKmGp+koTgvUZIbjyXmMS05m+kdyZ gqlLMQd9Im+UcrPVz66i+CKmv7imxcF1+DUbhAD0= 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 , Nicolas Saenz Julienne , Phil Elwell , Dave Stevenson , Kieran Bingham , Laurent Pinchart , Umang Jain Subject: [PATCH v4 3/6] vc04_services: bcm2835-camera: Drop include Makefile directive Date: Thu, 19 Jan 2023 00:48:08 +0530 Message-Id: <20230118191811.208552-4-umang.jain@ideasonboard.com> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230118191811.208552-1-umang.jain@ideasonboard.com> References: <20230118191811.208552-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?1755389281132097986?= X-GMAIL-MSGID: =?utf-8?q?1755389281132097986?= Drop the include directive they can break the build 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 --- 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 Wed Jan 18 19:18:09 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Umang Jain X-Patchwork-Id: 45431 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp2517534wrn; Wed, 18 Jan 2023 11:20:57 -0800 (PST) X-Google-Smtp-Source: AMrXdXuDgRuwMM2tfL38bA1xxjbHZGx5WQM7D+nZKlegQtbpM8t11dhOOLJQ3W90C3NjMlLx8N/7 X-Received: by 2002:a17:907:d10:b0:86e:df17:df94 with SMTP id gn16-20020a1709070d1000b0086edf17df94mr11336812ejc.14.1674069657815; Wed, 18 Jan 2023 11:20:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1674069657; cv=none; d=google.com; s=arc-20160816; b=CYeoYHKcrbDilQjnSDJDJno9YGabjojgelkeFsV7pEKapJeFnx8YGawT6yeMeFQ9Z8 BrdoWpHo8ZsbsiP828pZTI5dykswqy6KBrsI0a9YcolK2ReL7QaPcwTVOdrXntKeIRx7 z3+FotU7XNkJaZx6l9iL5GjF3hhQ4idHw1HxbnrWgzFIujgqXPDHfiXeauWA2cZronQX 5YYoDAzOcrvMm8b2TwwyXiNgS28Ig7eGleNr4ltYZdpg8acx65mhtq+L0EJpeNtWy430 jDLuI37nuwnIIAA/LbrkxqPiRUlsLEGDe0aUXEoZvANRKxRf79FmPdLAXhJtK1lKw58w EuBg== 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=40alu3sQDjmb+jOz5qKVfdsFkDWZD9EntJqEs6jXljs=; b=yFAaSFT+yDoJ/J4iRlGD6XWcOleaBfXyyslK8NpJ2SNrR49iwUJTyaSlDvBkfezwmh 4bfx9cSZDFmPPm/6qA2eHLo79NDhAtUZ5eJIAKJF9wMA86xSBFirij5op98f8NamUtHB i41hOZmlJuKvJi0MaiR2X//nrITPOULEghd8bb651jnN8UOOE5JWX04DDpMFe5zLza8r OBNwfMIqf33qM8QVzkKudaaHLbo+SJliXvM0ufJ+XBsMjnXlmCRt2tFzvWTnkrgO1hTo 8cWclaZNjlT47krgxM8YFCQzW1asuoD+0lt2Jp+Rc+wMpYYXtLFu1osLFrdS2VcM7wlr XDug== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass (test mode) header.i=@ideasonboard.com header.s=mail header.b=Pi6XHOjq; 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 mj24-20020a170906af9800b0087767137e84si619905ejb.509.2023.01.18.11.20.34; Wed, 18 Jan 2023 11:20:57 -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=Pi6XHOjq; 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 S230168AbjARTTJ (ORCPT + 99 others); Wed, 18 Jan 2023 14:19:09 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50786 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230083AbjARTTA (ORCPT ); Wed, 18 Jan 2023 14:19:00 -0500 Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E683448A2A; Wed, 18 Jan 2023 11:18:59 -0800 (PST) Received: from umang.jainideasonboard.com (unknown [IPv6:2405:204:820c:4b28:9aaf:3c:ef34:ecdd]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 667591056; Wed, 18 Jan 2023 20:18:49 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1674069538; bh=+PIqosEfP+3HYLMfQ6JbsMBronwbnjz96aQGq+N2CTQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Pi6XHOjq4artr+hK1B+r5a9I4ThZKP5lqO87TdRR4LnT4WuPBdinA79PI1sujrPD/ VH2ExsrLO48DzQ6gXAn2vrhVDlkqDDVyZ/1F4dqYUk6u9aWDUx9I5hQs1wp/1C9bZX OVWbg2ouKMPbzEX7jRCSbRRKO3uqSdZA4xIn2mTs= 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 , Nicolas Saenz Julienne , Phil Elwell , Dave Stevenson , Kieran Bingham , Laurent Pinchart , Umang Jain Subject: [PATCH v4 4/6] vc04_services: vchiq-mmal: Drop include Makefile directive Date: Thu, 19 Jan 2023 00:48:09 +0530 Message-Id: <20230118191811.208552-5-umang.jain@ideasonboard.com> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230118191811.208552-1-umang.jain@ideasonboard.com> References: <20230118191811.208552-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?1755389265513477954?= X-GMAIL-MSGID: =?utf-8?q?1755389265513477954?= Drop the include directive they can break the build 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 Wed Jan 18 19:18:10 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Umang Jain X-Patchwork-Id: 45433 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp2517759wrn; Wed, 18 Jan 2023 11:21:25 -0800 (PST) X-Google-Smtp-Source: AMrXdXsby/AEHjmd0xXfi4IZwmRG2tnodlqlxY2LKMIQn/aMmeeHEhqgd87p3y0p5SiRFiVjQAJ5 X-Received: by 2002:a17:907:d401:b0:7c0:c220:a33d with SMTP id vi1-20020a170907d40100b007c0c220a33dmr8914442ejc.9.1674069685742; Wed, 18 Jan 2023 11:21:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1674069685; cv=none; d=google.com; s=arc-20160816; b=lCr9ivqWOJCgRaPcngnKfthJOl/UJhhp276ELSItAwO2X8su62EHz4E0MJYvw10URR bJiiqG1QpmEbL/WL542YfidzKwlWa8P7w4pBtu0KD837HTQtgDjuc0Ftz51UKuswzr9v nVv2CnBQs5BjupJtv6smUCaaTxIa6rQ+ePrI+/JHOvofpsPSKv2LfIqgNBEpZkd0uL4j Eqvs9f4KXeRs2frUFtOIeEiAocVZGtPrPDOfpWdyca6tplJmPFOWjK2TtG8OhdDTYMKq nGzrEfpV4jek6oxJWBk4kiU6kxZFv+Xs0BoVWUhqW6J1m5j8dr4D1P+TLXolB2S9db36 k2IA== 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=T5FZQlMkpOKmDy+Djzi9ZGDEC4+KcPPJwigzt3lmqso=; b=R8F4FvDlIWW2bbhvwBHR0ZAE7GI3buoZBanZGQi4SytIczi0sYsFmEiMh93kpCyCG9 f8DoOYduQxyRKfBF6PI7KxEo1MhN38Rlb9gXK9ARHPaGvXs6PKM4F7+DsCOlDDLXt4ZP lFsX4pI0yh+tsKRKmw3a1skocOmI4lXr/nZQkJJRugNElh73Kmp2XsAGwR+uPyN8FOhw kUZFIHecrHmeWsnPAPBtEKDeYgrThOrGLAg1zUrRcmqP3koMKv4o44Bdo4DoXvpx+9yF CFN7fv8RcHMY9LhA4M3ymupRuUJUKJ78VGTHhBxN9KllLNNr9gyON8jQOnYH+7UFve6R Sj3w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass (test mode) header.i=@ideasonboard.com header.s=mail header.b=K4Soc2vf; 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 ji6-20020a170907980600b00866bd1c81e9si29152347ejc.419.2023.01.18.11.21.01; Wed, 18 Jan 2023 11:21:25 -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=K4Soc2vf; 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 S229637AbjARTT2 (ORCPT + 99 others); Wed, 18 Jan 2023 14:19:28 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50872 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229982AbjARTTM (ORCPT ); Wed, 18 Jan 2023 14:19:12 -0500 Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D99E35A801; Wed, 18 Jan 2023 11:19:06 -0800 (PST) Received: from umang.jainideasonboard.com (unknown [IPv6:2405:204:820c:4b28:9aaf:3c:ef34:ecdd]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 493F3158E; Wed, 18 Jan 2023 20:18:58 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1674069545; bh=dMHCbrz0mI0q2foYrd80/bZE6sYjFmNjq2hzq9Ngwic=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=K4Soc2vfgEjDIRa0cFIGwrRsF7klHc/Cs8VV7W/8t5wMCrh5HM0PL52Pn4c5XgVjk kAbrZLEoFU4mxNqutcLr5yDiz7wKBzHv+XUV1QxekrydDFvxsXr+EYuzeTnqGEiRLe eLIejk78/XVeKG9VcuTmv7NAzcLIru6aymRKKAc4= 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 , Nicolas Saenz Julienne , Phil Elwell , Dave Stevenson , Kieran Bingham , Laurent Pinchart , Umang Jain Subject: [PATCH v4 5/6] vc04_services: interface: Drop include Makefile directive Date: Thu, 19 Jan 2023 00:48:10 +0530 Message-Id: <20230118191811.208552-6-umang.jain@ideasonboard.com> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230118191811.208552-1-umang.jain@ideasonboard.com> References: <20230118191811.208552-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?1755389294355580728?= X-GMAIL-MSGID: =?utf-8?q?1755389294355580728?= Drop the include directive they can break the build 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 ec3505424718..12da398c6115 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 Wed Jan 18 19:18:11 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Umang Jain X-Patchwork-Id: 45435 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp2518283wrn; Wed, 18 Jan 2023 11:22:38 -0800 (PST) X-Google-Smtp-Source: AMrXdXs87DyBOKMwP398Qqgno4xwiquBekc9qkvXUJ1bL6M9r6XwqRvAbX9+pIZBeYmj6GmC/e5I X-Received: by 2002:a17:906:9c85:b0:7c1:9519:5cfa with SMTP id fj5-20020a1709069c8500b007c195195cfamr8030742ejc.77.1674069758424; Wed, 18 Jan 2023 11:22:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1674069758; cv=none; d=google.com; s=arc-20160816; b=CMSo+qHy7CDV3QlzY8tP/SV9BhlLFBEQolo9Rlab4WGlMR8TT+o9cBdfsjSJRMGouC eEQ/6ECyUUxg8MLnWsf+hXqnFKVFv3ZlL1JZBoDdmKYPP/TbPxqsw6hIQ0Uj/30KPQi6 6RRdZ7lTX/R3qS/ysf5iAxXSOyEhG0pIJ0Qk5EZs+jbD8dHeE/M6uktBLd1/cxrbeeEq ISSWkU052KpfNpp06E5mpsPbYsM4n3NPVVEFuQROaGN/9RFcfXSXUjSJcyqt4JgQqqeR fpOUOASLxPn7PyOEHrwVQkVJKJqv4Qa6JZYrrTlcxKegR8deDYLcUNz9P3dnJxV6cyWt M8fw== 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=L4x7L2opj+1fhQ6vPcJIliR+uJf/xdsOMvpy5W4V4X4=; b=Pe448nW3Au7ZXJ7BQOqSsdUDU9nqqjHsw1T+nXzJP1GDjkrOhpZgqdE3/2ihOB1IDv eZzqWYBBYukOIvG0JiKSuGa5sbicO5j6MNsg/tHYV6VYj+3xL6aaiMEWZr/2Bj5TeofG 3jEti7W57l3HvTC8ok1j6QDKWHEhHiES6KLqYQYKQjRLLJBZebLmX6V2lFd7z/0e4oas SUAMrrI2mXZGundULp5aAftQJo6Y/8Oo8bWRYBF3bvMS7qWXUCzrqDvEMdvLxE9plyjO YUJtsy6FDJnxRcrIxuzmSw3CHOmeiSpaWUAcIvK1GuS1QkJcunIUBVhdY2n1bp3TFCQo XBCQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass (test mode) header.i=@ideasonboard.com header.s=mail header.b="Fgxgii/T"; 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 ho12-20020a1709070e8c00b00859812aea43si30543474ejc.568.2023.01.18.11.22.14; Wed, 18 Jan 2023 11:22:38 -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="Fgxgii/T"; 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 S230265AbjARTTs (ORCPT + 99 others); Wed, 18 Jan 2023 14:19:48 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51924 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230188AbjARTTZ (ORCPT ); Wed, 18 Jan 2023 14:19:25 -0500 Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4EF0A53571; Wed, 18 Jan 2023 11:19:14 -0800 (PST) Received: from umang.jainideasonboard.com (unknown [IPv6:2405:204:820c:4b28:9aaf:3c:ef34:ecdd]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 44A0A1056; Wed, 18 Jan 2023 20:19:05 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1674069553; bh=v7f2EepVufrbXEZ17JZNbOqBSaSez3VNJ0FenZNNITU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Fgxgii/T8W/KCP1MmqKx/qWjYOiaFcmxtzdXmmuDidXNmNN+J+nGKyXbN+dunckMy GbOMV+ay1Nxz07kDBi+A/YS9XDT6DnmivgL5NrhpuoqTbhfRUjmxReg80AbgtPqauZ fhjudRJ2PyzxaMJ90EtLFQsKwCXDlAAMKVzMRoPc= 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 , Nicolas Saenz Julienne , Phil Elwell , Dave Stevenson , Kieran Bingham , Laurent Pinchart , Umang Jain Subject: [PATCH v4 6/6] staging: vc04_services: vchiq: Register devices with a custom bus_type Date: Thu, 19 Jan 2023 00:48:11 +0530 Message-Id: <20230118191811.208552-7-umang.jain@ideasonboard.com> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230118191811.208552-1-umang.jain@ideasonboard.com> References: <20230118191811.208552-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?1755389218808120383?= X-GMAIL-MSGID: =?utf-8?q?1755389370863536826?= 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 also 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. 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 --- .../vc04_services/bcm2835-audio/bcm2835.c | 19 ++- .../bcm2835-camera/bcm2835-camera.c | 17 ++- .../interface/vchiq_arm/vchiq_arm.c | 121 +++++++++++++++--- .../interface/vchiq_arm/vchiq_arm.h | 1 + 4 files changed, 117 insertions(+), 41 deletions(-) diff --git a/drivers/staging/vc04_services/bcm2835-audio/bcm2835.c b/drivers/staging/vc04_services/bcm2835-audio/bcm2835.c index 00bc898b0189..9f3af84f5d5d 100644 --- a/drivers/staging/vc04_services/bcm2835-audio/bcm2835.c +++ b/drivers/staging/vc04_services/bcm2835-audio/bcm2835.c @@ -1,12 +1,11 @@ // 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 "bcm2835.h" static bool enable_hdmi; @@ -268,9 +267,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,30 +290,29 @@ 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 = { +static struct device_driver bcm2835_alsa_driver = { .probe = snd_bcm2835_alsa_probe, #ifdef CONFIG_PM .suspend = snd_bcm2835_alsa_suspend, .resume = snd_bcm2835_alsa_resume, #endif - .driver = { - .name = "bcm2835_audio", - }, + .name = "bcm2835_audio", + .bus = &vchiq_bus_type, }; -module_platform_driver(bcm2835_alsa_driver); +module_driver(bcm2835_alsa_driver, driver_register, driver_unregister); MODULE_AUTHOR("Dom Cobley"); MODULE_DESCRIPTION("Alsa driver for BCM2835 chip"); diff --git a/drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.c b/drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.c index 4f81765912ea..199a49f9ec1e 100644 --- a/drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.c +++ b/drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.c @@ -24,8 +24,8 @@ #include #include #include -#include +#include "../interface/vchiq_arm/vchiq_arm.h" #include "../vchiq-mmal/mmal-common.h" #include "../vchiq-mmal/mmal-encodings.h" #include "../vchiq-mmal/mmal-vchiq.h" @@ -1841,7 +1841,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 +1896,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 +1976,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,15 +1990,14 @@ static int bcm2835_mmal_remove(struct platform_device *pdev) return 0; } -static struct platform_driver bcm2835_camera_driver = { +static struct device_driver bcm2835_camera_driver = { + .name = "bcm2835-camera", .probe = bcm2835_mmal_probe, .remove = bcm2835_mmal_remove, - .driver = { - .name = "bcm2835-camera", - }, + .bus = &vchiq_bus_type, }; -module_platform_driver(bcm2835_camera_driver) +module_driver(bcm2835_camera_driver, driver_register, driver_unregister) MODULE_DESCRIPTION("Broadcom 2835 MMAL video capture"); MODULE_AUTHOR("Vincent Sanders"); 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..86c8e5df7cf6 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 @@ -65,9 +67,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 +131,51 @@ struct vchiq_pagelist_info { unsigned int scatterlist_mapped; }; +struct vchiq_device { + const char *name; + struct device dev; +}; + +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 +}; + +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; +} + +struct bus_type vchiq_bus_type = { + .name = "vchiq-bus", + .match = vchiq_bus_type_match, +}; +EXPORT_SYMBOL(vchiq_bus_type); + +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,26 +1807,52 @@ static const struct of_device_id vchiq_of_match[] = { }; MODULE_DEVICE_TABLE(of, vchiq_of_match); -static struct platform_device * +static void +vchiq_release_device(struct device *dev) +{ + struct vchiq_device *device; + + device = container_of(dev, struct vchiq_device, dev); + kfree(device); +} + +static int vchiq_register_child(struct platform_device *pdev, const char *name) { - struct platform_device_info pdevinfo; - struct platform_device *child; + struct vchiq_device *device = NULL; + int ret; - memset(&pdevinfo, 0, sizeof(pdevinfo)); + device = kzalloc(sizeof(*device), GFP_KERNEL); + if (!device) + return -ENOMEM; - pdevinfo.parent = &pdev->dev; - pdevinfo.name = name; - pdevinfo.id = PLATFORM_DEVID_NONE; - pdevinfo.dma_mask = DMA_BIT_MASK(32); + device->name = name; + device->dev.init_name = name; + device->dev.parent = &pdev->dev; + device->dev.bus = &vchiq_bus_type; + device->dev.type = &vchiq_device_type; + device->dev.release = vchiq_release_device; + + ret = dma_set_mask_and_coherent(&device->dev, DMA_BIT_MASK(32)); + if (ret < 0) { + vchiq_release_device(&device->dev); + return ret; + } - child = platform_device_register_full(&pdevinfo); - if (IS_ERR(child)) { - dev_warn(&pdev->dev, "%s not registered\n", name); - child = NULL; + ret = device_register(&device->dev); + if (ret) { + put_device(&device->dev); + return -EINVAL; } - return child; + return 0; +} + +static int +vchiq_unregister_child(struct device *dev, void *data) +{ + device_unregister(dev); + return 0; } static int vchiq_probe(struct platform_device *pdev) @@ -1790,7 +1860,7 @@ static int vchiq_probe(struct platform_device *pdev) struct device_node *fw_node; const struct of_device_id *of_id; struct vchiq_drvdata *drvdata; - int err; + int i, err; of_id = of_match_node(vchiq_of_match, pdev->dev.of_node); drvdata = (struct vchiq_drvdata *)of_id->data; @@ -1832,8 +1902,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_register_child(pdev, vchiq_devices[i]); + if (!err) + dev_err(&pdev->dev, "Failed to register %s vchiq device\n", + vchiq_devices[i]); + } return 0; @@ -1845,8 +1919,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_unregister_child); + vchiq_debugfs_deinit(); vchiq_deregister_chrdev(); @@ -1866,6 +1940,10 @@ 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); + ret = platform_driver_register(&vchiq_driver); if (ret) pr_err("Failed to register vchiq driver\n"); @@ -1876,6 +1954,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_arm.h b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.h index 2fb31f9b527f..98c3af32774a 100644 --- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.h +++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.h @@ -81,6 +81,7 @@ extern int vchiq_susp_log_level; extern spinlock_t msg_queue_spinlock; extern struct vchiq_state g_state; +extern struct bus_type vchiq_bus_type; extern struct vchiq_state * vchiq_get_state(void);