From patchwork Thu Jan 19 11:54:58 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Umang Jain X-Patchwork-Id: 45714 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp288197wrn; Thu, 19 Jan 2023 04:06:15 -0800 (PST) X-Google-Smtp-Source: AMrXdXsTCxuY99wt1ijWz0StSbnEAu394k2NXdxpyLmu6FIpl/1jw040FtEIwwm4YocKmuc1Lf1u X-Received: by 2002:a17:906:1605:b0:870:2f70:c631 with SMTP id m5-20020a170906160500b008702f70c631mr13719524ejd.2.1674129974838; Thu, 19 Jan 2023 04:06:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1674129974; cv=none; d=google.com; s=arc-20160816; b=vhV2X9TDSFICtjqWy+mP/VYtcPrpnI9QLzh+gkuoz89QGfCEix63kDf6+LJ1JIrO70 iofta6/YMcQLLdbuCtbXZrKy06M1n9R38pw/2hjIHW8VeEfUrLEQ9pDTqmipFd2WnDAC m0FXhaDBftifPVOez4S8zm45pYw+B/R2PnfYNe2BuaL+VccKJxw3YflHCCqf0euI8jWy SM1kVw/05zmfICVXa3W2SIvl89gf4SHZ7t/4cDh/uQxfYyQpgu/kguNvtlTvEaQTZopt J2OJyizaE4TQTDKaJz3M7sxJ7IUi8yu+8Bc2PxiA1duSiXvAqrsN4gro7ppsDgkN+RAd LvpQ== 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=EYO4eUHknDW7a7kEhMmAu3JKkDIzYnlWclqV8xQCbtE=; b=a+d9/zYdlNvflL4x6BXKsYO3RuQe7u8ppxPJ1wr/q5l1/WjBwNaW0JuZQP8OcB6il+ dDv8S7fS8uoB1DxOS9LMFoMpqbB3dpGCc+R6JgYMkxQcMX8rGQI09i26kc4NbSQLiExp 4Vvvpb22/uww23ecRVuTAOj5DDdreVg+i1DM5Ez0XoaUrRh6WwOeRyZPdTCo3KykWHrx evozWNh2OEBmxbUF7haznD+NGbr8so7LFTgwCziKXjSNnHRiWY1+U0CNgSKsblquvgv9 FrJTLL1I1tj4Yssp6BZJHTF7oL3EdKshDDlcgA0yWTA4xRvbssvq9hKxdT42PiPCw6rf kc7A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass (test mode) header.i=@ideasonboard.com header.s=mail header.b=sZncKF16; 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 wy10-20020a170906fe0a00b007c17f750b75si39611867ejb.796.2023.01.19.04.05.50; Thu, 19 Jan 2023 04:06:14 -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=sZncKF16; 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 S231171AbjASLzj (ORCPT + 99 others); Thu, 19 Jan 2023 06:55:39 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59360 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231128AbjASLzb (ORCPT ); Thu, 19 Jan 2023 06:55:31 -0500 Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7529D7A9E; Thu, 19 Jan 2023 03:55:28 -0800 (PST) Received: from ideasonboard.com (unknown [IPv6:2401:4900:1c80:b229:a6c1:a673:925f:1ed6]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 0BE34904; Thu, 19 Jan 2023 12:55:19 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1674129326; bh=+2m5Q5uisZYK67wWg5nGeKHwzAofWrbg8tigUbHvT18=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=sZncKF16cS9d18BztnABZ5/jiuTPr1UOSfmQtAyuTR7n41B4v+39Om3KgA7nSpzNa avwek1ox7serHewseJx3sc94gDYRbHYF1nhXDlv9Ncf2c7u6dAys6qDrn9FCEI7MrF HbutwZ/Mjnx8cVFIPhLDMirbsAR1dloLWnv7YmJY= 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 v5 1/6] staging: vc04_services: Drop __VCCOREVER__ remnants Date: Thu, 19 Jan 2023 17:24:58 +0530 Message-Id: <20230119115503.268693-2-umang.jain@ideasonboard.com> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230119115503.268693-1-umang.jain@ideasonboard.com> References: <20230119115503.268693-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?1755452512584289415?= X-GMAIL-MSGID: =?utf-8?q?1755452512584289415?= 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 Thu Jan 19 11:54: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: 45712 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp287582wrn; Thu, 19 Jan 2023 04:05:08 -0800 (PST) X-Google-Smtp-Source: AMrXdXv9q5JJ/Ustj1XADZHLHtm+44iw4y3ern+Ygx8uhcs1suuUZAq1PlJB1TpW4qSWm3XePaZE X-Received: by 2002:a17:903:1306:b0:189:5f5c:da1e with SMTP id iy6-20020a170903130600b001895f5cda1emr9592474plb.27.1674129908583; Thu, 19 Jan 2023 04:05:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1674129908; cv=none; d=google.com; s=arc-20160816; b=BGEiBYFRgnT6yy+dIoqq/lBN5hUdTIUEDVK5YxSJQb6dZVmZGL6Sp/v6FjGMSFAyxM XDfKmmesbIZPn6XtnKdv3NxM/rxYBr2AC9GEp7LMit64Js+JImRLqeHtM0EhKO/5+ctt HprCx43azARTbmDgeV1viIWbmJ9ssPGdaHt5Bz4NFI6ZRRjARSamkKJAnx1p7UCyg3q8 RQupAAXLf3c68VJPikLQw3YQqC0F+koulQWNYVZM+Nr9eHvgr/RKRf7l+x7caVrIzeRN 1GLVkmMrbgGNEA9SGAvFwg31kU2DID0jL+NcFkMyAxGzrriSUNESu8z91B/8u+F6SKJF PV1g== 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=wg1MGjN/8lrIs1pcbfAri80EyTSCWpzmXuJNRpoaxAI=; b=hla1OwciAoM3r+RHjy62PJUYMxjLVz1isik3DzrjRwkAI3e9CzArmkzGAUgNIXKHLH XocJEeaf+iMSUautqN/jCYwI6wkOqiq4esO2FVySgXwUf7fT5LCG3JkCtlrqaovqYN6f TixNm7erMhmAT8908sc7NiAy4I/D9d+50YqDKjr3oW5OsqRK88P1VxcW8PM4/KOPNIVH gvwXMsMuKqGYj4/1wyCLWX1U+yKI7BQzHYURqPt05zVp/s422ur6NH+JqLUvPqOg/ofO Y/rKRQllXc2Qdm1O+8b2TCFOTglZdeDOwB/9eB3/qDrAZGoF77CBRHxSD0Mk1wgr5/xg 3LcA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass (test mode) header.i=@ideasonboard.com header.s=mail header.b=DCsS7rQ6; 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 b14-20020a170903228e00b00194a01b7317si6676073plh.58.2023.01.19.04.04.55; Thu, 19 Jan 2023 04:05:08 -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=DCsS7rQ6; 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 S231205AbjASLzq (ORCPT + 99 others); Thu, 19 Jan 2023 06:55:46 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59396 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231164AbjASLzi (ORCPT ); Thu, 19 Jan 2023 06:55:38 -0500 Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A2E5269233; Thu, 19 Jan 2023 03:55:35 -0800 (PST) Received: from ideasonboard.com (unknown [IPv6:2401:4900:1c80:b229:a6c1:a673:925f:1ed6]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 943172B3; Thu, 19 Jan 2023 12:55:27 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1674129334; bh=l2Z+aymU3GBOZ/9Ymt+5NaTPuUL7aItEHHCi8zu3jgY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=DCsS7rQ6T1pZDoZDxzOyys+08pLlv9aZeBwu6IAazmEVQmXJIBnx8bk6BCcdyu8FV aamfNQlJpdUiRgIRUqHx56fXQqvjANIGY5tu8DBs6Yh8qotVFQLFXx44BFcamOpl2D OEeuG55Lypk1PPY0k6Whs/bCqmRXK7NyQ7oMH20o= 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 v5 2/6] staging: vc04_services: bcm2835-audio: Drop include Makefile directive Date: Thu, 19 Jan 2023 17:24:59 +0530 Message-Id: <20230119115503.268693-3-umang.jain@ideasonboard.com> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230119115503.268693-1-umang.jain@ideasonboard.com> References: <20230119115503.268693-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?1755452442994205437?= X-GMAIL-MSGID: =?utf-8?q?1755452442994205437?= 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 Thu Jan 19 11:55: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: 45711 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp287141wrn; Thu, 19 Jan 2023 04:04:22 -0800 (PST) X-Google-Smtp-Source: AMrXdXuXPjr2SGtdjl2HJtcFGlsq5FkydqJIOTmwkTbnb95OIYp+sViAoD4OT/bD5dGq6XewfB32 X-Received: by 2002:a17:906:fad4:b0:7c1:2529:b25e with SMTP id lu20-20020a170906fad400b007c12529b25emr11167530ejb.43.1674129862023; Thu, 19 Jan 2023 04:04:22 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1674129862; cv=none; d=google.com; s=arc-20160816; b=ZjZ+P/CVNlRL+fRM5b6+gCLI8UzXdMZfbe9Rw4ztxrYbSb93CoWBiXH1ZvEpdTKIwg jvHAy3Y3++qSC8fQ52GcYRiaRZhdw4Dux+uc93NPGbgV2vYPN7Eg/UpYPotU3ood+K0h ImsT+n3nzEcSURPlKw0T5ywYvJgM6mHdv+W+Pju1yTCV3LLddr3zdy/lzZ/JgrblxSwJ fCtfu4wQClT3X+SVb//5hJm4R98VkrnTyDjfZiyJSOVjowLuKDoCAY/1jEIUMOwIpHED Tv/e73Uxt6o2n8JUK5Vrgi4tDzH3s4p6WfwL0+7TU+ojFcRRJ0OwEAhM7NbWYtVpSbpf MiHQ== 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=MgS0yD8BPdGpwfi2Q7IlQ/AS0AcPUTeMBuEAECH6WqU=; b=HMtTF4XvvNIvE84/mmHX6CfmVFQI+vlx0OXuqzIRecrweDWh4mJSz+q5nRmveWNWOk RdQrCzSVxB8C3CkM5JaQKXx0qlBcCZzddkwudGQvt6Cc/m8bKNGG5gmfq3daRDp3eKXu iLWb2WtTlHkuc8G2cY6cGSvxRqbKb2l6D1tucE06pKDJeq0oBJC09hZz0ea13BvWm4yv Y2Prqu46w/1mH4n8KHe7P/s+ttn84zhaQ4AkrASgOEmpCOJAVGcBr0Ea3yTFXKpIc/N6 /6WBUErBgqVFo0nZkuTa/15aWDZQ9+rSXAVRpSGLxcejH0bwETYbrR3br00ASvSRoi7F yynA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass (test mode) header.i=@ideasonboard.com header.s=mail header.b=mBvtK0Ns; 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 dm3-20020a170907948300b007da4fe085d4si9377622ejc.694.2023.01.19.04.03.58; Thu, 19 Jan 2023 04:04:21 -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=mBvtK0Ns; 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 S231225AbjASL4G (ORCPT + 99 others); Thu, 19 Jan 2023 06:56:06 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59430 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231196AbjASLz5 (ORCPT ); Thu, 19 Jan 2023 06:55:57 -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 6776571784; Thu, 19 Jan 2023 03:55:42 -0800 (PST) Received: from ideasonboard.com (unknown [IPv6:2401:4900:1c80:b229:a6c1:a673:925f:1ed6]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 11FBF904; Thu, 19 Jan 2023 12:55:34 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1674129341; bh=5uZPDNBAVgla1XWWQJSwoTOJpmT0TnxJ5fUoIq0dTDY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=mBvtK0NshbuMl/lObkeUD/duaD/IZ5CQ/hEq2A1kaF/MtaOGNgTLQeCtZEr03r3rx L1Qz4/mIFgEQ4J1P4MENXMMKLLgGXyCzexMKa35vlBi/zdhYIXzLzpy6uB91g1fk5z KapZHxMZUR+J8gwsuhLsvVLAczz1O7Oh8eMHlVzs= 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 v5 3/6] staging: vc04_services: bcm2835-camera: Drop include Makefile directive Date: Thu, 19 Jan 2023 17:25:00 +0530 Message-Id: <20230119115503.268693-4-umang.jain@ideasonboard.com> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230119115503.268693-1-umang.jain@ideasonboard.com> References: <20230119115503.268693-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?1755452394131966421?= X-GMAIL-MSGID: =?utf-8?q?1755452394131966421?= 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 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 Thu Jan 19 11:55: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: 45713 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp288062wrn; Thu, 19 Jan 2023 04:06:00 -0800 (PST) X-Google-Smtp-Source: AMrXdXu5Fi+pFHg3BPHBIja6zn1ZfbCAryUOFY8baqJJ5gx5gt+uh6Dnpt0hf/DBryDIhRCofE/V X-Received: by 2002:a17:903:2289:b0:189:6ab3:9e57 with SMTP id b9-20020a170903228900b001896ab39e57mr15307406plh.22.1674129959685; Thu, 19 Jan 2023 04:05:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1674129959; cv=none; d=google.com; s=arc-20160816; b=oUEoq0DCcfW0v5+Dh4wU2hN61uhb2ndYHm62xZLOLq6aEerHLf6Hd1TWxVgM4aXu7z 3Vu2t7dZS8OKc4Co9aRFbuUywcIs757hZjxDgwyX10jadQDudM31f+A/41wMTeGL/I22 JbvtVMv0yHlnX/6YNdC1loa92uoS5J0uhbZzr8nnD4WCof0SVI3AhE7YCNNq8tLXxQTt c1alTaCvhfDi23vT4jY9TdiAWcPhmvP/fITs5YlGIwAVC7dT4VefWDcZnCOcsF+Vp5RR F1iVZ+T3055EzacR/I8EDN69Hp1hv75aH5aZKpmZlHIJ3mukZqaIr47BSAWSHfecMAyP 6UXQ== 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=zzMzmCZQlFdD1twnT8IIYDn6CNevuglb4v3DP0nU0pQ=; b=qLKpKhOVD/ZX8Hj+gFKyWTkEHdzOjl2KbWysDGDyiboKUipe0Xi0zOjUQ/D3snBA78 rndILq29yxnmgNWrFoWNpsRFiaex1S9Zg6XNdC8VK82mqoUuS/s8peO5cjgSK0WFB7P2 yi5JWBrD17oEQGJVsAnDFjzniIYtobBNCTIUidlqeo8vd4Ylga7NsLCqnkBxhDNoTkII HcK1J61P8Rx59T2IhgInV/zJNnKO0WFMX/G56tlramypwUKkKMWWTkb48xjxTmy5ZqQV OcgDTV5pKSY408ZVdYLiuY54RC506dEtgnxjqDrQ7kHPDtgN4owjAL47n1cB13sokkLN kLRA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass (test mode) header.i=@ideasonboard.com header.s=mail header.b=OovRV9Gq; 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 b14-20020a170903228e00b00194a01b7317si6676073plh.58.2023.01.19.04.05.47; Thu, 19 Jan 2023 04:05:59 -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=OovRV9Gq; 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 S231248AbjASL4N (ORCPT + 99 others); Thu, 19 Jan 2023 06:56:13 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59772 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231247AbjASL4B (ORCPT ); Thu, 19 Jan 2023 06:56: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 CADC469233; Thu, 19 Jan 2023 03:55:49 -0800 (PST) Received: from ideasonboard.com (unknown [IPv6:2401:4900:1c80:b229:a6c1:a673:925f:1ed6]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id D04FB2B3; Thu, 19 Jan 2023 12:55:41 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1674129348; bh=hCxqWie3uzplKZ4e/Tdld6iDDnEY3d1lDlFPtpJvD6U=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=OovRV9GqCGYr5smFORFQnpl3BGbYa4GbbXSJFsB4flPzHxsyWRxYnjkuVjYs17MB6 xBUfGbgSh8xEKYXWgehHzRZ5//QdkWGAho8G6GbyuO+SZKYFCaE82bCv+r5nD50jQ1 jPjV1MeJvdle/qVmDtiYgoPCKDOK2i25+azT1Rdo= 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 v5 4/6] staging: vc04_services: vchiq-mmal: Drop include Makefile directive Date: Thu, 19 Jan 2023 17:25:01 +0530 Message-Id: <20230119115503.268693-5-umang.jain@ideasonboard.com> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230119115503.268693-1-umang.jain@ideasonboard.com> References: <20230119115503.268693-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?1755452496483403267?= X-GMAIL-MSGID: =?utf-8?q?1755452496483403267?= 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 Thu Jan 19 11:55: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: 45715 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp288311wrn; Thu, 19 Jan 2023 04:06:34 -0800 (PST) X-Google-Smtp-Source: AMrXdXtuTxz3wq+Oxt0rG/b9G8XySDN+Ns2fs0O894JdvX5SNac9dgJXCfdzdDMaVyrfAtJ/htO9 X-Received: by 2002:a17:906:60d:b0:83d:61f8:3c with SMTP id s13-20020a170906060d00b0083d61f8003cmr8485624ejb.3.1674129994299; Thu, 19 Jan 2023 04:06:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1674129994; cv=none; d=google.com; s=arc-20160816; b=dJKdDLbqMfR06wDQwQgSlvZrlS406ka6fM7BzyrDFgfVK0C0IYxWAu6ySjv/a2ndfA bQ05ZI5VHaLioVQBYF/JRnhl9EaxOvgSkzXaeLmi8u2I7To7fLRk78xilPwSZ/Yx6Bmb 4UUTLaWnfurQX5ebbDD7yScyu+ejm6FTAZ8rHrNMe2KJWrn07OgCmyIeWidvQj5ziAzf k8UIF47T04sJln9T81l6Lcl7yTv9FcT67onWzycslA//XLAX89YrECfT55UNioU5aHfY Y0h7+GVtk7HWhtrDcuvc9Q5QVTHaer3ARfKt8RHnYCSHOdl/zIdkFdVr8FNe3IHb8qr8 6m/Q== 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=6pgBkTRq/tbVV5+MTZHX5wUYARTBlqaQsxVvkjIi41s=; b=fRylfw/k5wyXoD8F0xVMUAfOARUiEhpArcosvrDrmGvr6AHzb1Qy0gYaS61Yxes1F8 2+LT+2q4Vi9A/eUgoL4nYoeA3ef03w/FWVhyNc2TgvdjlVkvXx4PdWj0QczHjDhKOpV6 jucxKd4oz7sbN3BgDLEMmPNP7YcSEAE7eqwaEuSeCZ2J8KnximPhi84CizcdSERPf1mn 3uQji0mNhsYv7gNbEyyJwBSwn7Ms9BF7/d2ZgXzDOYgFGlCvDLwSGLrWVh3xtNR2wBPy pF6WcSLDGjG1ZHoXgecq6bmxNgPXL0UXba65u2OFJUV05rd4vMpMTG4obYiEbXA7dNM7 rDaQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass (test mode) header.i=@ideasonboard.com header.s=mail header.b=sLxOQqAF; 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 gb30-20020a170907961e00b0086eb408a888si3343154ejc.131.2023.01.19.04.06.10; Thu, 19 Jan 2023 04:06:34 -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=sLxOQqAF; 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 S231244AbjASL4l (ORCPT + 99 others); Thu, 19 Jan 2023 06:56:41 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60090 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231191AbjASL4G (ORCPT ); Thu, 19 Jan 2023 06:56:06 -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 C761C7571A; Thu, 19 Jan 2023 03:55:56 -0800 (PST) Received: from ideasonboard.com (unknown [IPv6:2401:4900:1c80:b229:a6c1:a673:925f:1ed6]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 070E6904; Thu, 19 Jan 2023 12:55:48 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1674129355; bh=uZuQczGfDRTm2FbFGCRtYHZ2H2t2F5DLf4cTVA+nP50=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=sLxOQqAFe4hmnbCtr83R9gj8QPuIhN9OTi8dOXV7cQc1Ni+AooAN/NOcUVWFltQaL NUQgUS8zOakQardnSw45Uxy7c1oHImS4q5aKjYZRhSg8Xzo0415LsPeHOB5mnmR2ml IIEUn/Ttfq4MDpqgPQzbt5JgIOw2+QVgUwwLa4CU= 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 v5 5/6] staging: vc04_services: interface: Drop include Makefile directive Date: Thu, 19 Jan 2023 17:25:02 +0530 Message-Id: <20230119115503.268693-6-umang.jain@ideasonboard.com> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230119115503.268693-1-umang.jain@ideasonboard.com> References: <20230119115503.268693-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?1755452533373466382?= X-GMAIL-MSGID: =?utf-8?q?1755452533373466382?= 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 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 Thu Jan 19 11:55: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: 45716 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp288644wrn; Thu, 19 Jan 2023 04:07:11 -0800 (PST) X-Google-Smtp-Source: AMrXdXvzCGG8j+GszkW0sroS4BWQ2fILwGbwbvpEcFSL3k+zHDbtxMjDACVgmlhOn6OrWKR5v+im X-Received: by 2002:a17:906:4f07:b0:864:223:40b with SMTP id t7-20020a1709064f0700b008640223040bmr11518449eju.33.1674130031628; Thu, 19 Jan 2023 04:07:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1674130031; cv=none; d=google.com; s=arc-20160816; b=WOFCnoS2S8ffmvh7e/UAEDNEoo1FF6SBF7EDKh5kDRG2AMxQJ0+qlfPg9JvyD7ETmk uxrF8ZMrYn2h0RyxD+wRonEYtlbDP+HdzzkJoQHYEIGydql4BKUrBSjNtUx6CcL6fCZt QXnROTvfKGJoDJS2ioXdoHxhF/ItrSTvi9L12zTQerY+jp4LwOvCQNWK0jiWCE+ZXRkU paJJP2xjOrhth6+EmcSiRi4gug0X1SIEOovqZP/tHjHv7rNcLfBkTDxgQCk3vAEDRzXX UL3GZgWWNh6UJPkVTzQ9OaFAs/DbOg19gzUdexGj60edS5fr8/BVtjH6rTD4WlQnvOqX OtfQ== 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=JpECNyQ3WDrJCCF6Rqetb5MIsaYiUSh0N3De0h8ISvU=; b=zE4ugc6wIhqa8BhzR7Py5MWv0tqfFnpG/1f5ZKgluxyrtkBtTdLgDdVEIKLlPTMD/m p6+NbxLu54FHt/Yp8jb5+DqQ9iC0FW/7Q5gEMSKKp/edMH7uawOOXeh2KZ6kuhXVGnPv 3zWoW7M5OyHBOo1ooc2wra08qA+Ue/J6gf189JCQ1jiXMmuR1bBoP8UJ4Jkt57fwibD2 TEv6sBxdg5v/BR8Wa9UTu1V7l6+DQB5V65+E6O2yCRapS3RbCVFJlQHQ2V9VacoZ8n7R 1VWIL6oLTJ4Te28koWB8AwAGIZFwR5fYOxdD/B38XyQzSZp6+jGSPNFQoJaNC1uuOTBr qcQw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass (test mode) header.i=@ideasonboard.com header.s=mail header.b="Smup/CKh"; 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 go9-20020a1709070d8900b0086ea1c7ae27si17476042ejc.241.2023.01.19.04.06.47; Thu, 19 Jan 2023 04:07:11 -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="Smup/CKh"; 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 S230004AbjASL5S (ORCPT + 99 others); Thu, 19 Jan 2023 06:57:18 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59652 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231256AbjASL43 (ORCPT ); Thu, 19 Jan 2023 06:56:29 -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 4DE3A5CE63; Thu, 19 Jan 2023 03:56:04 -0800 (PST) Received: from ideasonboard.com (unknown [IPv6:2401:4900:1c80:b229:a6c1:a673:925f:1ed6]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 301ED2B3; Thu, 19 Jan 2023 12:55:55 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1674129363; bh=WECJxUBnf7zRTzjXPj3/TrqdJhIANkYw1pWw0VAHKN4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Smup/CKhC+0VvxFY+uQeu+3j65xj6PFXfn6WqhwsvN7lx7FBFUsXxqOix4w+zUN5F dyjVw6n7tyCwAU/W0cmaEArBgLRoi7cbVLbeJoI0dsBNsCVkL16tpEGk1m+i5pHLpa h4JL/DJAkpHNP5nFiByHC0AklZBoaVGSeI9REO1I= 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 v5 6/6] staging: vc04_services: vchiq: Register devices with a custom bus_type Date: Thu, 19 Jan 2023 17:25:03 +0530 Message-Id: <20230119115503.268693-7-umang.jain@ideasonboard.com> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230119115503.268693-1-umang.jain@ideasonboard.com> References: <20230119115503.268693-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?1755452353672043253?= X-GMAIL-MSGID: =?utf-8?q?1755452571875414906?= 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);