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, patches@opensource.wolfsonmicro.com,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] mfd: arizona: Document HP_CTRL_1L and HP_CTRL_1R registers
Date: Mon, 10 Nov 2014 15:28:34 +0000	[thread overview]
Message-ID: <20141110152834.GF24004@x1> (raw)
In-Reply-To: <1415114676-32614-1-git-send-email-ckeepax@opensource.wolfsonmicro.com>

On Tue, 04 Nov 2014, Charles Keepax wrote:

> These registers are documented in the datasheet and used as part of the
> extcon driver. Expose them properly through regmap as the datasheet
> notes they should be treated as volatile do so.
> 
> Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
> ---
>  drivers/mfd/wm5102-tables.c           |    6 +++-
>  drivers/mfd/wm5110-tables.c           |    4 +++
>  drivers/mfd/wm8997-tables.c           |    4 +++
>  include/linux/mfd/arizona/registers.h |   42 +++++++++++++++++++++++++++++++++
>  4 files changed, 54 insertions(+), 2 deletions(-)

Applied, thanks.

> diff --git a/drivers/mfd/wm5102-tables.c b/drivers/mfd/wm5102-tables.c
> index d6f35bb..b326a82 100644
> --- a/drivers/mfd/wm5102-tables.c
> +++ b/drivers/mfd/wm5102-tables.c
> @@ -336,8 +336,6 @@ static const struct reg_default wm5102_reg_default[] = {
>  	{ 0x00000218, 0x01A6 },   /* R536   - Mic Bias Ctrl 1 */ 
>  	{ 0x00000219, 0x01A6 },   /* R537   - Mic Bias Ctrl 2 */ 
>  	{ 0x0000021A, 0x01A6 },   /* R538   - Mic Bias Ctrl 3 */ 
> -	{ 0x00000225, 0x0400 },   /* R549   - HP Ctrl 1L */
> -	{ 0x00000226, 0x0400 },   /* R550   - HP Ctrl 1R */
>  	{ 0x00000293, 0x0000 },   /* R659   - Accessory Detect Mode 1 */ 
>  	{ 0x0000029B, 0x0020 },   /* R667   - Headphone Detect 1 */ 
>  	{ 0x0000029C, 0x0000 },   /* R668   - Headphone Detect 2 */
> @@ -1112,6 +1110,8 @@ static bool wm5102_readable_register(struct device *dev, unsigned int reg)
>  	case ARIZONA_MIC_BIAS_CTRL_1:
>  	case ARIZONA_MIC_BIAS_CTRL_2:
>  	case ARIZONA_MIC_BIAS_CTRL_3:
> +	case ARIZONA_HP_CTRL_1L:
> +	case ARIZONA_HP_CTRL_1R:
>  	case ARIZONA_ACCESSORY_DETECT_MODE_1:
>  	case ARIZONA_HEADPHONE_DETECT_1:
>  	case ARIZONA_HEADPHONE_DETECT_2:
> @@ -1949,6 +1949,8 @@ static bool wm5102_volatile_register(struct device *dev, unsigned int reg)
>  	case ARIZONA_DSP1_SCRATCH_1:
>  	case ARIZONA_DSP1_SCRATCH_2:
>  	case ARIZONA_DSP1_SCRATCH_3:
> +	case ARIZONA_HP_CTRL_1L:
> +	case ARIZONA_HP_CTRL_1R:
>  	case ARIZONA_HEADPHONE_DETECT_2:
>  	case ARIZONA_HP_DACVAL:
>  	case ARIZONA_MIC_DETECT_3:
> diff --git a/drivers/mfd/wm5110-tables.c b/drivers/mfd/wm5110-tables.c
> index 64eab95..12cad94 100644
> --- a/drivers/mfd/wm5110-tables.c
> +++ b/drivers/mfd/wm5110-tables.c
> @@ -1798,6 +1798,8 @@ static bool wm5110_readable_register(struct device *dev, unsigned int reg)
>  	case ARIZONA_MIC_BIAS_CTRL_1:
>  	case ARIZONA_MIC_BIAS_CTRL_2:
>  	case ARIZONA_MIC_BIAS_CTRL_3:
> +	case ARIZONA_HP_CTRL_1L:
> +	case ARIZONA_HP_CTRL_1R:
>  	case ARIZONA_ACCESSORY_DETECT_MODE_1:
>  	case ARIZONA_HEADPHONE_DETECT_1:
>  	case ARIZONA_HEADPHONE_DETECT_2:
> @@ -2841,6 +2843,8 @@ static bool wm5110_volatile_register(struct device *dev, unsigned int reg)
>  	case ARIZONA_ASYNC_SAMPLE_RATE_1_STATUS:
>  	case ARIZONA_ASYNC_SAMPLE_RATE_2_STATUS:
>  	case ARIZONA_MIC_DETECT_3:
> +	case ARIZONA_HP_CTRL_1L:
> +	case ARIZONA_HP_CTRL_1R:
>  	case ARIZONA_HEADPHONE_DETECT_2:
>  	case ARIZONA_INPUT_ENABLES_STATUS:
>  	case ARIZONA_OUTPUT_STATUS_1:
> diff --git a/drivers/mfd/wm8997-tables.c b/drivers/mfd/wm8997-tables.c
> index 510da3b..06c3093 100644
> --- a/drivers/mfd/wm8997-tables.c
> +++ b/drivers/mfd/wm8997-tables.c
> @@ -886,6 +886,8 @@ static bool wm8997_readable_register(struct device *dev, unsigned int reg)
>  	case ARIZONA_MIC_BIAS_CTRL_1:
>  	case ARIZONA_MIC_BIAS_CTRL_2:
>  	case ARIZONA_MIC_BIAS_CTRL_3:
> +	case ARIZONA_HP_CTRL_1L:
> +	case ARIZONA_HP_CTRL_1R:
>  	case ARIZONA_ACCESSORY_DETECT_MODE_1:
>  	case ARIZONA_HEADPHONE_DETECT_1:
>  	case ARIZONA_HEADPHONE_DETECT_2:
> @@ -1477,6 +1479,8 @@ static bool wm8997_volatile_register(struct device *dev, unsigned int reg)
>  	case ARIZONA_SAMPLE_RATE_3_STATUS:
>  	case ARIZONA_ASYNC_SAMPLE_RATE_1_STATUS:
>  	case ARIZONA_MIC_DETECT_3:
> +	case ARIZONA_HP_CTRL_1L:
> +	case ARIZONA_HP_CTRL_1R:
>  	case ARIZONA_HEADPHONE_DETECT_2:
>  	case ARIZONA_INPUT_ENABLES_STATUS:
>  	case ARIZONA_OUTPUT_STATUS_1:
> diff --git a/include/linux/mfd/arizona/registers.h b/include/linux/mfd/arizona/registers.h
> index fbf6489..aacc10d 100644
> --- a/include/linux/mfd/arizona/registers.h
> +++ b/include/linux/mfd/arizona/registers.h
> @@ -125,6 +125,8 @@
>  #define ARIZONA_MIC_BIAS_CTRL_1                  0x218
>  #define ARIZONA_MIC_BIAS_CTRL_2                  0x219
>  #define ARIZONA_MIC_BIAS_CTRL_3                  0x21A
> +#define ARIZONA_HP_CTRL_1L                       0x225
> +#define ARIZONA_HP_CTRL_1R                       0x226
>  #define ARIZONA_ACCESSORY_DETECT_MODE_1          0x293
>  #define ARIZONA_HEADPHONE_DETECT_1               0x29B
>  #define ARIZONA_HEADPHONE_DETECT_2               0x29C
> @@ -2253,6 +2255,46 @@
>  #define ARIZONA_MICB3_ENA_WIDTH                       1  /* MICB3_ENA */
>  
>  /*
> + * R549 (0x225) - HP Ctrl 1L
> + */
> +#define ARIZONA_RMV_SHRT_HP1L                    0x4000  /* RMV_SHRT_HP1L */
> +#define ARIZONA_RMV_SHRT_HP1L_MASK               0x4000  /* RMV_SHRT_HP1L */
> +#define ARIZONA_RMV_SHRT_HP1L_SHIFT                  14  /* RMV_SHRT_HP1L */
> +#define ARIZONA_RMV_SHRT_HP1L_WIDTH                   1  /* RMV_SHRT_HP1L */
> +#define ARIZONA_HP1L_FLWR                        0x0004  /* HP1L_FLWR */
> +#define ARIZONA_HP1L_FLWR_MASK                   0x0004  /* HP1L_FLWR */
> +#define ARIZONA_HP1L_FLWR_SHIFT                       2  /* HP1L_FLWR */
> +#define ARIZONA_HP1L_FLWR_WIDTH                       1  /* HP1L_FLWR */
> +#define ARIZONA_HP1L_SHRTI                       0x0002  /* HP1L_SHRTI */
> +#define ARIZONA_HP1L_SHRTI_MASK                  0x0002  /* HP1L_SHRTI */
> +#define ARIZONA_HP1L_SHRTI_SHIFT                      1  /* HP1L_SHRTI */
> +#define ARIZONA_HP1L_SHRTI_WIDTH                      1  /* HP1L_SHRTI */
> +#define ARIZONA_HP1L_SHRTO                       0x0001  /* HP1L_SHRTO */
> +#define ARIZONA_HP1L_SHRTO_MASK                  0x0001  /* HP1L_SHRTO */
> +#define ARIZONA_HP1L_SHRTO_SHIFT                      0  /* HP1L_SHRTO */
> +#define ARIZONA_HP1L_SHRTO_WIDTH                      1  /* HP1L_SHRTO */
> +
> +/*
> + * R550 (0x226) - HP Ctrl 1R
> + */
> +#define ARIZONA_RMV_SHRT_HP1R                    0x4000  /* RMV_SHRT_HP1R */
> +#define ARIZONA_RMV_SHRT_HP1R_MASK               0x4000  /* RMV_SHRT_HP1R */
> +#define ARIZONA_RMV_SHRT_HP1R_SHIFT                  14  /* RMV_SHRT_HP1R */
> +#define ARIZONA_RMV_SHRT_HP1R_WIDTH                   1  /* RMV_SHRT_HP1R */
> +#define ARIZONA_HP1R_FLWR                        0x0004  /* HP1R_FLWR */
> +#define ARIZONA_HP1R_FLWR_MASK                   0x0004  /* HP1R_FLWR */
> +#define ARIZONA_HP1R_FLWR_SHIFT                       2  /* HP1R_FLWR */
> +#define ARIZONA_HP1R_FLWR_WIDTH                       1  /* HP1R_FLWR */
> +#define ARIZONA_HP1R_SHRTI                       0x0002  /* HP1R_SHRTI */
> +#define ARIZONA_HP1R_SHRTI_MASK                  0x0002  /* HP1R_SHRTI */
> +#define ARIZONA_HP1R_SHRTI_SHIFT                      1  /* HP1R_SHRTI */
> +#define ARIZONA_HP1R_SHRTI_WIDTH                      1  /* HP1R_SHRTI */
> +#define ARIZONA_HP1R_SHRTO                       0x0001  /* HP1R_SHRTO */
> +#define ARIZONA_HP1R_SHRTO_MASK                  0x0001  /* HP1R_SHRTO */
> +#define ARIZONA_HP1R_SHRTO_SHIFT                      0  /* HP1R_SHRTO */
> +#define ARIZONA_HP1R_SHRTO_WIDTH                      1  /* HP1R_SHRTO */
> +
> +/*
>   * R659 (0x293) - Accessory Detect Mode 1
>   */
>  #define ARIZONA_ACCDET_SRC                       0x2000  /* ACCDET_SRC */

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

      reply	other threads:[~2014-11-10 15:28 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-04 15:24 [PATCH] mfd: arizona: Document HP_CTRL_1L and HP_CTRL_1R registers Charles Keepax
2014-11-10 15:28 ` Lee Jones [this message]

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=20141110152834.GF24004@x1 \
    --to=lee.jones@linaro.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