[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CADBw62pg6F4PiD=jJnrFDmaMN6yh76PSJ1=2_DZjwMJVQ+pFdQ@mail.gmail.com>
Date: Fri, 17 Apr 2020 09:20:59 +0800
From: Baolin Wang <baolin.wang7@...il.com>
To: Arnd Bergmann <arnd@...db.de>
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: [RFC PATCH v2 3/3] soc: sprd: Add Spreadtrum special bits
updating support
On Thu, Apr 16, 2020 at 10:38 PM Arnd Bergmann <arnd@...db.de> wrote:
>
> On Thu, Apr 16, 2020 at 3:49 PM Baolin Wang <baolin.wang7@...il.com> wrote:
>
> >
> > OK, I think adding a Spreadtrum compatible string will be an easy and
> > clear way, so what about below sample code?
> >
> > DT:
> > ap_ahb_regs: syscon@...10000 {
> > compatible = "sprd,sc9860-syscon", "syscon";
> > reg = <0 0x20210000 0 0x10000>;
> > };
> >
> > /* The Spreadtrum syscon need register a real physical regmap bus with
> > new bits updating method. */
> > if (of_device_is_compatible(np, "sprd,sc9860-syscon") && syscon_phy_regmap_bus)
> > regmap = regmap_init(NULL, syscon_phy_regmap_bus, base, &syscon_config);
> > else
> > regmap = regmap_init_mmio(NULL, base, &syscon_config);
>
> Ok, sounds good. Maybe also define another compatible string that
> is more generic than "sprd,sc9860-syscon" (but less generic than
> "syscon") so you can still identify the chip specific syscon area if
> necessary, while not having to list each future chip individually.
OK.
>
> Something like
>
> compatible = "sprd,sc9860-syscon", "sprd,atomic-syscon", "syscon";
>
> Also I'd add an IS_ENABLED() check so it gets the 'else' path
> at compile-time when CONFIG_ARCH_SPRD is disabled.
Sure. Will do in next version. Thanks for your good suggestion.
--
Baolin Wang
Powered by blists - more mailing lists