From nobody Thu Apr 16 20:47:15 2026 Received: from smtpout-04.galae.net (smtpout-04.galae.net [185.171.202.116]) (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 52B293E8C60; Wed, 25 Feb 2026 16:55:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.171.202.116 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772038515; cv=none; b=BSt0JLCVuKsmPGQpdGX428ZTpUS8cESKUhNYI3JTCX8wLMidzQ4VJgDo3bmMh3haw0wM+AeC/9BiX/3r1NhNpXEno0pU2Gv0mFfDIn2cf3jAoxGQF37JJCvuYBW80Z+pv616GdcDmOP9y6x1o+sILYGNnh+jGLpK52DsUJFEszI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772038515; c=relaxed/simple; bh=iPFsYMLAx1R2yOQB7tVRw00Ji1LFl3ATxOGwCFzG/+w=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=IzrBgKQnye2oQFa5a1WStNjHcxqYm3Of/Z8MZeTZCrf/N9lrvQ+VUcemkc+o+DpzF9QYUuauH5EKv06ilXFO++o7ETxg4GEMXiL+7/Qpb1/AOH+f0A7MKxcD5MJQdQCqYCcx2/I2Qpnu4sQeFOKPk0MAbkHCAGj1cdAaZ9QhNaU= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com; spf=pass smtp.mailfrom=bootlin.com; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b=plsFmITF; arc=none smtp.client-ip=185.171.202.116 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bootlin.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b="plsFmITF" Received: from smtpout-01.galae.net (smtpout-01.galae.net [212.83.139.233]) by smtpout-04.galae.net (Postfix) with ESMTPS id 2491DC111B4; Wed, 25 Feb 2026 16:55:28 +0000 (UTC) Received: from mail.galae.net (mail.galae.net [212.83.136.155]) by smtpout-01.galae.net (Postfix) with ESMTPS id 169AB5FDE6; Wed, 25 Feb 2026 16:55:13 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id 1A20E103692E2; Wed, 25 Feb 2026 17:55:09 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=dkim; t=1772038511; h=from:subject:date:message-id:to:cc:mime-version:content-type: content-transfer-encoding:in-reply-to:references; bh=frJ14FegyZJhUB617IkhRN7f4MVVi0jFeVRgwMEUP9g=; b=plsFmITFpTy28gmcO1Jx0brrIlaiuJCKY8vQ8mHjQeOy7t3uQQqxjVo7W2rgdEYt6PyvaK hiqhzEEYKzDGcLZQKDu7oZY7v1PtxlL6dFgI7NgHLYLE1geqbEVscZf2lqNCUyb+CE5Zsf ZXArlIt3IIwkX8ZnDK2GE7DSKAZzuWu4IFJDnluhBrNPzCmla+T4RjL4Kg22Lo2wzQxAcX 1XDo9e/KjCKC/pAtwFynz7elzvBBvISQqqZhJ20KPY7R71lLQIdR8saGMcMai2SFnYiWZ1 EYxrXRVMe1o1AyE3I+Xk4YN4r5qK7o0t7cK0umXM3mfMMTs0WQC3xMH1LD3Svg== From: =?utf-8?q?Th=C3=A9o_Lebrun?= Date: Wed, 25 Feb 2026 17:55:05 +0100 Subject: [PATCH v7 1/3] clk: eyeq: use the auxiliary device creation helper Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260225-macb-phy-v7-1-665bd8619d51@bootlin.com> References: <20260225-macb-phy-v7-0-665bd8619d51@bootlin.com> In-Reply-To: <20260225-macb-phy-v7-0-665bd8619d51@bootlin.com> To: Michael Turquette , Stephen Boyd , Philipp Zabel Cc: linux-mips@vger.kernel.org, linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org, Vladimir Kondratiev , Gregory CLEMENT , =?utf-8?q?Beno=C3=AEt_Monin?= , Tawfik Bayouk , Thomas Petazzoni , Luca Ceresoli , =?utf-8?q?Th=C3=A9o_Lebrun?= , Jerome Brunet X-Mailer: b4 0.14.3 X-Last-TLS-Session-Version: TLSv1.3 From: Jerome Brunet The auxiliary device creation of this driver is simple enough to use the available auxiliary device creation helper. Use it and remove some boilerplate code. Tested-by: Th=C3=A9o Lebrun # On Mobileye EyeQ5 Signed-off-by: Jerome Brunet Reviewed-by: Luca Ceresoli Signed-off-by: Th=C3=A9o Lebrun --- drivers/clk/clk-eyeq.c | 57 +++++++++++-----------------------------------= ---- 1 file changed, 12 insertions(+), 45 deletions(-) diff --git a/drivers/clk/clk-eyeq.c b/drivers/clk/clk-eyeq.c index 81137269352d..b231d6deb209 100644 --- a/drivers/clk/clk-eyeq.c +++ b/drivers/clk/clk-eyeq.c @@ -322,38 +322,18 @@ static void eqc_probe_init_fixed_factors(struct devic= e *dev, } } =20 -static void eqc_auxdev_release(struct device *dev) -{ - struct auxiliary_device *adev =3D to_auxiliary_dev(dev); - - kfree(adev); -} - -static int eqc_auxdev_create(struct device *dev, void __iomem *base, - const char *name, u32 id) +static void eqc_auxdev_create_optional(struct device *dev, void __iomem *b= ase, + const char *name) { struct auxiliary_device *adev; - int ret; =20 - adev =3D kzalloc_obj(*adev); - if (!adev) - return -ENOMEM; - - adev->name =3D name; - adev->dev.parent =3D dev; - adev->dev.platform_data =3D (void __force *)base; - adev->dev.release =3D eqc_auxdev_release; - adev->id =3D id; - - ret =3D auxiliary_device_init(adev); - if (ret) - return ret; - - ret =3D auxiliary_device_add(adev); - if (ret) - auxiliary_device_uninit(adev); - - return ret; + if (name) { + adev =3D devm_auxiliary_device_create(dev, name, + (void __force *)base); + if (!adev) + dev_warn(dev, "failed creating auxiliary device %s.%s\n", + KBUILD_MODNAME, name); + } } =20 static int eqc_probe(struct platform_device *pdev) @@ -365,7 +345,6 @@ static int eqc_probe(struct platform_device *pdev) unsigned int i, clk_count; struct resource *res; void __iomem *base; - int ret; =20 data =3D device_get_match_data(dev); if (!data) @@ -379,21 +358,9 @@ static int eqc_probe(struct platform_device *pdev) if (!base) return -ENOMEM; =20 - /* Init optional reset auxiliary device. */ - if (data->reset_auxdev_name) { - ret =3D eqc_auxdev_create(dev, base, data->reset_auxdev_name, 0); - if (ret) - dev_warn(dev, "failed creating auxiliary device %s.%s: %d\n", - KBUILD_MODNAME, data->reset_auxdev_name, ret); - } - - /* Init optional pinctrl auxiliary device. */ - if (data->pinctrl_auxdev_name) { - ret =3D eqc_auxdev_create(dev, base, data->pinctrl_auxdev_name, 0); - if (ret) - dev_warn(dev, "failed creating auxiliary device %s.%s: %d\n", - KBUILD_MODNAME, data->pinctrl_auxdev_name, ret); - } + /* Init optional auxiliary devices. */ + eqc_auxdev_create_optional(dev, base, data->reset_auxdev_name); + eqc_auxdev_create_optional(dev, base, data->pinctrl_auxdev_name); =20 if (data->pll_count + data->div_count + data->fixed_factor_count =3D=3D 0) return 0; /* Zero clocks, we are done. */ --=20 2.53.0 From nobody Thu Apr 16 20:47:15 2026 Received: from smtpout-03.galae.net (smtpout-03.galae.net [185.246.85.4]) (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 39CA43D4130 for ; Wed, 25 Feb 2026 16:55:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.246.85.4 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772038517; cv=none; b=SXHpUa3eJ0nW8QuFw8vX9EM6pqHkb8EPjPbneu0XEWQKa9anHlV1yXrx2/fABCHEVgNFR1hwU+X6HvcWn2MQQtmzEBLxlEg5nE/jPpfp3iPNYrQ+rrqSNamHHkW/jcfy1/pN15JCYvhoGzMpSiPwM1zFPFKmf9A6bCuw/E2dMOg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772038517; c=relaxed/simple; bh=PbGpFBj9qp+Llus0hehY8FLiL5lje6mv6zQ7hxqifSU=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=deZdUbf/ZqlKedfB3xgNlCAkvpPKOQZqL4KmmZtXENOeo3iZqLsmRf+CxZyHVW9sDGef4sRk5kmDfH/MmqfzIO23RIS5xZjLo9lxqXBHN6ZdL5MVO4lZh+RoVnheEuyb59r7ulNFkT2XbYZJRu4LvqXF3VbtSslqEKghhkrr+Lg= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com; spf=pass smtp.mailfrom=bootlin.com; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b=MLeemIdo; arc=none smtp.client-ip=185.246.85.4 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bootlin.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b="MLeemIdo" Received: from smtpout-01.galae.net (smtpout-01.galae.net [212.83.139.233]) by smtpout-03.galae.net (Postfix) with ESMTPS id E613D4E41120; Wed, 25 Feb 2026 16:55:14 +0000 (UTC) Received: from mail.galae.net (mail.galae.net [212.83.136.155]) by smtpout-01.galae.net (Postfix) with ESMTPS id BCAF25FDE6; Wed, 25 Feb 2026 16:55:14 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id 7A8FA103692EE; Wed, 25 Feb 2026 17:55:12 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=dkim; t=1772038513; h=from:subject:date:message-id:to:cc:mime-version:content-type: content-transfer-encoding:in-reply-to:references; bh=M3FVqMMxkPIBexwhcE3EDBfny5EWj2r5T4da/rXsAnk=; b=MLeemIdoI3PcLu3FVKeosNH0Mf9kwkMnR9pS/BmtaAK6HlRQMLVAu7ZuyNAxLkOUWoAJZn jZmHuX0a9/GZ6LD5ZYE7ZOCTRCMuCMZ6D7VBQ+fUcjiMwUiB/jNU+xQliO57mRG2ij9Kba 9QeF68w8tfoHlavk2+G9IiencLcI74VI+hdibFx+f7qXmup8ysovhosYv6X5GNydW+BUR4 YULDKee3wc5etIGMfiieLY7NC1Isu7FEYOzzFIj1zhFNfvAxDMQJ1yEOsytXSBt9Ty0ovb /vZndWn8U9bM0kRl3+/68/L0fNNn2Whtd4e9jnF6yTF0BKJCHlA+Kasxvm0wSA== From: =?utf-8?q?Th=C3=A9o_Lebrun?= Date: Wed, 25 Feb 2026 17:55:06 +0100 Subject: [PATCH v7 2/3] clk: eyeq: add EyeQ5 children auxiliary device for generic PHYs Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260225-macb-phy-v7-2-665bd8619d51@bootlin.com> References: <20260225-macb-phy-v7-0-665bd8619d51@bootlin.com> In-Reply-To: <20260225-macb-phy-v7-0-665bd8619d51@bootlin.com> To: Michael Turquette , Stephen Boyd , Philipp Zabel Cc: linux-mips@vger.kernel.org, linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org, Vladimir Kondratiev , Gregory CLEMENT , =?utf-8?q?Beno=C3=AEt_Monin?= , Tawfik Bayouk , Thomas Petazzoni , Luca Ceresoli , =?utf-8?q?Th=C3=A9o_Lebrun?= X-Mailer: b4 0.14.3 X-Last-TLS-Session-Version: TLSv1.3 Grow our clk-eyeq family; it knows how to spawn reset provider and pin controller children. Expand with a generic PHY driver on EyeQ5. Reviewed-by: Luca Ceresoli Signed-off-by: Th=C3=A9o Lebrun --- drivers/clk/clk-eyeq.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/clk/clk-eyeq.c b/drivers/clk/clk-eyeq.c index b231d6deb209..b17f47fda1da 100644 --- a/drivers/clk/clk-eyeq.c +++ b/drivers/clk/clk-eyeq.c @@ -109,6 +109,7 @@ struct eqc_match_data { =20 const char *reset_auxdev_name; const char *pinctrl_auxdev_name; + const char *eth_phy_auxdev_name; =20 unsigned int early_clk_count; }; @@ -361,6 +362,7 @@ static int eqc_probe(struct platform_device *pdev) /* Init optional auxiliary devices. */ eqc_auxdev_create_optional(dev, base, data->reset_auxdev_name); eqc_auxdev_create_optional(dev, base, data->pinctrl_auxdev_name); + eqc_auxdev_create_optional(dev, base, data->eth_phy_auxdev_name); =20 if (data->pll_count + data->div_count + data->fixed_factor_count =3D=3D 0) return 0; /* Zero clocks, we are done. */ @@ -521,6 +523,7 @@ static const struct eqc_match_data eqc_eyeq5_match_data= =3D { =20 .reset_auxdev_name =3D "reset", .pinctrl_auxdev_name =3D "pinctrl", + .eth_phy_auxdev_name =3D "phy", =20 .early_clk_count =3D ARRAY_SIZE(eqc_eyeq5_early_plls) + ARRAY_SIZE(eqc_eyeq5_early_fixed_factors), --=20 2.53.0 From nobody Thu Apr 16 20:47:15 2026 Received: from smtpout-03.galae.net (smtpout-03.galae.net [185.246.85.4]) (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 F2F953E95B0 for ; Wed, 25 Feb 2026 16:55:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.246.85.4 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772038521; cv=none; b=C2vzGeCsOEW5HZRijK909hpKiKIkh49zboWrTQ3p3reLDIKPjKPgJya4HTtjVPm9M9yd3hmGqNOqVjLA6/G+F0CjZVOSowwz7nb6mxcSQgWJPTumLjokjnCBmVBK8SIiALhPZvGAvYYKU4We/hbzLyVKCsYj0tyFKwVGkabqBK0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772038521; c=relaxed/simple; bh=of/YEzm7FgG2yPHCXlT6dFmVJxrfoekd4yiJn8jylBQ=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=CKcxhxunuFUmHg5r/+x+zTnAdcXmMzITY5kNp5y+z3dL9FXYjmEtPFDDaaMHX6ru+DIrs0cc0YD4i3jauNgyRSm4CRAn+ZHHhygtHRyJVlFRbXz89I0l6evt56Ta9a/gQPoD+DL28bObSR4azTAZ46jLZepDP6uWkXWilySVYAM= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com; spf=pass smtp.mailfrom=bootlin.com; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b=YFKbFtpe; arc=none smtp.client-ip=185.246.85.4 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bootlin.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b="YFKbFtpe" Received: from smtpout-01.galae.net (smtpout-01.galae.net [212.83.139.233]) by smtpout-03.galae.net (Postfix) with ESMTPS id A04264E41121; Wed, 25 Feb 2026 16:55:16 +0000 (UTC) Received: from mail.galae.net (mail.galae.net [212.83.136.155]) by smtpout-01.galae.net (Postfix) with ESMTPS id 766025FDE6; Wed, 25 Feb 2026 16:55:16 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id 2E6BB103692EF; Wed, 25 Feb 2026 17:55:14 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=dkim; t=1772038515; h=from:subject:date:message-id:to:cc:mime-version:content-type: content-transfer-encoding:in-reply-to:references; bh=5DDlT1zh/U2lv9Nutzq4Z1uXsMIxCkm7M1Z/vhP6/jc=; b=YFKbFtpeR5kxPPQKtZiN9Uz3KAYaFRiqPa0nPcXEjGhIzDkkkWRVeoP2qeAK5yzlFV5ikd 7kCmQ7UMMjKK1AdXZeaeohFJwpy+pS9b64YM6cIkIZyGY8NyI91Y0wjUp9dFHft0sQW94A aQfYqBboGIUecti13wbO2EO7dn590qq3Bxy07esjzHERGCfy+lgegOlAFiNmObF8je2DYs gNwYwCd8mRgoSIoW0frTvB3lnFHTTUooJp6UR+dj+qfD/LLHbs1wBffY1NONsaLcSGku/w nfjfH2yKsdbIDx2RYMQYFZ6b7MfZnJL98aTMaWR5Vvf6bmEip9qZT0QK7DT+Hw== From: =?utf-8?q?Th=C3=A9o_Lebrun?= Date: Wed, 25 Feb 2026 17:55:07 +0100 Subject: [PATCH v7 3/3] reset: eyeq: drop device_set_of_node_from_dev() done by parent Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260225-macb-phy-v7-3-665bd8619d51@bootlin.com> References: <20260225-macb-phy-v7-0-665bd8619d51@bootlin.com> In-Reply-To: <20260225-macb-phy-v7-0-665bd8619d51@bootlin.com> To: Michael Turquette , Stephen Boyd , Philipp Zabel Cc: linux-mips@vger.kernel.org, linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org, Vladimir Kondratiev , Gregory CLEMENT , =?utf-8?q?Beno=C3=AEt_Monin?= , Tawfik Bayouk , Thomas Petazzoni , Luca Ceresoli , =?utf-8?q?Th=C3=A9o_Lebrun?= , Jerome Brunet X-Mailer: b4 0.14.3 X-Last-TLS-Session-Version: TLSv1.3 Our parent driver (clk-eyeq) now does the device_set_of_node_from_dev(dev, dev->parent) call through the newly introduced devm_auxiliary_device_create() helper. Doing it again in the reset-eyeq probe would be redundant. Drop both the WARN_ON() and the device_set_of_node_from_dev() call. Also fix the following comment that talks about "our newfound OF node". Signed-off-by: Jerome Brunet Reviewed-by: Philipp Zabel Acked-by: Philipp Zabel Signed-off-by: Th=C3=A9o Lebrun --- drivers/reset/reset-eyeq.c | 24 ++---------------------- 1 file changed, 2 insertions(+), 22 deletions(-) diff --git a/drivers/reset/reset-eyeq.c b/drivers/reset/reset-eyeq.c index 2d3998368a1c..8018fa895427 100644 --- a/drivers/reset/reset-eyeq.c +++ b/drivers/reset/reset-eyeq.c @@ -410,13 +410,6 @@ static int eqr_of_xlate_twocells(struct reset_controll= er_dev *rcdev, return eqr_of_xlate_internal(rcdev, reset_spec->args[0], reset_spec->args= [1]); } =20 -static void eqr_of_node_put(void *_dev) -{ - struct device *dev =3D _dev; - - of_node_put(dev->of_node); -} - static int eqr_probe(struct auxiliary_device *adev, const struct auxiliary_device_id *id) { @@ -427,21 +420,8 @@ static int eqr_probe(struct auxiliary_device *adev, int ret; =20 /* - * We are an auxiliary device of clk-eyeq. We do not have an OF node by - * default; let's reuse our parent's OF node. - */ - WARN_ON(dev->of_node); - device_set_of_node_from_dev(dev, dev->parent); - if (!dev->of_node) - return -ENODEV; - - ret =3D devm_add_action_or_reset(dev, eqr_of_node_put, dev); - if (ret) - return ret; - - /* - * Using our newfound OF node, we can get match data. We cannot use - * device_get_match_data() because it does not match reused OF nodes. + * Get match data. We cannot use device_get_match_data() because it does + * not accept reused OF nodes; see device_set_of_node_from_dev(). */ match =3D of_match_node(dev->driver->of_match_table, dev->of_node); if (!match || !match->data) --=20 2.53.0