All of lore.kernel.org
 help / color / mirror / Atom feed
From: Lee Jones <lee.jones@linaro.org>
To: Richard Fitzgerald <rf@opensource.wolfsonmicro.com>
Cc: gnurou@gmail.com, alsa-devel@alsa-project.org,
	jason@lakedaemon.net, devicetree@vger.kernel.org,
	linus.walleij@linaro.org, patches@opensource.wolfsonmicro.com,
	linux-kernel@vger.kernel.org, robh+dt@kernel.org,
	linux-gpio@vger.kernel.org, broonie@kernel.org,
	tglx@linutronix.de
Subject: Re: [PATCH v4 01/17] mfd: madera: Add register definitions for Cirrus Logic Madera codecs
Date: Tue, 8 Aug 2017 12:03:19 +0100	[thread overview]
Message-ID: <20170808110319.ssagukhfp72r5vys@dell> (raw)
In-Reply-To: <1501235239-11145-2-git-send-email-rf@opensource.wolfsonmicro.com>

On Fri, 28 Jul 2017, Richard Fitzgerald 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).
> 
> The registers.h file is tool-generated directly from the hardware design
> but has been manually stripped down to reduce size (full register
> map is >44000 lines). All names are kept the same as datasheet names
> so that they can be cross-referenced between source and datasheet without
> confusion.
> 
> The register map layout is kept fully-defined rather than factored into
> macros and/or block-indexing code. The major reasons for this are:
> 
>  - #1 is that it makes the source highly greppable, which is important.
>    "What does the driver do with register bits XYZ" or "Where does it use
>    register bits XYZ" are commonly types of questions. These can be quickly
>    answered by a grep. Squashing definitions into generator macros or block-
>    indexing code is a way of defeating grep.
> 
>  - most of the register definitions are used in tables, so a constant value
>    is required. Using generator macros make the table definition clunky and
>    obscure.
> 
>  - the code is clearer when it's there in the source exactly what register
>    and field it is using
> 
>  - it is easier to diff the register map of a new (unsupported) codec against
>    what is already supported and merge in differences
> 
>  - it makes the register map available in source for maintenance/debugging
>    instead of having to refer back to the datasheet for a register map
> 
> Signed-off-by: Richard Fitzgerald <rf@opensource.wolfsonmicro.com>
> ---
> Changes since V3:
> - Manually stripped out a lot more stuff, defines we're not using right now
> - Added the explanation above to the commit message of why we define the
>   map effectively verbatim
> 
>  MAINTAINERS                          |   10 +
>  include/linux/mfd/madera/registers.h | 3987 ++++++++++++++++++++++++++++++++++
>  2 files changed, 3997 insertions(+)
>  create mode 100644 include/linux/mfd/madera/registers.h

For my own reference:
  Acked-for-MFD-by: Lee Jones <lee.jones@linaro.org>

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

WARNING: multiple messages have this Message-ID (diff)
From: Lee Jones <lee.jones@linaro.org>
To: Richard Fitzgerald <rf@opensource.wolfsonmicro.com>
Cc: broonie@kernel.org, linus.walleij@linaro.org, gnurou@gmail.com,
	robh+dt@kernel.org, tglx@linutronix.de, jason@lakedaemon.net,
	alsa-devel@alsa-project.org, patches@opensource.wolfsonmicro.com,
	linux-gpio@vger.kernel.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v4 01/17] mfd: madera: Add register definitions for Cirrus Logic Madera codecs
Date: Tue, 8 Aug 2017 12:03:19 +0100	[thread overview]
Message-ID: <20170808110319.ssagukhfp72r5vys@dell> (raw)
In-Reply-To: <1501235239-11145-2-git-send-email-rf@opensource.wolfsonmicro.com>

On Fri, 28 Jul 2017, Richard Fitzgerald 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).
> 
> The registers.h file is tool-generated directly from the hardware design
> but has been manually stripped down to reduce size (full register
> map is >44000 lines). All names are kept the same as datasheet names
> so that they can be cross-referenced between source and datasheet without
> confusion.
> 
> The register map layout is kept fully-defined rather than factored into
> macros and/or block-indexing code. The major reasons for this are:
> 
>  - #1 is that it makes the source highly greppable, which is important.
>    "What does the driver do with register bits XYZ" or "Where does it use
>    register bits XYZ" are commonly types of questions. These can be quickly
>    answered by a grep. Squashing definitions into generator macros or block-
>    indexing code is a way of defeating grep.
> 
>  - most of the register definitions are used in tables, so a constant value
>    is required. Using generator macros make the table definition clunky and
>    obscure.
> 
>  - the code is clearer when it's there in the source exactly what register
>    and field it is using
> 
>  - it is easier to diff the register map of a new (unsupported) codec against
>    what is already supported and merge in differences
> 
>  - it makes the register map available in source for maintenance/debugging
>    instead of having to refer back to the datasheet for a register map
> 
> Signed-off-by: Richard Fitzgerald <rf@opensource.wolfsonmicro.com>
> ---
> Changes since V3:
> - Manually stripped out a lot more stuff, defines we're not using right now
> - Added the explanation above to the commit message of why we define the
>   map effectively verbatim
> 
>  MAINTAINERS                          |   10 +
>  include/linux/mfd/madera/registers.h | 3987 ++++++++++++++++++++++++++++++++++
>  2 files changed, 3997 insertions(+)
>  create mode 100644 include/linux/mfd/madera/registers.h

