[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAK8P3a38RVe0=i2pObgaOn+HP8cpdKefiac6DcyXuKnyH4xOyA@mail.gmail.com>
Date: Tue, 19 May 2020 15:18:52 +0200
From: Arnd Bergmann <arnd@...db.de>
To: Baolin Wang <baolin.wang7@...il.com>
Cc: Lee Jones <lee.jones@...aro.org>, Mark Brown <broonie@...nel.org>,
Orson Zhai <orsonzhai@...il.com>,
Lyra Zhang <zhang.lyra@...il.com>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v4 1/2] mfd: syscon: Support physical regmap bus
On Sat, May 16, 2020 at 12:13 PM Baolin Wang <baolin.wang7@...il.com> wrote:
>
> Some platforms such as Spreadtrum platform, define a special method to
> update bits of the registers instead of reading and writing, which means
> we should use a physical regmap bus to define the reg_update_bits()
> operation instead of the MMIO regmap bus.
>
> Thus add a a __weak function for the syscon driver to allow to register
> a physical regmap bus to support this new requirement.
>
> };
>
> +struct regmap * __weak syscon_regmap_init(struct device_node *np,
> + void __iomem *base,
> + struct regmap_config *syscon_config)
> +{
> + return regmap_init_mmio(NULL, base, syscon_config);
> +}
> +
Sorry, I don't think the __weak function is going to help here. I'm not
sure whether it actually does what you want when both syscon and
sprd_syscon are loadable modules (I would guess not), but it clearly
won't work when syscon is built-in and sprd_syscon is a module, and
even if the module loader knows how to resolve __weak symbols,
I would not want to rely on module load ordering to make it behave
the right way.
Arnd
Powered by blists - more mailing lists