diff mbox series

[1/2] sound: soc: wm8903: Pull in platform data

Message ID 20180918191226.17104-1-linus.walleij@linaro.org
State New
Headers show
Series [1/2] sound: soc: wm8903: Pull in platform data | expand

Commit Message

Linus Walleij Sept. 18, 2018, 7:12 p.m. UTC
No platform in the kernel is using platform data to
populate the WM8903 so pull it into the source file.
This is done to handle further simplifications.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>

---
 include/sound/wm8903.h    | 24 ------------------------
 sound/soc/codecs/wm8903.c | 24 ++++++++++++++++++++++++
 2 files changed, 24 insertions(+), 24 deletions(-)

-- 
2.17.1

_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

Comments

Mark Brown Sept. 18, 2018, 7:51 p.m. UTC | #1
On Tue, Sep 18, 2018 at 12:12:26PM -0700, Linus Walleij wrote:
> No platform in the kernel is using platform data to

> populate the WM8903 so pull it into the source file.

> This is done to handle further simplifications.


Please always copy maintainers on patches, adding the Cirrus people.

Please use subject lines matching the style for the subsystem.  This
makes it easier for people to identify relevant patches.

> 

> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>

> ---

>  include/sound/wm8903.h    | 24 ------------------------

>  sound/soc/codecs/wm8903.c | 24 ++++++++++++++++++++++++

>  2 files changed, 24 insertions(+), 24 deletions(-)

> 

> diff --git a/include/sound/wm8903.h b/include/sound/wm8903.h

> index b310c5a3a958..b2ef76d5d00d 100644

> --- a/include/sound/wm8903.h

> +++ b/include/sound/wm8903.h

> @@ -11,12 +11,6 @@

>  #ifndef __LINUX_SND_WM8903_H

>  #define __LINUX_SND_WM8903_H

>  

> -/*

> - * Used to enable configuration of a GPIO to all zeros; a gpio_cfg value of

> - * zero in platform data means "don't touch this pin".

> - */

> -#define WM8903_GPIO_CONFIG_ZERO 0x8000

> -

>  /*

>   * R6 (0x06) - Mic Bias Control 0

>   */

> @@ -245,22 +239,4 @@

>  #define WM8903_GP5_DB_SHIFT                          0  /* GP5_DB */

>  #define WM8903_GP5_DB_WIDTH                          1  /* GP5_DB */

>  

> -#define WM8903_NUM_GPIO 5

> -

> -struct wm8903_platform_data {

> -	bool irq_active_low;   /* Set if IRQ active low, default high */

> -

> -        /* Default register value for R6 (Mic bias), used to configure

> -	 * microphone detection.  In conjunction with gpio_cfg this

> -	 * can be used to route the microphone status signals out onto

> -	 * the GPIOs for use with snd_soc_jack_add_gpios().

> -	 */

> -	u16 micdet_cfg;

> -

> -	int micdet_delay;      /* Delay after microphone detection (ms) */

> -

> -	int gpio_base;

> -	u32 gpio_cfg[WM8903_NUM_GPIO]; /* Default register values for GPIO pin mux */

> -};

> -

>  #endif

> diff --git a/sound/soc/codecs/wm8903.c b/sound/soc/codecs/wm8903.c

> index 6cb3c153ba19..23e43ff40ded 100644

> --- a/sound/soc/codecs/wm8903.c

> +++ b/sound/soc/codecs/wm8903.c

> @@ -124,6 +124,30 @@ static const char *wm8903_supply_names[WM8903_NUM_SUPPLIES] = {

>  	"DCVDD",

>  };

>  

> +/*

> + * Used to enable configuration of a GPIO to all zeros; a gpio_cfg value of

> + * zero in platform data means "don't touch this pin".

> + */

> +#define WM8903_GPIO_CONFIG_ZERO 0x8000

> +

> +#define WM8903_NUM_GPIO 5

> +

