public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Lee Jones <lee.jones@linaro.org>
To: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Cc: sameo@linux.intel.com, broonie@kernel.org,
	patches@opensource.wolfsonmicro.com,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/2 v2] mfd: arizona: Mark additional registers as volatile
Date: Thu, 21 Aug 2014 13:01:51 +0100	[thread overview]
Message-ID: <20140821120151.GE4266@lee--X1> (raw)
In-Reply-To: <1407926567-10047-2-git-send-email-ckeepax@opensource.wolfsonmicro.com>

On Wed, 13 Aug 2014, Charles Keepax wrote:

> Mark some additional registers as volatile. The write sequencer control
> registers should not be cached, as we don't ever want their value
> synchronised as this might cause a write sequence to be accidentally
> initiated.
> 
> Additionally, the DAC_COMP registers require special preconditions to
> write so there values wouldn't be updated accurately during a register
> sync.
> 
> Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
> ---
>  drivers/mfd/wm5102-tables.c |   11 ++++++++---
>  drivers/mfd/wm5110-tables.c |    6 +++---
>  2 files changed, 11 insertions(+), 6 deletions(-)

Applied, thanks.

> diff --git a/drivers/mfd/wm5102-tables.c b/drivers/mfd/wm5102-tables.c
> index c18d527..191f224 100644
> --- a/drivers/mfd/wm5102-tables.c
> +++ b/drivers/mfd/wm5102-tables.c
> @@ -245,9 +245,6 @@ const struct regmap_irq_chip wm5102_irq = {
>  static const struct reg_default wm5102_reg_default[] = {
>  	{ 0x00000008, 0x0019 },   /* R8     - Ctrl IF SPI CFG 1 */ 
>  	{ 0x00000009, 0x0001 },   /* R9     - Ctrl IF I2C1 CFG 1 */ 
> -	{ 0x00000016, 0x0000 },   /* R22    - Write Sequencer Ctrl 0 */ 
> -	{ 0x00000017, 0x0000 },   /* R23    - Write Sequencer Ctrl 1 */ 
> -	{ 0x00000018, 0x0000 },   /* R24    - Write Sequencer Ctrl 2 */ 
>  	{ 0x00000020, 0x0000 },   /* R32    - Tone Generator 1 */ 
>  	{ 0x00000021, 0x1000 },   /* R33    - Tone Generator 2 */ 
>  	{ 0x00000022, 0x0000 },   /* R34    - Tone Generator 3 */ 
> @@ -1881,6 +1878,10 @@ static bool wm5102_volatile_register(struct device *dev, unsigned int reg)
>  	switch (reg) {
>  	case ARIZONA_SOFTWARE_RESET:
>  	case ARIZONA_DEVICE_REVISION:
> +	case ARIZONA_WRITE_SEQUENCER_CTRL_0:
> +	case ARIZONA_WRITE_SEQUENCER_CTRL_1:
> +	case ARIZONA_WRITE_SEQUENCER_CTRL_2:
> +	case ARIZONA_WRITE_SEQUENCER_CTRL_3:
>  	case ARIZONA_OUTPUT_STATUS_1:
>  	case ARIZONA_RAW_OUTPUT_STATUS_1:
>  	case ARIZONA_SLIMBUS_RX_PORT_STATUS:
> @@ -1892,6 +1893,10 @@ static bool wm5102_volatile_register(struct device *dev, unsigned int reg)
>  	case ARIZONA_ASYNC_SAMPLE_RATE_1_STATUS:
>  	case ARIZONA_FLL1_NCO_TEST_0:
>  	case ARIZONA_FLL2_NCO_TEST_0:
> +	case ARIZONA_DAC_COMP_1:
> +	case ARIZONA_DAC_COMP_2:
> +	case ARIZONA_DAC_COMP_3:
> +	case ARIZONA_DAC_COMP_4:
>  	case ARIZONA_FX_CTRL2:
>  	case ARIZONA_INTERRUPT_STATUS_1:
>  	case ARIZONA_INTERRUPT_STATUS_2:
> diff --git a/drivers/mfd/wm5110-tables.c b/drivers/mfd/wm5110-tables.c
> index 9b98ee5..beae0a3 100644
> --- a/drivers/mfd/wm5110-tables.c
> +++ b/drivers/mfd/wm5110-tables.c
> @@ -666,9 +666,6 @@ static const struct reg_default wm5110_reg_default[] = {
>  	{ 0x0000000A, 0x0001 },    /* R10    - Ctrl IF I2C2 CFG 1 */
>  	{ 0x0000000B, 0x0036 },    /* R11    - Ctrl IF I2C1 CFG 2 */
>  	{ 0x0000000C, 0x0036 },    /* R12    - Ctrl IF I2C2 CFG 2 */
> -	{ 0x00000016, 0x0000 },    /* R22    - Write Sequencer Ctrl 0 */
> -	{ 0x00000017, 0x0000 },    /* R23    - Write Sequencer Ctrl 1 */
> -	{ 0x00000018, 0x0000 },    /* R24    - Write Sequencer Ctrl 2 */
>  	{ 0x00000020, 0x0000 },    /* R32    - Tone Generator 1 */
>  	{ 0x00000021, 0x1000 },    /* R33    - Tone Generator 2 */
>  	{ 0x00000022, 0x0000 },    /* R34    - Tone Generator 3 */
> @@ -2815,6 +2812,9 @@ static bool wm5110_volatile_register(struct device *dev, unsigned int reg)
>  	switch (reg) {
>  	case ARIZONA_SOFTWARE_RESET:
>  	case ARIZONA_DEVICE_REVISION:
> +	case ARIZONA_WRITE_SEQUENCER_CTRL_0:
> +	case ARIZONA_WRITE_SEQUENCER_CTRL_1:
> +	case ARIZONA_WRITE_SEQUENCER_CTRL_2:
>  	case ARIZONA_HAPTICS_STATUS:
>  	case ARIZONA_SAMPLE_RATE_1_STATUS:
>  	case ARIZONA_SAMPLE_RATE_2_STATUS:

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

  reply	other threads:[~2014-08-21 12:01 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-13 10:42 [PATCH 1/2 v2] mfd: wm5102: Mark register write sequencer control 3 readable Charles Keepax
2014-08-13 10:42 ` [PATCH 2/2 v2] mfd: arizona: Mark additional registers as volatile Charles Keepax
2014-08-21 12:01   ` Lee Jones [this message]
2014-08-21 12:01 ` [PATCH 1/2 v2] mfd: wm5102: Mark register write sequencer control 3 readable Lee Jones

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=20140821120151.GE4266@lee--X1 \
    --to=lee.jones@linaro.org \
    --cc=broonie@kernel.org \
    --cc=ckeepax@opensource.wolfsonmicro.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=patches@opensource.wolfsonmicro.com \
    --cc=sameo@linux.intel.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox