Received: by 2002:a05:7412:2a8c:b0:e2:908c:2ebd with SMTP id u12csp1309123rdh; Mon, 25 Sep 2023 08:53:14 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHmQdq1+nUGmYC2oXMo9ej7MveQ2gIVw4YAali18neuAG83YvOVgq545Bita3j/pWfxhTv8 X-Received: by 2002:a17:902:dace:b0:1c6:de7:addd with SMTP id q14-20020a170902dace00b001c60de7adddmr3125305plx.48.1695657194472; Mon, 25 Sep 2023 08:53:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695657194; cv=none; d=google.com; s=arc-20160816; b=ipIVOofbhijUX2MuV2rCUtsF3foSrzGnEIwFqKhDDhMCrxUPi556o9HWZ/reeKQdtY pAxxTrtxP5dYgCKDQ9lr4Nr6Q74U7LMN4XYFbBtcEYFUhFDhueg9MUIYLOyGBhyd+vlj MQXlnk4balln/+9o+c1c0gmJCQd/j9EtgNOfihX3VZ2bKQMJ9ZrR1bw+CrNDMnbXV25E oFZn0tds+K2nabgk0MJCLURUQZMp7gyuuULskqg9FN7637WjwfElQXhx5oM8OI3iREmQ eeIzagWqBTBZdxWJjEDt54UFPbvaGvBMA7ge0G0JfrjrD9t8/ii+PIFjSjzL6UHxpXXX OOBg== 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=bEExl+Qnlpbjs/kQF5vqHTfDAzymWTPDJmQL5fGoUhU=; fh=11LKKpIlt6rtONTt+h6X+e6wp8mj+pGxb3/fOJjZKK8=; b=YcybXnLUIQASl8xGLySDqhk6mcL1s9SydR80SmFOguwh89nIOfRR2851fg+V9VkOYJ E/e9tfjtzpucIP29PeBAEWWfD0oRusxqJfyT0hN/jCKapRBShraQakkF1lBqGtZieS9t k0K6/OpO0dCB1sMc1N5fjZWpBqAzVsEXMbZC2juF3QWAQxuG/ruPyvt5pEzwHs/bTKRM 6M3gXJscRdUAytC78PgJAiSN5W1EN36GECApikyQc+f2DfEVRNS9/C9e3IaK8jq+eFmM 1If+8Gdgxeir/5zi45RWIgmaBwnqTZTxzaYaqzYRSpqagyEcCE1s2JNvvP80R10+lMPH GgIg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=YYTyDP7B; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from howler.vger.email (howler.vger.email. [2620:137:e000::3:4]) by mx.google.com with ESMTPS id s14-20020a170902ea0e00b001c617148167si3349141plg.590.2023.09.25.08.53.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 Sep 2023 08:53:14 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) client-ip=2620:137:e000::3:4; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=YYTyDP7B; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by howler.vger.email (Postfix) with ESMTP id 83C768085F97; Mon, 25 Sep 2023 08:41:16 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231616AbjIYPlR (ORCPT + 99 others); Mon, 25 Sep 2023 11:41:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53350 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231464AbjIYPlP (ORCPT ); Mon, 25 Sep 2023 11:41:15 -0400 Received: from mail-wm1-x330.google.com (mail-wm1-x330.google.com [IPv6:2a00:1450:4864:20::330]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A8947101 for ; Mon, 25 Sep 2023 08:41:06 -0700 (PDT) Received: by mail-wm1-x330.google.com with SMTP id 5b1f17b1804b1-4050bd2e33aso70570835e9.2 for ; Mon, 25 Sep 2023 08:41:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1695656465; x=1696261265; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=bEExl+Qnlpbjs/kQF5vqHTfDAzymWTPDJmQL5fGoUhU=; b=YYTyDP7BQrytG74kG12nZkbpqRGw6gQWRcJwdxCL+QNFkcNVQMpY7aMGl+hcznHd5D lhH2t84wpubE1WDCnI69flH6a5mxNgX3TnwvDosOu6N09ywUtjBmRfuxR8mIKMIAqK3V nAoT3oBoyaZQmD7LqZyVU99ro7jpqgVpCCxEFTAMdXkkI1nuLHh1PPSE1j+B9tv08Er6 3nzJbJQAq845GWnGAo0zl4O7Z/P4acPaxoWy673epDif1kmSqQkz3Owrn+kar7Msr/1h H932UpIkkDY7sBonWZz6W+jCTm5qX9saH2BiG0PWJWm8mgZV8JG52Y5QUeG2VEJiC5xa OBFQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1695656465; x=1696261265; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=bEExl+Qnlpbjs/kQF5vqHTfDAzymWTPDJmQL5fGoUhU=; b=loqQFAZBBnCIBfOGBprVV2/XUJHKubKGY/n3FzURlwYmu7lmdhq0Fb7O1FOlWK9G61 AurFKOCDiku5n5c3OLTQEaAYveEM3UunbrdgCUMXL7bBeYiI9QAYox5JU9mVJqMrsjNP HqxWau/iKxVoZxFYSv1t1m0Iu4hdDbvxzzqWPb6c9cc0pQ4G7EZA3Jy+XVs+o2tQHgMf va3B63u/l1rvQbiKYE3TSQKQUUjEh55SSMTagtYdGKbr7HuhcDbdroU3FTlxmD33T4CM 59AWerfnwAdqW62BJ6/XjBmg90Ef37VqJjAbuhGl2keDTbK5LxeqwliaqytouzlJ6VWL EWiA== X-Gm-Message-State: AOJu0YwbgyCU5QycKP/QRtLB5RpjBLZ18cdTNc+D2Qa0a1Mi/hpZe1H5 gl5BQvxZ3b44amaJa3MEP9nrhA== X-Received: by 2002:a05:600c:220c:b0:401:eb0:a98d with SMTP id z12-20020a05600c220c00b004010eb0a98dmr6603769wml.24.1695656465223; Mon, 25 Sep 2023 08:41:05 -0700 (PDT) Received: from sagittarius-a.chello.ie (188-141-3-169.dynamic.upc.ie. [188.141.3.169]) by smtp.gmail.com with ESMTPSA id m15-20020a7bca4f000000b003fe4548188bsm15206155wml.48.2023.09.25.08.41.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 Sep 2023 08:41:04 -0700 (PDT) From: Bryan O'Donoghue To: linux-arm-msm@vger.kernel.org, linux-media@vger.kernel.org, hverkuil@xs4all.nl, laurent.pinchart@ideasonboard.com, robert.foss@linaro.org, todor.too@gmail.com, agross@kernel.org, andersson@kernel.org, konrad.dybcio@linaro.org, mchehab@kernel.org, sakari.ailus@linux.intel.com, andrey.konovalov@linaro.org Cc: linux-kernel@vger.kernel.org, Bryan O'Donoghue Subject: [PATCH v6 01/17] media: qcom: camss: Amalgamate struct resource with struct resource_ispif Date: Mon, 25 Sep 2023 16:40:43 +0100 Message-ID: <20230925154059.837152-2-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.42.0 In-Reply-To: <20230925154059.837152-1-bryan.odonoghue@linaro.org> References: <20230925154059.837152-1-bryan.odonoghue@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (howler.vger.email [0.0.0.0]); Mon, 25 Sep 2023 08:41:17 -0700 (PDT) There is no good reason to differentiate the two resource structures here. As part of a general tidyup of the declaration and passing of resources within in the CAMSS driver it will be advantageous to have one unified resource structure. The two structures are very similar anyway thus leading more credence still to the argument there should be only one. Signed-off-by: Bryan O'Donoghue Acked-by: Konrad Dybcio Reviewed-by: Laurent Pinchart --- drivers/media/platform/qcom/camss/camss-ispif.c | 4 ++-- drivers/media/platform/qcom/camss/camss-ispif.h | 4 ++-- drivers/media/platform/qcom/camss/camss.c | 14 +++++++------- drivers/media/platform/qcom/camss/camss.h | 8 +------- 4 files changed, 12 insertions(+), 18 deletions(-) diff --git a/drivers/media/platform/qcom/camss/camss-ispif.c b/drivers/media/platform/qcom/camss/camss-ispif.c index 1c7e4b1b49401..61765b874b9a2 100644 --- a/drivers/media/platform/qcom/camss/camss-ispif.c +++ b/drivers/media/platform/qcom/camss/camss-ispif.c @@ -1095,7 +1095,7 @@ static int ispif_init_formats(struct v4l2_subdev *sd, struct v4l2_subdev_fh *fh) * Return 0 on success or a negative error code otherwise */ int msm_ispif_subdev_init(struct camss *camss, - const struct resources_ispif *res) + const struct resources *res) { struct device *dev = camss->dev; struct ispif_device *ispif = camss->ispif; @@ -1152,7 +1152,7 @@ int msm_ispif_subdev_init(struct camss *camss, /* Interrupt */ - ret = platform_get_irq_byname(pdev, res->interrupt); + ret = platform_get_irq_byname(pdev, res->interrupt[0]); if (ret < 0) return ret; diff --git a/drivers/media/platform/qcom/camss/camss-ispif.h b/drivers/media/platform/qcom/camss/camss-ispif.h index fdf28e68cc7d8..c7c41f7afcaad 100644 --- a/drivers/media/platform/qcom/camss/camss-ispif.h +++ b/drivers/media/platform/qcom/camss/camss-ispif.h @@ -66,10 +66,10 @@ struct ispif_device { struct camss *camss; }; -struct resources_ispif; +struct resources; int msm_ispif_subdev_init(struct camss *camss, - const struct resources_ispif *res); + const struct resources *res); int msm_ispif_register_entities(struct ispif_device *ispif, struct v4l2_device *v4l2_dev); diff --git a/drivers/media/platform/qcom/camss/camss.c b/drivers/media/platform/qcom/camss/camss.c index c6df862c79e39..fa0eb30d77c26 100644 --- a/drivers/media/platform/qcom/camss/camss.c +++ b/drivers/media/platform/qcom/camss/camss.c @@ -93,14 +93,14 @@ static const struct resources csid_res_8x16[] = { }, }; -static const struct resources_ispif ispif_res_8x16 = { +static const struct resources ispif_res_8x16 = { /* ISPIF */ .clock = { "top_ahb", "ahb", "ispif_ahb", "csi0", "csi0_pix", "csi0_rdi", "csi1", "csi1_pix", "csi1_rdi" }, .clock_for_reset = { "vfe0", "csi_vfe0" }, .reg = { "ispif", "csi_clk_mux" }, - .interrupt = "ispif" + .interrupt = { "ispif" } }; @@ -234,7 +234,7 @@ static const struct resources csid_res_8x96[] = { } }; -static const struct resources_ispif ispif_res_8x96 = { +static const struct resources ispif_res_8x96 = { /* ISPIF */ .clock = { "top_ahb", "ahb", "ispif_ahb", "csi0", "csi0_pix", "csi0_rdi", @@ -243,7 +243,7 @@ static const struct resources_ispif ispif_res_8x96 = { "csi3", "csi3_pix", "csi3_rdi" }, .clock_for_reset = { "vfe0", "csi_vfe0", "vfe1", "csi_vfe1" }, .reg = { "ispif", "csi_clk_mux" }, - .interrupt = "ispif" + .interrupt = { "ispif" } }; static const struct resources vfe_res_8x96[] = { @@ -410,7 +410,7 @@ static const struct resources csid_res_660[] = { } }; -static const struct resources_ispif ispif_res_660 = { +static const struct resources ispif_res_660 = { /* ISPIF */ .clock = { "top_ahb", "ahb", "ispif_ahb", "csi0", "csi0_pix", "csi0_rdi", @@ -419,7 +419,7 @@ static const struct resources_ispif ispif_res_660 = { "csi3", "csi3_pix", "csi3_rdi" }, .clock_for_reset = { "vfe0", "csi_vfe0", "vfe1", "csi_vfe1" }, .reg = { "ispif", "csi_clk_mux" }, - .interrupt = "ispif" + .interrupt = { "ispif" } }; static const struct resources vfe_res_660[] = { @@ -1122,7 +1122,7 @@ static int camss_init_subdevices(struct camss *camss) { const struct resources *csiphy_res; const struct resources *csid_res; - const struct resources_ispif *ispif_res; + const struct resources *ispif_res; const struct resources *vfe_res; unsigned int i; int ret; diff --git a/drivers/media/platform/qcom/camss/camss.h b/drivers/media/platform/qcom/camss/camss.h index f6c326cb853b8..e95211cdb1fd6 100644 --- a/drivers/media/platform/qcom/camss/camss.h +++ b/drivers/media/platform/qcom/camss/camss.h @@ -44,18 +44,12 @@ struct resources { char *regulators[CAMSS_RES_MAX]; char *clock[CAMSS_RES_MAX]; + char *clock_for_reset[CAMSS_RES_MAX]; u32 clock_rate[CAMSS_RES_MAX][CAMSS_RES_MAX]; char *reg[CAMSS_RES_MAX]; char *interrupt[CAMSS_RES_MAX]; }; -struct resources_ispif { - char *clock[CAMSS_RES_MAX]; - char *clock_for_reset[CAMSS_RES_MAX]; - char *reg[CAMSS_RES_MAX]; - char *interrupt; -}; - struct icc_bw_tbl { u32 avg; u32 peak; -- 2.42.0