mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-10 21:07:02 +09:00
wm8994 : add POWER_EN PA_CTRL iomux to pdata
This commit is contained in:
@@ -25,6 +25,8 @@
|
||||
#include <linux/mfd/wm8994/registers.h>
|
||||
#include <linux/mfd/wm8994/pdata.h>
|
||||
|
||||
#include <mach/iomux.h>
|
||||
|
||||
struct wm8994_ldo {
|
||||
int enable;
|
||||
bool is_enabled;
|
||||
@@ -235,7 +237,10 @@ static __devinit int wm8994_ldo_probe(struct platform_device *pdev)
|
||||
}
|
||||
|
||||
ldo->wm8994 = wm8994;
|
||||
|
||||
|
||||
if(pdata->ldo[id].iomux_name != NULL)
|
||||
rk29_mux_api_set(pdata->ldo[id].iomux_name, pdata->ldo[id].iomux_mode);
|
||||
|
||||
if (pdata->ldo[id].enable && gpio_is_valid(pdata->ldo[id].enable)) {
|
||||
ldo->enable = pdata->ldo[id].enable;
|
||||
ldo->is_enabled = true;
|
||||
|
||||
@@ -24,6 +24,10 @@ struct wm8994_ldo_pdata {
|
||||
|
||||
const char *supply;
|
||||
struct regulator_init_data *init_data;
|
||||
|
||||
//wm8994 LDO1_ENA and LDO2_ENA
|
||||
char iomux_name[50];
|
||||
int iomux_mode;
|
||||
};
|
||||
|
||||
#define WM8994_CONFIGURE_GPIO 0x10000
|
||||
@@ -123,9 +127,6 @@ struct wm8994_pdata {
|
||||
int gpio_defaults[WM8994_NUM_GPIO];
|
||||
|
||||
struct wm8994_ldo_pdata ldo[WM8994_NUM_LDO];
|
||||
//wm8994 LDO1_ENA and LDO2_ENA
|
||||
char PowerEN_iomux_name[50];
|
||||
int PowerEN_iomux_mode;
|
||||
|
||||
int irq_base; /** Base IRQ number for WM8994, required for IRQs */
|
||||
|
||||
@@ -173,6 +174,8 @@ struct wm8994_pdata {
|
||||
|
||||
//If an external amplifier speakers wm8994 enable>0 disable=0
|
||||
unsigned int PA_control_pin;
|
||||
char PA_iomux_name[50];
|
||||
int PA_iomux_mode;
|
||||
|
||||
};
|
||||
|
||||
|
||||
@@ -30,6 +30,7 @@
|
||||
#include <sound/tlv.h>
|
||||
#include <trace/events/asoc.h>
|
||||
#include <mach/gpio.h>
|
||||
#include <mach/iomux.h>
|
||||
|
||||
#include <linux/mfd/wm8994/core.h>
|
||||
#include <linux/mfd/wm8994/registers.h>
|
||||
@@ -3249,6 +3250,8 @@ static int wm8994_codec_probe(struct snd_soc_codec *codec)
|
||||
ARRAY_SIZE(wm8994_PA_dapm_widgets));
|
||||
snd_soc_dapm_add_routes(dapm, wm8994_PA_intercon,
|
||||
ARRAY_SIZE(wm8994_PA_intercon));
|
||||
if(pdata->PA_iomux_name != NULL)
|
||||
rk29_mux_api_set(pdata->PA_iomux_name, pdata->PA_iomux_mode);
|
||||
gpio_request(pdata->PA_control_pin, "wm8994_PA_ctrl");
|
||||
gpio_direction_output(pdata->PA_control_pin,GPIO_LOW);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user