Re: [PATCH] mmc: sdhci-cadence: enable probing from ACPI

From: Kathpalia, Tanmay

Date: Fri Nov 06 2026 - 14:06:07 EST



On 04-11-2026 21:48, Paul Cercueil wrote:
Le mercredi 04 novembre 2026 à 18:05 +0200, Adrian Hunter a écrit :
On 04/11/2026 16:38, Paul Cercueil wrote:
Hi Adrian,

Le mercredi 04 novembre 2026 à 16:30 +0200, Adrian Hunter a écrit :
On 03/11/2026 11:35, Paul Cercueil wrote:
Use the device property API instead of the OF-specific property API.
This way, the driver will also probe from ACPI.

Note the change in the core's probe function for SD6HC. We can't have
named clocks in ACPI.
Do you mean in the future?  ACPI does not provide clocks at all
at the moment does it?  Otherwise, clocks registered directly by
clk_register_clkdev() can have names.  Maybe I misunderstand,
but perhaps clarify the commit message.
I sent another patch in parallel of this one, that adds basic support for
clock
resources introduced in ACPI 6.5:

https://lore.kernel.org/linux-acpi/20261103084718.8222-1-paul.cercueil@xxxxxxxxxxx/T/#u

Would have been worth mentioning that in a cover letter.

Seems like it gives the clock a name

+ snprintf(name, sizeof(name), "%s-clk%u", dev_name(dev), data-
idx++);
+
+ err = devm_clk_hw_register_clkdev(dev, clk, name,
dev_name(dev));

 but clk_find() doesn't look like it would match then - the comment says:
 *  An entry with a NULL ID is assumed to be a wildcard.
 *  If an entry has a device ID, it must match
 *  If an entry has a connection ID, it must match <------
You're missing part 3 ;)

https://lore.kernel.org/linux-arm-kernel/20261103084915.8405-1-paul.cercueil@xxxxxxxxxxx/T/#u

I also considered not giving them a name (which wouldn't require the clkdev
patch), but thought that there's probably some ACPI tables out there that
provide more than one fixed clock for the same device, so it felt like the
safest option.
Note that on ACPI the driver requests a single unnamed clock and uses
it as "ciu"; with the proposed clkdev change this resolves to the first
clock registered for the device. The "biu" bus clock is not requested
and is expected to be kept enabled by firmware.

Acked-by: Tanmay Kathpalia <tanmay.kathpalia@xxxxxxxxxx>