public inbox for linux-clk@vger.kernel.org
 help / color / mirror / Atom feed
From: Conor Dooley <conor@kernel.org>
To: Adrian Hunter <adrian.hunter@intel.com>
Cc: Manikandan Muralidharan <manikandan.m@microchip.com>,
	alexandre.belloni@bootlin.com, Frank.Li@nxp.com, robh@kernel.org,
	krzk+dt@kernel.org, conor+dt@kernel.org,
	nicolas.ferre@microchip.com, claudiu.beznea@tuxon.dev,
	linux@armlinux.org.uk, mturquette@baylibre.com, sboyd@kernel.org,
	ardb@kernel.org, ebiggers@google.com, martin.petersen@oracle.com,
	tytso@mit.edu, cristian.birsan@microchip.com,
	jarkko.nikula@linux.intel.com, kees@kernel.org,
	npitre@baylibre.com, linux-i3c@lists.infradead.org,
	devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org, linux-clk@vger.kernel.org
Subject: Re: [PATCH v3 3/5] i3c: mipi-i3c-hci: add microchip sama7d65 SoC compatible with the appropriate quirk
Date: Thu, 12 Mar 2026 17:52:36 +0000	[thread overview]
Message-ID: <20260312-ricotta-unusable-44c25a03eff8@spud> (raw)
In-Reply-To: <a41378a0-d2f1-4fa4-ac6d-1d0916590b47@intel.com>

[-- Attachment #1: Type: text/plain, Size: 2475 bytes --]

On Thu, Mar 12, 2026 at 11:29:25AM +0200, Adrian Hunter wrote:
> On 12/03/2026 06:20, Manikandan Muralidharan wrote:
> > Add support for microchip sama7d65 SoC I3C HCI master only IP
> > with additional clock support to enable bulk clock acquisition
> > for Microchip platforms using HCI_QUIRK_CLK_SUPPORT quirk.
> > Introduce MCHP_I3C_CLK_IDX to define the maximum peripheral
> > clock index
> > 
> > Signed-off-by: Manikandan Muralidharan <manikandan.m@microchip.com>
> > ---
> > Changes in v3:
> > - Make use of existing HCI_QUIRK_* code base
> > - Introduce HCI_QUIRK_CLK_SUPPORT to handle/enable the required Peripheral
> > and system generic clk in bulk
> > 
> > Changes in v2:
> > - Platform specific changes are integrated in the existing mipi-i3c-hci
> > driver by introducing separate MCHP_HCI_QUIRK_* quirks and vendor
> > specific quirk files
> > 
> > ---
> >  drivers/i3c/master/mipi-i3c-hci/core.c | 12 ++++++++++++
> >  drivers/i3c/master/mipi-i3c-hci/hci.h  |  4 ++++
> >  2 files changed, 16 insertions(+)
> > 
> > diff --git a/drivers/i3c/master/mipi-i3c-hci/core.c b/drivers/i3c/master/mipi-i3c-hci/core.c
> > index 5879bba78164..6b7716bd517e 100644
> > --- a/drivers/i3c/master/mipi-i3c-hci/core.c
> > +++ b/drivers/i3c/master/mipi-i3c-hci/core.c
> > @@ -8,6 +8,7 @@
> >   */
> >  
> >  #include <linux/bitfield.h>
> > +#include <linux/clk.h>
> >  #include <linux/device.h>
> >  #include <linux/errno.h>
> >  #include <linux/i3c/master.h>
> > @@ -918,6 +919,7 @@ static int i3c_hci_probe(struct platform_device *pdev)
> >  {
> >  	const struct mipi_i3c_hci_platform_data *pdata = pdev->dev.platform_data;
> >  	struct i3c_hci *hci;
> > +	struct clk_bulk_data *clks;
> >  	int irq, ret;
> >  
> >  	hci = devm_kzalloc(&pdev->dev, sizeof(*hci), GFP_KERNEL);
> > @@ -946,6 +948,13 @@ static int i3c_hci_probe(struct platform_device *pdev)
> >  	if (!hci->quirks && platform_get_device_id(pdev))
> >  		hci->quirks = platform_get_device_id(pdev)->driver_data;
> >  
> > +	if (hci->quirks & HCI_QUIRK_CLK_SUPPORT) {
> > +		ret = devm_clk_bulk_get_all_enabled(&pdev->dev, &clks);
> > +		if (ret < MCHP_I3C_CLK_IDX)
> 
> Is MCHP_I3C_CLK_IDX really needed?  Why not just:
> 
> 		if (ret <= 0)
> 
> i.e. don't you anyway have to assume DT has the clocks defined
> correctly.

Ye, I think this is kinda silly. Trust dtbs_check to have the correct
number for your platform set, and let this be specific.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

  reply	other threads:[~2026-03-12 17:52 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-12  4:20 [PATCH v3 0/5] Add microchip sama7d65 SoC I3C support Manikandan Muralidharan
2026-03-12  4:20 ` [PATCH v3 1/5] dt-bindings: i3c: mipi-i3c-hci: add Microchip SAMA7D65 compatible Manikandan Muralidharan
2026-03-12 17:50   ` Conor Dooley
2026-03-12  4:20 ` [PATCH v3 2/5] clk: at91: sama7d65: add peripheral clock for I3C Manikandan Muralidharan
2026-03-12  4:20 ` [PATCH v3 3/5] i3c: mipi-i3c-hci: add microchip sama7d65 SoC compatible with the appropriate quirk Manikandan Muralidharan
2026-03-12  9:29   ` Adrian Hunter
2026-03-12 17:52     ` Conor Dooley [this message]
2026-03-16  6:36       ` Manikandan.M
2026-03-12  4:20 ` [PATCH v3 4/5] ARM: dts: microchip: add I3C controller Manikandan Muralidharan
2026-03-12  4:20 ` [PATCH v3 5/5] ARM: configs: at91: sama7: add sama7d65 i3c-hci Manikandan Muralidharan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260312-ricotta-unusable-44c25a03eff8@spud \
    --to=conor@kernel.org \
    --cc=Frank.Li@nxp.com \
    --cc=adrian.hunter@intel.com \
    --cc=alexandre.belloni@bootlin.com \
    --cc=ardb@kernel.org \
    --cc=claudiu.beznea@tuxon.dev \
    --cc=conor+dt@kernel.org \
    --cc=cristian.birsan@microchip.com \
    --cc=devicetree@vger.kernel.org \
    --cc=ebiggers@google.com \
    --cc=jarkko.nikula@linux.intel.com \
    --cc=kees@kernel.org \
    --cc=krzk+dt@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-clk@vger.kernel.org \
    --cc=linux-i3c@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=manikandan.m@microchip.com \
    --cc=martin.petersen@oracle.com \
    --cc=mturquette@baylibre.com \
    --cc=nicolas.ferre@microchip.com \
    --cc=npitre@baylibre.com \
    --cc=robh@kernel.org \
    --cc=sboyd@kernel.org \
    --cc=tytso@mit.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox