From nobody Thu Dec 18 20:16:16 2025 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id CB6C7CA0EC1 for ; Mon, 11 Sep 2023 21:30:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1347616AbjIKVZF (ORCPT ); Mon, 11 Sep 2023 17:25:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36026 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237754AbjIKNOW (ORCPT ); Mon, 11 Sep 2023 09:14:22 -0400 Received: from mail-ed1-x530.google.com (mail-ed1-x530.google.com [IPv6:2a00:1450:4864:20::530]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 26C1DCD7 for ; Mon, 11 Sep 2023 06:14:16 -0700 (PDT) Received: by mail-ed1-x530.google.com with SMTP id 4fb4d7f45d1cf-52c4d3ff424so5820769a12.0 for ; Mon, 11 Sep 2023 06:14:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1694438054; x=1695042854; 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=O30Nefz8IpD/EzKpngLHnY7JAJMowqEtJBDBz6EbidBVShxjVVg18fwco1dm0yuV7J 8ufMa9xmKmpXXA/RIHFfoEG2iw/iOZkSSjzB+rny5fA3WXivYciCqlYdBYvlMKr/UjpT 1VaUDwXvjKhGq8+siWytucN8W+t8VTeIIpbfJ2i/U1EypxYanz2GV5BXBbK/rBia3333 4itCSPPZ/nE4FsFWkaHlp63Al6XLJsnyK8UNcvFdNt9VBKe0269sXCdjoEuBupY9sm9y h85BgXWvnzqDUPMEDZQRN+Fz7olCfPx2FNTUruMvjOf4Kdi6UBB388Yovt14i/cornY7 RkEA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1694438054; x=1695042854; 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=Op+rwfDIrkmDlAJ5Z0Y5yGqx8sGPAuyynRwTSTnalbb0htW5pvNmMMq6kj7J6Pzl9e aFknCaV/7Yk1ac4aZdvdZEaLDHn6uoVhOKLHqj+feo61Pmz2h1GwR57pVERFloHjZJAR mLEwbURcBkDojPl0agjlZRiNwq/WzfQpfrjeurN8Em/5eAO5B9ap3wirYZD46Abc73zA FAuDZVLMUJyE7KLayIwsS7v3s9rNmPOQ1oPzeyUACSrSD6wa10rpQhiHKvhiXLt+IAsL Q/ZD1d2dI08Ft2smh11iPCgvt7797DlWPETYhFbiQ9INh4vO7iPSRZZ81SGITnC3WaZp gCHQ== X-Gm-Message-State: AOJu0YxLaUpGWgTJWxb4c12nu8gm4zJTRHgdMwiA+JGsJmDYzCTLdV7p vtBjf97/2o0dcFG84x2GfTKPzA== X-Google-Smtp-Source: AGHT+IEUw9IMod0ZXSwWnw531y8CCVcRYkIXJE/IS9VPSsi86yb58qunvIeGkEFV1EIPP7YnvjXyMQ== X-Received: by 2002:a17:906:535d:b0:9a3:c4f4:12de with SMTP id j29-20020a170906535d00b009a3c4f412demr5993428ejo.37.1694438054637; Mon, 11 Sep 2023 06:14:14 -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 kt8-20020a170906aac800b00988e953a586sm5313648ejb.61.2023.09.11.06.14.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 11 Sep 2023 06:14:14 -0700 (PDT) From: Bryan O'Donoghue To: rfoss@kernel.org, todor.too@gmail.com, bryan.odonoghue@linaro.org, agross@kernel.org, andersson@kernel.org, konrad.dybcio@linaro.org, mchehab@kernel.org, hverkuil-cisco@xs4all.nl, laurent.pinchart@ideasonboard.com, sakari.ailus@linux.intel.com, andrey.konovalov@linaro.org Cc: linux-media@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v5 01/17] media: qcom: camss: Amalgamate struct resource with struct resource_ispif Date: Mon, 11 Sep 2023 14:13:55 +0100 Message-ID: <20230911131411.196033-2-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.42.0 In-Reply-To: <20230911131411.196033-1-bryan.odonoghue@linaro.org> References: <20230911131411.196033-1-bryan.odonoghue@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" 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/medi= a/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 =3D camss->dev; struct ispif_device *ispif =3D camss->ispif; @@ -1152,7 +1152,7 @@ int msm_ispif_subdev_init(struct camss *camss, =20 /* Interrupt */ =20 - ret =3D platform_get_irq_byname(pdev, res->interrupt); + ret =3D platform_get_irq_byname(pdev, res->interrupt[0]); if (ret < 0) return ret; =20 diff --git a/drivers/media/platform/qcom/camss/camss-ispif.h b/drivers/medi= a/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; }; =20 -struct resources_ispif; +struct resources; =20 int msm_ispif_subdev_init(struct camss *camss, - const struct resources_ispif *res); + const struct resources *res); =20 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/plat= form/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[] =3D { }, }; =20 -static const struct resources_ispif ispif_res_8x16 =3D { +static const struct resources ispif_res_8x16 =3D { /* ISPIF */ .clock =3D { "top_ahb", "ahb", "ispif_ahb", "csi0", "csi0_pix", "csi0_rdi", "csi1", "csi1_pix", "csi1_rdi" }, .clock_for_reset =3D { "vfe0", "csi_vfe0" }, .reg =3D { "ispif", "csi_clk_mux" }, - .interrupt =3D "ispif" + .interrupt =3D { "ispif" } =20 }; =20 @@ -234,7 +234,7 @@ static const struct resources csid_res_8x96[] =3D { } }; =20 -static const struct resources_ispif ispif_res_8x96 =3D { +static const struct resources ispif_res_8x96 =3D { /* ISPIF */ .clock =3D { "top_ahb", "ahb", "ispif_ahb", "csi0", "csi0_pix", "csi0_rdi", @@ -243,7 +243,7 @@ static const struct resources_ispif ispif_res_8x96 =3D { "csi3", "csi3_pix", "csi3_rdi" }, .clock_for_reset =3D { "vfe0", "csi_vfe0", "vfe1", "csi_vfe1" }, .reg =3D { "ispif", "csi_clk_mux" }, - .interrupt =3D "ispif" + .interrupt =3D { "ispif" } }; =20 static const struct resources vfe_res_8x96[] =3D { @@ -410,7 +410,7 @@ static const struct resources csid_res_660[] =3D { } }; =20 -static const struct resources_ispif ispif_res_660 =3D { +static const struct resources ispif_res_660 =3D { /* ISPIF */ .clock =3D { "top_ahb", "ahb", "ispif_ahb", "csi0", "csi0_pix", "csi0_rdi", @@ -419,7 +419,7 @@ static const struct resources_ispif ispif_res_660 =3D { "csi3", "csi3_pix", "csi3_rdi" }, .clock_for_reset =3D { "vfe0", "csi_vfe0", "vfe1", "csi_vfe1" }, .reg =3D { "ispif", "csi_clk_mux" }, - .interrupt =3D "ispif" + .interrupt =3D { "ispif" } }; =20 static const struct resources vfe_res_660[] =3D { @@ -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/plat= form/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]; }; =20 -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; --=20 2.42.0