[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CACRpkdaYzPSVqqhbi2Zop7J9vzCqZZiN=9pAEw1vcWy_ove9Tg@mail.gmail.com>
Date: Fri, 7 Apr 2017 10:27:56 +0200
From: Linus Walleij <linus.walleij@...aro.org>
To: Richard Fitzgerald <rf@...nsource.wolfsonmicro.com>
Cc: Alexandre Courbot <gnurou@...il.com>,
Rob Herring <robh+dt@...nel.org>,
Thomas Gleixner <tglx@...utronix.de>,
Jason Cooper <jason@...edaemon.net>,
Lee Jones <lee.jones@...aro.org>,
Mark Brown <broonie@...nel.org>,
"alsa-devel@...a-project.org" <alsa-devel@...a-project.org>,
"open list:WOLFSON MICROELECTRONICS DRIVERS"
<patches@...nsource.wolfsonmicro.com>,
"linux-gpio@...r.kernel.org" <linux-gpio@...r.kernel.org>,
"devicetree@...r.kernel.org" <devicetree@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 01/16] mfd: madera: Add register definitions for Cirrus
Logic Madera codecs
On Wed, Apr 5, 2017 at 12:07 PM, Richard Fitzgerald
<rf@...nsource.wolfsonmicro.com> wrote:
> This patch adds a header file of register definitions for Cirrus
> Logic "Madera" class codecs. These codecs are all based off a common
> set of hardware IP so have a common register map (with a few minor
> device-to-device variations). These are complex devices with a large
> mber of features and so have a correspondingly large register set.
> The registers.h file has been auto-generated from the hardware register
> definitions, stripped down to only registers we need to access from
> the driver.
>
> Signed-off-by: Richard Fitzgerald <rf@...nsource.wolfsonmicro.com>
This:
include/linux/mfd/madera/registers.h | 8832 ++++++++++++++++++++++++++++++++++
Get included in all subdrivers I suppose?
So you are broadcasting 8800+ lines into every subdriver across the
entire kernel.
Just the time spent in the preprocessor parsing this will affect compilation
time.
Please implement separation of concerns. Move the register definitions into
the drivers, and if they are too large, atleast make a local include file in
sound/soc for the codec parts so the GPIO subdriver does not have
to churn through all this to get its job done.
I know there are other MFD drivers doing this but it's not a good pattern.
Yours,
Linus Walleij
Powered by blists - more mailing lists