[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CADrjBPpchS0NdqS-mRmmatOksGHc4KdRniJXGDPTS1z73eU9kA@mail.gmail.com>
Date: Wed, 24 Jan 2024 10:21:05 +0000
From: Peter Griffin <peter.griffin@...aro.org>
To: Arnd Bergmann <arnd@...db.de>
Cc: Rob Herring <robh+dt@...nel.org>, krzysztof.kozlowski+dt@...aro.org,
Guenter Roeck <linux@...ck-us.net>, Wim Van Sebroeck <wim@...ux-watchdog.org>,
Conor Dooley <conor+dt@...nel.org>, Alim Akhtar <alim.akhtar@...sung.com>, jaewon02.kim@...sung.com,
chanho61.park@...sung.com, Sam Protsenko <semen.protsenko@...aro.org>,
kernel-team@...roid.com, Tudor Ambarus <tudor.ambarus@...aro.org>,
André Draszik <andre.draszik@...aro.org>,
saravanak@...gle.com, William McVicker <willmcvicker@...gle.com>, linux-fsd@...la.com,
linux-watchdog@...r.kernel.org, devicetree@...r.kernel.org,
linux-kernel@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
linux-samsung-soc@...r.kernel.org
Subject: Re: [PATCH 2/9] soc: samsung: exynos-pmu: Add exynos_pmu_update/read/write
APIs and SoC quirks
Hi Arnd,
On Tue, 23 Jan 2024 at 08:11, Arnd Bergmann <arnd@...db.de> wrote:
>
> On Mon, Jan 22, 2024, at 23:57, Peter Griffin wrote:
>
> > --- a/include/linux/soc/samsung/exynos-pmu.h
> > +++ b/include/linux/soc/samsung/exynos-pmu.h
> > @@ -21,11 +21,39 @@ enum sys_powerdown {
> > extern void exynos_sys_powerdown_conf(enum sys_powerdown mode);
> > #ifdef CONFIG_EXYNOS_PMU
> > extern struct regmap *exynos_get_pmu_regmap(void);
> > +extern int exynos_pmu_update_bits(unsigned int offset, unsigned int
> > mask,
> > + unsigned int val);
> > +extern int exynos_pmu_update(unsigned int offset, unsigned int mask,
> > + unsigned int val);
> > +extern int exynos_pmu_write(unsigned int offset, unsigned int val);
> > +extern int exynos_pmu_read(unsigned int offset, unsigned int *val);
> > #else
> > static inline struct regmap *exynos_get_pmu_regmap(void)
> > {
> > return ERR_PTR(-ENODEV);
> > }
> > +
> > +static inline int exynos_pmu_update_bits(unsigned int offset, unsigned
> > int mask,
> > + unsigned int val);
> > +{
> > + return ERR_PTR(-ENODEV);
> > +}
> > +
> > +static inline int exynos_pmu_update(unsigned int offset, unsigned int
> > mask,
> > + unsigned int val);
> > +{
> > + return ERR_PTR(-ENODEV);
> > +}
>
> This won't build since you have the wrong return type.
> I would suggest you just remove the #ifdef check entirely
> and instead require drivers using this to have correct
> dependencies.
Whoops, will fix it in v2. We need those stubs for platforms like
ARCH_S3C64XX that don't have a PMU but use some of the same drivers.
Thanks,
Peter.
Powered by blists - more mailing lists