From nobody Tue Oct 7 11:39:38 2025 Received: from esa.microchip.iphmx.com (esa.microchip.iphmx.com [68.232.153.233]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7A1552FE303; Thu, 10 Jul 2025 20:07:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=68.232.153.233 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1752178069; cv=none; b=Pg2v0Hnn9e5Q4kIIFSceRSeGkUa02g1URNaCV/UwO+1vDxk8TJRg5lvgKbqd2vmIW/q5zwKiptAxMdSx7pc596DUr/1LGoQawzgMEz/u1wU0LLSTGiyCg9w+GrjgJg3XCJiSS7gGJ48kOsX3UDOBrFz84B2fjZeADH/wcTddA00= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1752178069; c=relaxed/simple; bh=pUt6nEKolOM5f/QTRnrUxubdYyYIPdd9pJXEwXrfobM=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=cNseShkY9yeahu/exHGW5l7iRm+6EWlHY2TDPvVc4LCsMrIbBiZHyeJqOrem8V7xLgOScVpwRhbtLYU7xzXJ1D5lsQ56ZW6usZMEjz0nOmrOBU6QptzPDIVx6kGdQOETijfYv8xh/aB91xmluO1xfbvZb+AR+oV8thiFxMUKS/0= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=microchip.com; spf=pass smtp.mailfrom=microchip.com; dkim=pass (2048-bit key) header.d=microchip.com header.i=@microchip.com header.b=iZgw0zBm; arc=none smtp.client-ip=68.232.153.233 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=microchip.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=microchip.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=microchip.com header.i=@microchip.com header.b="iZgw0zBm" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1752178068; x=1783714068; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=pUt6nEKolOM5f/QTRnrUxubdYyYIPdd9pJXEwXrfobM=; b=iZgw0zBm7OB7+ZWUdFwyGRvO9JUtIqlCj9ApjQEhH9l0og7njGqeHp3q PGCAUq/cAi14UMb9iIxyCiiMfvYlvWo1BoQRlWjXh7ijXjc1q58f0K+x4 nZissPTFrlsJU+S9ASKb7FMOBBGi8hTXxEW9m8WQsNuijtXDDHLJWXsn8 oVnx6zCBWoqcQ+0P9W+KHuVd+H4XRmcJcioMA4y/GMrkwEnb56rUOmUA8 ZVZv+rUfGD5HYgF+oq6gWu/PSeXgaRQEmNq4MQZNIgkm5/B3hFS5TWahQ BdSfWRLJ4qWAiuT14zB9GhXGzQKP/8joSxq/DwNSJRzYxB6qGHGFxKakD A==; X-CSE-ConnectionGUID: qOQSLemoQZOGUxBCHa7nXg== X-CSE-MsgGUID: MwGS1BUlTdGu4c7XwSuZfA== X-IronPort-AV: E=Sophos;i="6.16,301,1744095600"; d="scan'208";a="275215676" X-Amp-Result: SKIPPED(no attachment in message) Received: from unknown (HELO email.microchip.com) ([170.129.1.10]) by esa5.microchip.iphmx.com with ESMTP/TLS/ECDHE-RSA-AES128-GCM-SHA256; 10 Jul 2025 13:07:38 -0700 Received: from chn-vm-ex04.mchp-main.com (10.10.85.152) by chn-vm-ex01.mchp-main.com (10.10.85.143) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.44; Thu, 10 Jul 2025 13:07:32 -0700 Received: from ryan-Precision-3630-Tower.microchip.com (10.10.85.11) by chn-vm-ex04.mchp-main.com (10.10.85.152) with Microsoft SMTP Server id 15.1.2507.44 via Frontend Transport; Thu, 10 Jul 2025 13:07:32 -0700 From: To: , , , , CC: , , , , Subject: [PATCH v3 18/32] clk: at91: clk-i2s-mux: add support for parent_hw Date: Thu, 10 Jul 2025 13:07:11 -0700 Message-ID: X-Mailer: git-send-email 2.43.0 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" From: Claudiu Beznea Add support for parent_hw in i2s mux clock driver. With this parent-child relation is described with pointers rather than strings making registration a bit faster. All the SoC based drivers that rely on clk-i2s-mux were adapted to the new API change. The switch itself for SoCs will be done in subsequent patches. Signed-off-by: Claudiu Beznea Signed-off-by: Ryan Wanner --- drivers/clk/at91/clk-i2s-mux.c | 6 +++++- drivers/clk/at91/dt-compat.c | 2 +- drivers/clk/at91/pmc.h | 1 + drivers/clk/at91/sama5d2.c | 4 ++-- 4 files changed, 9 insertions(+), 4 deletions(-) diff --git a/drivers/clk/at91/clk-i2s-mux.c b/drivers/clk/at91/clk-i2s-mux.c index fe6ce172b8b0..04d9fcf940fb 100644 --- a/drivers/clk/at91/clk-i2s-mux.c +++ b/drivers/clk/at91/clk-i2s-mux.c @@ -51,6 +51,7 @@ static const struct clk_ops clk_i2s_mux_ops =3D { struct clk_hw * __init at91_clk_i2s_mux_register(struct regmap *regmap, const char *name, const char * const *parent_names, + struct clk_parent_data *parent_data, unsigned int num_parents, u8 bus_id) { struct clk_init_data init =3D {}; @@ -63,7 +64,10 @@ at91_clk_i2s_mux_register(struct regmap *regmap, const c= har *name, =20 init.name =3D name; init.ops =3D &clk_i2s_mux_ops; - init.parent_names =3D parent_names; + if (parent_data) + init.parent_data =3D (const struct clk_parent_data *)parent_data; + else + init.parent_names =3D parent_names; init.num_parents =3D num_parents; =20 i2s_ck->hw.init =3D &init; diff --git a/drivers/clk/at91/dt-compat.c b/drivers/clk/at91/dt-compat.c index ccdeba3a1130..2b1aa834f111 100644 --- a/drivers/clk/at91/dt-compat.c +++ b/drivers/clk/at91/dt-compat.c @@ -239,7 +239,7 @@ static void __init of_sama5d2_clk_i2s_mux_setup(struct = device_node *np) continue; =20 hw =3D at91_clk_i2s_mux_register(regmap_sfr, i2s_mux_np->name, - parent_names, 2, bus_id); + parent_names, NULL, 2, bus_id); if (IS_ERR(hw)) continue; =20 diff --git a/drivers/clk/at91/pmc.h b/drivers/clk/at91/pmc.h index fe42700df6db..a380054d580d 100644 --- a/drivers/clk/at91/pmc.h +++ b/drivers/clk/at91/pmc.h @@ -182,6 +182,7 @@ at91_clk_register_h32mx(struct regmap *regmap, const ch= ar *name, struct clk_hw * __init at91_clk_i2s_mux_register(struct regmap *regmap, const char *name, const char * const *parent_names, + struct clk_parent_data *parent_data, unsigned int num_parents, u8 bus_id); =20 struct clk_hw * __init diff --git a/drivers/clk/at91/sama5d2.c b/drivers/clk/at91/sama5d2.c index 8c7ff0108b41..f5d6c7a96cf2 100644 --- a/drivers/clk/at91/sama5d2.c +++ b/drivers/clk/at91/sama5d2.c @@ -372,7 +372,7 @@ static void __init sama5d2_pmc_setup(struct device_node= *np) parent_names[0] =3D "i2s0_clk"; parent_names[1] =3D "i2s0_gclk"; hw =3D at91_clk_i2s_mux_register(regmap_sfr, "i2s0_muxclk", - parent_names, 2, 0); + parent_names, NULL, 2, 0); if (IS_ERR(hw)) goto err_free; =20 @@ -381,7 +381,7 @@ static void __init sama5d2_pmc_setup(struct device_node= *np) parent_names[0] =3D "i2s1_clk"; parent_names[1] =3D "i2s1_gclk"; hw =3D at91_clk_i2s_mux_register(regmap_sfr, "i2s1_muxclk", - parent_names, 2, 1); + parent_names, NULL, 2, 1); if (IS_ERR(hw)) goto err_free; =20 --=20 2.43.0