[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAK8P3a22NMzCQHDoE7Ed0a1_f7yOTO4x4PM6KArXJnaaig4ZTw@mail.gmail.com>
Date: Fri, 17 Apr 2020 15:38:49 +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 2/2] soc: sprd: Add Spreadtrum special bits updating support
On Fri, Apr 17, 2020 at 4:14 AM Baolin Wang <baolin.wang7@...il.com> wrote:
> + *
> + * Note: there is a potential risk when users want to set and clear bits
> + * at the same time, since the set/clear method will always do bits setting
> + * before bits clearing, which may cause some unexpected results if the
> + * operation sequence is strict. Thus we recommend that do not set and
> + * clear bits at the same time if you are not sure the results.
Would it make sense to have a
WARN_ONCE(set && clk, "%s: non-atomic update", __func__);
in the code to check for this?
> +static int sprd_syscon_init(void)
> +{
> + syscon_register_phys_regmap_bus(&sprd_syscon_regmap);
> +
> + return 0;
> +}
> +core_initcall_sync(sprd_syscon_init);
This no longer breaks at runtime based on the changes in the other
patch, but I still don't like how you have to manually load this module
on spreadtrum platforms.
What I meant to suggest in my previous reply was to add the regmap_bus
instance into drivers/mfd/syscon.c itself.
Arnd
Powered by blists - more mailing lists