Re: [PATCH v3 3/5] reset: stm32: use the reset-simple driver
From: Philipp Zabel
Date: Mon Aug 21 2017 - 04:38:22 EST
On Thu, 2017-08-17 at 10:19 +0100, Andre Przywara wrote:
> Hi,
>
> On 16/08/17 21:55, Alexandru Gagniuc wrote:
> >
> >
> > On 08/16/2017 01:52 PM, Andreas FÃrber wrote:
> > > Am 16.08.2017 um 22:50 schrieb Alexandru Gagniuc:
> > > > On 08/16/2017 02:46 AM, Philipp Zabel wrote:
> > > > > The reset-simple driver can be used without changes.
> > > > >
> > > > > Signed-off-by: Philipp Zabel <p.zabel@xxxxxxxxxxxxxx>
> > > >
> > > > > > > > Reviewed-by: Alexandru Gagniuc <alex.g@xxxxxxxxxxxx>
> > > >
> > > > > ---
> > > > > Âdrivers/reset/KconfigÂÂÂÂÂÂÂÂ|ÂÂ11 ++---
> > > > > Âdrivers/reset/MakefileÂÂÂÂÂÂÂ|ÂÂÂ1 -
> > > > > Âdrivers/reset/reset-simple.c |ÂÂÂ1 +
> > > > > Âdrivers/reset/reset-stm32.cÂÂ| 108
> > > > > -------------------------------------------
> > > > > Â4 files changed, 4 insertions(+), 117 deletions(-)
> > > > > Âdelete mode 100644 drivers/reset/reset-stm32.c
> > > > >
> > > > > diff --git a/drivers/reset/Kconfig b/drivers/reset/Kconfig
> > > > > index 78a8f6057985b..29f4487c290fc 100644
> > > > > --- a/drivers/reset/Kconfig
> > > > > +++ b/drivers/reset/Kconfig
> > > > > @@ -70,19 +70,14 @@ config RESET_PISTACHIO
> > > > >
> > > > > Âconfig RESET_SIMPLE
> > > > > ÂÂÂÂÂbool "Simple Reset Controller Driver" if COMPILE_TEST
> > > > > -ÂÂÂÂdefault ARCH_SOCFPGA || ARCH_SUNXI
> > > > > +ÂÂÂÂdefault ARCH_SOCFPGA || ARCH_STM32 || ARCH_SUNXI
> > > >
> > > > If this series gets respun, could you please look into removing the
> > > > ARCH_ dependency here?
> > >
> > > Why?
> >
> > Because the driver has to keep track of all its users, which is a
> > layering violation.
>
> "keep track of all its users": not necessarily, this is mostly for
> convenience reasons to get automatic coverage for those SoCs without
> changing various defconfigs - or distribution .configs, for that matter.
> Especially the latter may prove to be nasty and introduce regressions.
>
> But I see that this list may grow big and this is a bit beyond the scope
> of the otherwise neat "default ARCH_xxx" trick.
>
> So given the generic nature of this driver, can't we make this simply:
> "default ARM || ARM64"
> That would enable it everywhere automatically, but people can still
> disable this if they know what they do.
>
> Alternatively for ARM64 this is actually a candidate for the (one and
> only) defconfig.
I would like to make this driver selectable. but for that to happen,
ARCH_HAS_RESET_CONTROLLER and RESET_CONTROLLER have to be merged into a
single selectable symbol first.
Until then, I'd be fine with making this driver:
bool "Simple Reset Controller Driver"
default ARM || ARM64
but in my opinion it is equally ok to have the default ARCH_* list for
a while.
regards
Philipp