* wm8994 codec
* author: qjb@rock-chips.com
*****************************************************************************************/
-//#if defined(CONFIG_MFD_WM8994)
-#if defined (CONFIG_REGULATOR_WM8994)
-static struct regulator_consumer_supply wm8994_ldo1_consumers[] = {
- {
- .supply = "DBVDD",
- },
- {
- .supply = "AVDD1",
- },
- {
- .supply = "CPVDD",
- },
- {
- .supply = "SPKVDD1",
- }
-};
-static struct regulator_consumer_supply wm8994_ldo2_consumers[] = {
- {
- .supply = "DCVDD",
- },
- {
- .supply = "AVDD2",
- },
- {
- .supply = "SPKVDD2",
- }
-};
-struct regulator_init_data regulator_init_data_ldo1 = {
- .constraints = {
- .name = "wm8994-ldo1",
- .min_uA = 00000,
- .max_uA = 18000,
- .always_on = true,
- .apply_uV = true,
- .valid_ops_mask = REGULATOR_CHANGE_STATUS | REGULATOR_CHANGE_CURRENT,
- },
- .num_consumer_supplies = ARRAY_SIZE(wm8994_ldo1_consumers),
- .consumer_supplies = wm8994_ldo1_consumers,
-};
-struct regulator_init_data regulator_init_data_ldo2 = {
- .constraints = {
- .name = "wm8994-ldo2",
- .min_uA = 00000,
- .max_uA = 18000,
- .always_on = true,
- .apply_uV = true,
- .valid_ops_mask = REGULATOR_CHANGE_STATUS | REGULATOR_CHANGE_CURRENT,
- },
- .num_consumer_supplies = ARRAY_SIZE(wm8994_ldo2_consumers),
- .consumer_supplies = wm8994_ldo2_consumers,
-};
-#endif
-struct wm8994_drc_cfg wm8994_drc_cfg_pdata = {
- .name = "wm8994_DRC",
- .regs = {0,0,0,0,0},
-};
-
-struct wm8994_retune_mobile_cfg wm8994_retune_mobile_cfg_pdata = {
- .name = "wm8994_EQ",
- .rate = 0,
- .regs = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,},
-};
-
struct wm8994_pdata wm8994_platdata = {
-#if defined (CONFIG_GPIO_WM8994)
- .gpio_base = WM8994_GPIO_EXPANDER_BASE,
- //Fill value to initialize the GPIO
- .gpio_defaults ={},
-#endif
- //enable=0 disable ldo
-#if defined (CONFIG_REGULATOR_WM8994)
- .ldo = {
- {
- .enable = 0,
- //RK29_PIN5_PA1
- .supply = NULL,
- .init_data = ®ulator_init_data_ldo1,
- },
- {
- .enable = 0,
- .supply = NULL,
- .init_data = ®ulator_init_data_ldo2,
- }
- },
-#endif
- //DRC 0--use default
- .num_drc_cfgs = 0,
- .drc_cfgs = &wm8994_drc_cfg_pdata,
- //EQ 0--use default
- .num_retune_mobile_cfgs = 0,
- .retune_mobile_cfgs = &wm8994_retune_mobile_cfg_pdata,
-
- .lineout1_diff = 1,
- .lineout2_diff = 1,
-
- .lineout1fb = 1,
- .lineout2fb = 1,
-
- .micbias1_lvl = 1,
- .micbias2_lvl = 1,
-
- .jd_scthr = 0,
- .jd_thr = 0,
.PA_control_pin = RK29_PIN6_PD3,
.Power_EN_Pin = RK29_PIN5_PA1,
.recorder_vol = 30,
};
-//#endif
+
#ifdef CONFIG_RK_HEADSET_DET
* wm8994 codec
* author: qjb@rock-chips.com
*****************************************************************************************/
-//#if defined(CONFIG_MFD_WM8994)
-#if defined (CONFIG_REGULATOR_WM8994)
-static struct regulator_consumer_supply wm8994_ldo1_consumers[] = {
- {
- .supply = "DBVDD",
- },
- {
- .supply = "AVDD1",
- },
- {
- .supply = "CPVDD",
- },
- {
- .supply = "SPKVDD1",
- }
-};
-static struct regulator_consumer_supply wm8994_ldo2_consumers[] = {
- {
- .supply = "DCVDD",
- },
- {
- .supply = "AVDD2",
- },
- {
- .supply = "SPKVDD2",
- }
-};
-struct regulator_init_data regulator_init_data_ldo1 = {
- .constraints = {
- .name = "wm8994-ldo1",
- .min_uA = 00000,
- .max_uA = 18000,
- .always_on = true,
- .apply_uV = true,
- .valid_ops_mask = REGULATOR_CHANGE_STATUS | REGULATOR_CHANGE_CURRENT,
- },
- .num_consumer_supplies = ARRAY_SIZE(wm8994_ldo1_consumers),
- .consumer_supplies = wm8994_ldo1_consumers,
-};
-struct regulator_init_data regulator_init_data_ldo2 = {
- .constraints = {
- .name = "wm8994-ldo2",
- .min_uA = 00000,
- .max_uA = 18000,
- .always_on = true,
- .apply_uV = true,
- .valid_ops_mask = REGULATOR_CHANGE_STATUS | REGULATOR_CHANGE_CURRENT,
- },
- .num_consumer_supplies = ARRAY_SIZE(wm8994_ldo2_consumers),
- .consumer_supplies = wm8994_ldo2_consumers,
-};
-#endif
-struct wm8994_drc_cfg wm8994_drc_cfg_pdata = {
- .name = "wm8994_DRC",
- .regs = {0,0,0,0,0},
-};
-
-struct wm8994_retune_mobile_cfg wm8994_retune_mobile_cfg_pdata = {
- .name = "wm8994_EQ",
- .rate = 0,
- .regs = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,},
-};
-
struct wm8994_pdata wm8994_platdata = {
-#if defined (CONFIG_GPIO_WM8994)
- .gpio_base = WM8994_GPIO_EXPANDER_BASE,
- //Fill value to initialize the GPIO
- .gpio_defaults ={},
-#endif
- //enable=0 disable ldo
-#if defined (CONFIG_REGULATOR_WM8994)
- .ldo = {
- {
- .enable = 0,
- //RK29_PIN5_PA1
- .supply = NULL,
- .init_data = ®ulator_init_data_ldo1,
- },
- {
- .enable = 0,
- .supply = NULL,
- .init_data = ®ulator_init_data_ldo2,
- }
- },
-#endif
- //DRC 0--use default
- .num_drc_cfgs = 0,
- .drc_cfgs = &wm8994_drc_cfg_pdata,
- //EQ 0--use default
- .num_retune_mobile_cfgs = 0,
- .retune_mobile_cfgs = &wm8994_retune_mobile_cfg_pdata,
-
- .lineout1_diff = 1,
- .lineout2_diff = 1,
-
- .lineout1fb = 1,
- .lineout2fb = 1,
-
- .micbias1_lvl = 1,
- .micbias2_lvl = 1,
-
- .jd_scthr = 0,
- .jd_thr = 0,
.PA_control_pin = 0,
.Power_EN_Pin = RK29_PIN5_PA1,
.recorder_vol = 20,
};
-//#endif
+
#ifdef CONFIG_RK_HEADSET_DET
#define HEADSET_GPIO RK29_PIN4_PD2
help
Say yes here to access the GPIO signal of TPS65910x multi-function
power management chips from Texas Instruments.
-#add by qjb
-config GPIO_WM8994
- tristate "WM8994 GPIOs"
- depends on MFD_WM8994
- help
- Say yes here to access the GPIO signals of WM8994 audio hub
- CODECs from Wolfson Microelectronics.
config GPIO_WM831X
tristate "WM831x GPIOs"
obj-$(CONFIG_GPIO_PCA9554) += pca9554.o
obj-$(CONFIG_IOEXTEND_TCA6424) += tca6424.o
obj-$(CONFIG_EXPAND_GPIO_SOFT_INTERRUPT) += expand_gpio_soft_interrupt.o
-#add by qjb
-obj-$(CONFIG_GPIO_WM8994) += wm8994-gpio.o
\ No newline at end of file
the I2C driver and the core APIs _only_, you have to select
individual components like LCD backlight, voltage regulators,
LEDs and battery-charger under the corresponding menus.
-##and by qjb
-config MFD_WM8994
- tristate "Support Wolfson Microelectronics WM8994"
- select MFD_CORE
- depends on I2C
- help
- The WM8994 is a highly integrated hi-fi CODEC designed for
- smartphone applicatiosn. As well as audio functionality it
- has on board GPIO and regulator functionality which is
- supported via the relevant subsystems. This driver provides
- core support for the WM8994, in order to use the actual
- functionaltiy of the device other drivers must be enabled.
config MFD_WM8400
tristate "Support Wolfson Microelectronics WM8400"
obj-$(CONFIG_PCF50633_GPIO) += pcf50633-gpio.o
obj-$(CONFIG_AB3100_CORE) += ab3100-core.o
obj-$(CONFIG_AB3100_OTP) += ab3100-otp.o
-#add by qjb
-obj-$(CONFIG_MFD_WM8994) += wm8994-core.o
+
help
This driver supports the voltage regulators provided by
this family of companion chips.
-
-#add by qjb
-config REGULATOR_WM8994
- tristate "Wolfson Microelectronics WM8994 CODEC"
- depends on MFD_WM8994
- help
- This driver provides support for the voltage regulators on the
- WM8994 CODEC.
-
+
config REGULATOR_WM831X
tristate "Wolfson Microelcronics WM831x PMIC regulators"
depends on MFD_WM831X
obj-$(CONFIG_REGULATOR_TPS65023) += tps65023-regulator.o
obj-$(CONFIG_REGULATOR_TPS6507X) += tps6507x-regulator.o
-#add by qjb
-obj-$(CONFIG_REGULATOR_WM8994) += wm8994-regulator.o
ccflags-$(CONFIG_REGULATOR_DEBUG) += -DDEBUG