Re: [PATCH 2/2] mfd: syscon: request a regmap with raw spinlocks for some devices
From: Arnd Bergmann
Date: Thu Aug 26 2021 - 10:49:16 EST
On Thu, Aug 26, 2021 at 3:57 PM Vladimir Oltean <vladimir.oltean@xxxxxxx> wrote:
> On Thu, Aug 26, 2021 at 11:24:24AM +0200, Arnd Bergmann wrote:
> So basically you want me to create a platform driver under drivers/soc
> which probes on:
> and does the same thing as syscon, but sets "syscon_config.use_raw_spinlock = true;"
> and that is the only difference?
That would work, but it's not what I was suggesting.
> By the way, how does syscon probe its children exactly? And how would
> this driver probe its children?
syscon does not probe its children. As far as I can tell, your irqchip driver
works by accident because it uses IRQCHIP_DECLARE() rather than
builtin_platform_driver(), so it works even when no platform_device gets
created, as IRQCHIP_DECLARE() just looks for the compatible
string on its own.
My suggestion was to have the driver that binds to the isc node export a
high-level interface such as fsl_isc_set_extirq_polarity(). If the extirq
irqchip driver can work as a platform_driver(), then the new isc driver
can also be responsible for probing its children using the mfd
infrastructure, which solves the probe order problem, and lets you
have child devices that are not irqchip or clock controller.