> +struct wm8903_platform_data {

> +	bool irq_active_low;   /* Set if IRQ active low, default high */

> +

> +        /* Default register value for R6 (Mic bias), used to configure

> +	 * microphone detection.  In conjunction with gpio_cfg this

> +	 * can be used to route the microphone status signals out onto

> +	 * the GPIOs for use with snd_soc_jack_add_gpios().

> +	 */

> +	u16 micdet_cfg;

> +

> +	int micdet_delay;      /* Delay after microphone detection (ms) */

> +

> +	int gpio_base;

> +	u32 gpio_cfg[WM8903_NUM_GPIO]; /* Default register values for GPIO pin mux */

> +};

> +

>  struct wm8903_priv {

>  	struct wm8903_platform_data *pdata;

>  	struct device *dev;

> -- 

> 2.17.1

>
_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
diff mbox series

Patch

diff --git a/include/sound/wm8903.h b/include/sound/wm8903.h
index b310c5a3a958..b2ef76d5d00d 100644
--- a/include/sound/wm8903.h
+++ b/include/sound/wm8903.h
@@ -11,12 +11,6 @@ 
 #ifndef __LINUX_SND_WM8903_H
 #define __LINUX_SND_WM8903_H
 
-/*
- * Used to enable configuration of a GPIO to all zeros; a gpio_cfg value of
- * zero in platform data means "don't touch this pin".
- */
-#define WM8903_GPIO_CONFIG_ZERO 0x8000
-
 /*
  * R6 (0x06) - Mic Bias Control 0
  */
@@ -245,22 +239,4 @@ 
 #define WM8903_GP5_DB_SHIFT                          0  /* GP5_DB */
 #define WM8903_GP5_DB_WIDTH                          1  /* GP5_DB */
 
-#define WM8903_NUM_GPIO 5
-
-struct wm8903_platform_data {
-	bool irq_active_low;   /* Set if IRQ active low, default high */
-
-        /* Default register value for R6 (Mic bias), used to configure
-	 * microphone detection.  In conjunction with gpio_cfg this
-	 * can be used to route the microphone status signals out onto
-	 * the GPIOs for use with snd_soc_jack_add_gpios().
-	 */
-	u16 micdet_cfg;
-
-	int micdet_delay;      /* Delay after microphone detection (ms) */
-
-	int gpio_base;
-	u32 gpio_cfg[WM8903_NUM_GPIO]; /* Default register values for GPIO pin mux */
-};
-
 #endif
diff --git a/sound/soc/codecs/wm8903.c b/sound/soc/codecs/wm8903.c
index 6cb3c153ba19..23e43ff40ded 100644
--- a/sound/soc/codecs/wm8903.c
+++ b/sound/soc/codecs/wm8903.c
@@ -124,6 +124,30 @@  static const char *wm8903_supply_names[WM8903_NUM_SUPPLIES] = {
 	"DCVDD",
 };
 
+/*
+ * Used to enable configuration of a GPIO to all zeros; a gpio_cfg value of
+ * zero in platform data means "don't touch this pin".
+ */
+#define WM8903_GPIO_CONFIG_ZERO 0x8000
+
+#define WM8903_NUM_GPIO 5
+
+struct wm8903_platform_data {
+	bool irq_active_low;   /* Set if IRQ active low, default high */
+
+        /* Default register value for R6 (Mic bias), used to configure
+	 * microphone detection.  In conjunction with gpio_cfg this
+	 * can be used to route the microphone status signals out onto
+	 * the GPIOs for use with snd_soc_jack_add_gpios().
+	 */
+	u16 micdet_cfg;
+
+	int micdet_delay;      /* Delay after microphone detection (ms) */
+
+	int gpio_base;
+	u32 gpio_cfg[WM8903_NUM_GPIO]; /* Default register values for GPIO pin mux */
+};
+
 struct wm8903_priv {
 	struct wm8903_platform_data *pdata;
 	struct device *dev;