From nobody Sat Feb 7 08:43:50 2026 Received: from esa.microchip.iphmx.com (esa.microchip.iphmx.com [68.232.154.123]) (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 37ECC3A8FF1; Fri, 16 Jan 2026 20:07:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=68.232.154.123 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768594066; cv=none; b=J1cVesNQafE+V4HBl4Emqsv8wQrgQREdD5QJh0jR9XsuK6NSecPrU66COQbw8qnQ12gUnyOqEtWJFxyAPO3Z0sA4ucLSV00TpdG4itU2tazspq1TyNSJlvhGUU6LE9naNrzxIi9cPGVh91TcupUch9rhObZvu+1XvE5h2Js6fcQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768594066; c=relaxed/simple; bh=RwuCeJAoS6L7ZHwLftG1bOzhbbKscMkg3opGOon6QHo=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=TZcK+WFVr2CwkEbf0X6HGaC3t/g0CcIl0JZGbZ+qFB14fKhJ1jqhC7YmpXDzWavRyvcJ1IgmACTxcKQuGULCruXBgpkyKXeMPbCOkNHvXJ/09iTRm89pd84Bh2CyeIoDBkp8QGfOOsXpivDzkG0MOnF3LxSm0xUyOW/XidDyRxM= 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=koTU4pyJ; arc=none smtp.client-ip=68.232.154.123 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="koTU4pyJ" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1768594062; x=1800130062; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=RwuCeJAoS6L7ZHwLftG1bOzhbbKscMkg3opGOon6QHo=; b=koTU4pyJjlt57ZKydJMZqyKM17clfN/1s8L8JSYAHAhRk6NTFxvhiykQ eT4fG6S8nsGFrTCFLkVzDMiXqoXVRyW8TZ/J83CiKy3FdUNL+YMznyrLS bPtYEttoHfjAyHpk8Yt1XT9OQNdzCxHmMtz6p5AekkOWJ638npJDOTqjX cO1wUtBxOXmagwrvQZBEv+bel6tirypqrtIKb1E/O9edxfLWWAm2e/8zu B2fR5Bo3uUcg0/LOKbUdJtSl4Kmc8YUR/FbaYrFZNP37z10rKeevhF5Ar nDiTF7Kt+NzbUk3vsIrXynBd8CAildCJ0Z9oY9aIwWMWPe0QM7JV1oyfB g==; X-CSE-ConnectionGUID: 3LvvvroxTJyR6T9mab+TNA== X-CSE-MsgGUID: uBHpHoHlSb+hcYTZXMj5Eg== X-IronPort-AV: E=Sophos;i="6.21,232,1763449200"; d="scan'208";a="51290364" X-Amp-Result: SKIPPED(no attachment in message) Received: from unknown (HELO email.microchip.com) ([170.129.1.10]) by esa4.microchip.iphmx.com with ESMTP/TLS/ECDHE-RSA-AES128-GCM-SHA256; 16 Jan 2026 13:07:33 -0700 Received: from chn-vm-ex02.mchp-main.com (10.10.85.144) by chn-vm-ex03.mchp-main.com (10.10.85.151) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.58; Fri, 16 Jan 2026 13:07:04 -0700 Received: from ryan-Precision-3630-Tower.microchip.com (10.10.85.11) by chn-vm-ex02.mchp-main.com (10.10.85.144) with Microsoft SMTP Server id 15.1.2507.58 via Frontend Transport; Fri, 16 Jan 2026 13:07:04 -0700 From: To: , , , , , , , CC: , , , , Subject: [PATCH v5 05/31] clk: at91: clk-peripheral: switch to clk_parent_data Date: Fri, 16 Jan 2026 13:06:58 -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 Use struct clk_parent_data instead of parent_hw for peripheral clocks. The clk_parent_data is a more modern approach to the clock parent registration. Signed-off-by: Claudiu Beznea [ryan.wanner@microchip.com: Add SAMA7D65 and SAM9X7 SoCs to the use the structs.] Signed-off-by: Ryan Wanner Reviewed-by: Claudiu Beznea --- drivers/clk/at91/clk-peripheral.c | 16 ++++++++-------- drivers/clk/at91/pmc.h | 4 ++-- drivers/clk/at91/sam9x7.c | 2 +- drivers/clk/at91/sama7d65.c | 2 +- drivers/clk/at91/sama7g5.c | 2 +- 5 files changed, 13 insertions(+), 13 deletions(-) diff --git a/drivers/clk/at91/clk-peripheral.c b/drivers/clk/at91/clk-perip= heral.c index e700f40fd87f..497724811141 100644 --- a/drivers/clk/at91/clk-peripheral.c +++ b/drivers/clk/at91/clk-peripheral.c @@ -97,7 +97,7 @@ static const struct clk_ops peripheral_ops =3D { =20 struct clk_hw * __init at91_clk_register_peripheral(struct regmap *regmap, const char *name, - const char *parent_name, struct clk_hw *parent_hw, + const char *parent_name, struct clk_parent_data *parent_data, u32 id) { struct clk_peripheral *periph; @@ -105,7 +105,7 @@ at91_clk_register_peripheral(struct regmap *regmap, con= st char *name, struct clk_hw *hw; int ret; =20 - if (!name || !(parent_name || parent_hw) || id > PERIPHERAL_ID_MAX) + if (!name || !(parent_name || parent_data) || id > PERIPHERAL_ID_MAX) return ERR_PTR(-EINVAL); =20 periph =3D kzalloc(sizeof(*periph), GFP_KERNEL); @@ -114,8 +114,8 @@ at91_clk_register_peripheral(struct regmap *regmap, con= st char *name, =20 init.name =3D name; init.ops =3D &peripheral_ops; - if (parent_hw) - init.parent_hws =3D (const struct clk_hw **)&parent_hw; + if (parent_data) + init.parent_data =3D (const struct clk_parent_data *)parent_data; else init.parent_names =3D &parent_name; init.num_parents =3D 1; @@ -458,7 +458,7 @@ struct clk_hw * __init at91_clk_register_sam9x5_peripheral(struct regmap *regmap, spinlock_t *loc= k, const struct clk_pcr_layout *layout, const char *name, const char *parent_name, - struct clk_hw *parent_hw, + struct clk_parent_data *parent_data, u32 id, const struct clk_range *range, int chg_pid, unsigned long flags) { @@ -467,7 +467,7 @@ at91_clk_register_sam9x5_peripheral(struct regmap *regm= ap, spinlock_t *lock, struct clk_hw *hw; int ret; =20 - if (!name || !(parent_name || parent_hw)) + if (!name || !(parent_name || parent_data)) return ERR_PTR(-EINVAL); =20 periph =3D kzalloc(sizeof(*periph), GFP_KERNEL); @@ -475,8 +475,8 @@ at91_clk_register_sam9x5_peripheral(struct regmap *regm= ap, spinlock_t *lock, return ERR_PTR(-ENOMEM); =20 init.name =3D name; - if (parent_hw) - init.parent_hws =3D (const struct clk_hw **)&parent_hw; + if (parent_data) + init.parent_data =3D (const struct clk_parent_data *)parent_data; else init.parent_names =3D &parent_name; init.num_parents =3D 1; diff --git a/drivers/clk/at91/pmc.h b/drivers/clk/at91/pmc.h index 577a6db65ed0..950a4e570ebe 100644 --- a/drivers/clk/at91/pmc.h +++ b/drivers/clk/at91/pmc.h @@ -229,13 +229,13 @@ at91_clk_sama7g5_register_master(struct regmap *regma= p, =20 struct clk_hw * __init at91_clk_register_peripheral(struct regmap *regmap, const char *name, - const char *parent_name, struct clk_hw *parent_hw, + const char *parent_name, struct clk_parent_data *parent_data, u32 id); struct clk_hw * __init at91_clk_register_sam9x5_peripheral(struct regmap *regmap, spinlock_t *loc= k, const struct clk_pcr_layout *layout, const char *name, const char *parent_name, - struct clk_hw *parent_hw, + struct clk_parent_data *parent_data, u32 id, const struct clk_range *range, int chg_pid, unsigned long flags); =20 diff --git a/drivers/clk/at91/sam9x7.c b/drivers/clk/at91/sam9x7.c index 6ec4d09e0b56..a764f2fe0f23 100644 --- a/drivers/clk/at91/sam9x7.c +++ b/drivers/clk/at91/sam9x7.c @@ -930,7 +930,7 @@ static void __init sam9x7_pmc_setup(struct device_node = *np) hw =3D at91_clk_register_sam9x5_peripheral(regmap, &pmc_pcr_lock, &sam9x7_pcr_layout, sam9x7_periphck[i].n, - NULL, sam9x7_pmc->chws[PMC_MCK], + NULL, &AT91_CLK_PD_HW(sam9x7_pmc->chws[PMC_MCK]), sam9x7_periphck[i].id, &range, INT_MIN, sam9x7_periphck[i].f); diff --git a/drivers/clk/at91/sama7d65.c b/drivers/clk/at91/sama7d65.c index fd4bf70323ab..7d99823ec5dc 100644 --- a/drivers/clk/at91/sama7d65.c +++ b/drivers/clk/at91/sama7d65.c @@ -1310,7 +1310,7 @@ static void __init sama7d65_pmc_setup(struct device_n= ode *np) &sama7d65_pcr_layout, sama7d65_periphck[i].n, NULL, - sama7d65_mckx[sama7d65_periphck[i].p].hw, + &AT91_CLK_PD_HW(sama7d65_mckx[sama7d65_periphck[i].p].hw), sama7d65_periphck[i].id, &sama7d65_periphck[i].r, sama7d65_periphck[i].chgp ? 0 : diff --git a/drivers/clk/at91/sama7g5.c b/drivers/clk/at91/sama7g5.c index c6550044cba1..e4c18b8a5c20 100644 --- a/drivers/clk/at91/sama7g5.c +++ b/drivers/clk/at91/sama7g5.c @@ -1183,7 +1183,7 @@ static void __init sama7g5_pmc_setup(struct device_no= de *np) &sama7g5_pcr_layout, sama7g5_periphck[i].n, NULL, - sama7g5_mckx[sama7g5_periphck[i].p].hw, + &AT91_CLK_PD_HW(sama7g5_mckx[sama7g5_periphck[i].p].hw), sama7g5_periphck[i].id, &sama7g5_periphck[i].r, sama7g5_periphck[i].chgp ? 0 : --=20 2.43.0