For my own reference:
  Acked-for-MFD-by: Lee Jones <lee.jones@linaro.org>

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog

  reply	other threads:[~2017-08-08 11:03 UTC|newest]

Thread overview: 43+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-28  9:47 [PATCH v4 00/17] Add support for Cirrus Logic CS47L35/L85/L90/L91 codecs Richard Fitzgerald
2017-07-28  9:47 ` Richard Fitzgerald
2017-07-28  9:47 ` [PATCH v4 01/17] mfd: madera: Add register definitions for Cirrus Logic Madera codecs Richard Fitzgerald
2017-07-28  9:47   ` Richard Fitzgerald
2017-08-08 11:03   ` Lee Jones [this message]
2017-08-08 11:03     ` Lee Jones
2017-07-28  9:47 ` [PATCH v4 02/17] mfd: madera: Add DT bindings " Richard Fitzgerald
2017-07-28  9:47   ` Richard Fitzgerald
2017-07-28  9:47 ` [PATCH v4 03/17] mfd: madera: Add common support " Richard Fitzgerald
2017-07-28  9:47   ` Richard Fitzgerald
2017-08-08 11:13   ` Lee Jones
2017-08-08 11:13     ` Lee Jones
2017-07-28  9:47 ` [PATCH v4 04/17] mfd: madera: Register map tables for Cirrus Logic CS47L35 Richard Fitzgerald
2017-07-28  9:47   ` Richard Fitzgerald
2017-07-28  9:47 ` [PATCH v4 05/17] mfd: madera: Register map tables for Cirrus Logic CS47L85 Richard Fitzgerald
2017-07-28  9:47   ` Richard Fitzgerald
2017-07-28  9:47 ` [PATCH v4 06/17] mfd: madera: Register map tables for Cirrus Logic CS47L90/91 Richard Fitzgerald
2017-07-28  9:47   ` Richard Fitzgerald
2017-07-28  9:47 ` [PATCH v4 07/17] regulator: arizona-micsupp: Add support for Cirrus Logic Madera codecs Richard Fitzgerald
2017-07-28  9:47   ` Richard Fitzgerald
2017-07-28  9:47 ` [PATCH v4 08/17] regulator: arizona-ldo1: " Richard Fitzgerald
2017-07-28  9:47   ` Richard Fitzgerald
2017-07-28  9:47 ` [PATCH v4 09/17] irqchip: Add driver " Richard Fitzgerald
2017-07-28  9:47   ` Richard Fitzgerald
2017-07-28  9:47 ` [PATCH v4 10/17] pinctrl: madera: Add DT bindings " Richard Fitzgerald
2017-07-28  9:47   ` Richard Fitzgerald
2017-07-28  9:47 ` [PATCH v4 11/17] pinctrl: madera: Add driver " Richard Fitzgerald
2017-07-28  9:47   ` Richard Fitzgerald
2017-07-28  9:47 ` [PATCH v4 12/17] gpio: madera: Support Cirrus Logic Madera class codecs Richard Fitzgerald
2017-07-28  9:47   ` Richard Fitzgerald
2017-07-28  9:47 ` [PATCH v4 13/17] ASoC: madera: Add DT bindings for Cirrus Logic Madera codecs Richard Fitzgerald
2017-07-28  9:47   ` Richard Fitzgerald
2017-07-28  9:47 ` [PATCH v4 14/17] ASoC: madera: Add common support " Richard Fitzgerald
2017-07-28  9:47   ` Richard Fitzgerald
2017-07-28  9:47 ` [PATCH v4 15/17] ASoC: cs47l35: Add codec driver for Cirrus Logic CS47L35 Richard Fitzgerald
2017-07-28  9:47   ` Richard Fitzgerald
2017-07-29 23:01   ` kbuild test robot
2017-08-07  8:32     ` Richard Fitzgerald
2017-08-07  8:32       ` Richard Fitzgerald
2017-07-28  9:47 ` [PATCH v4 16/17] ASoC: cs47l85: Add codec driver for Cirrus Logic CS47L85 Richard Fitzgerald
2017-07-28  9:47   ` Richard Fitzgerald
     [not found] ` <1501235239-11145-1-git-send-email-rf-yzvPICuk2AATkU/dhu1WVueM+bqZidxxQQ4Iyu8u01E@public.gmane.org>
2017-07-28  9:47   ` [PATCH v4 17/17] ASoC: cs47l90: Add codec driver for Cirrus Logic CS47L90 Richard Fitzgerald
2017-07-28  9:47     ` Richard Fitzgerald

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170808110319.ssagukhfp72r5vys@dell \
    --to=lee.jones@linaro.org \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=gnurou@gmail.com \
    --cc=jason@lakedaemon.net \
    --cc=linus.walleij@linaro.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=patches@opensource.wolfsonmicro.com \
    --cc=rf@opensource.wolfsonmicro.com \
    --cc=robh+dt@kernel.org \
    --cc=tglx@linutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.