mirror of
https://github.com/torvalds/linux.git
synced 2026-01-24 23:16:46 +00:00
ASoC: tlv320adcx140: Merge fixes from Pengutronix
Merge patches that Pengutronix have been carrying in their tree for a while and were upstreamed by Sascha Hauer together with some new features that are going into the next release.
This commit is contained in:
@@ -23,7 +23,6 @@
|
||||
#include "tlv320adcx140.h"
|
||||
|
||||
struct adcx140_priv {
|
||||
struct snd_soc_component *component;
|
||||
struct regulator *supply_areg;
|
||||
struct gpio_desc *gpio_reset;
|
||||
struct regmap *regmap;
|
||||
@@ -338,7 +337,7 @@ static const struct snd_kcontrol_new adcx140_dapm_ch4_dre_en_switch =
|
||||
SOC_DAPM_SINGLE("Switch", ADCX140_CH4_CFG0, 0, 1, 0);
|
||||
|
||||
static const struct snd_kcontrol_new adcx140_dapm_dre_en_switch =
|
||||
SOC_DAPM_SINGLE("Switch", ADCX140_DSP_CFG1, 3, 1, 0);
|
||||
SOC_DAPM_SINGLE("Switch", ADCX140_DSP_CFG1, 3, 1, 1);
|
||||
|
||||
/* Output Mixer */
|
||||
static const struct snd_kcontrol_new adcx140_output_mixer_controls[] = {
|
||||
@@ -699,7 +698,6 @@ static void adcx140_pwr_ctrl(struct adcx140_priv *adcx140, bool power_state)
|
||||
{
|
||||
int pwr_ctrl = 0;
|
||||
int ret = 0;
|
||||
struct snd_soc_component *component = adcx140->component;
|
||||
|
||||
if (power_state)
|
||||
pwr_ctrl = ADCX140_PWR_CFG_ADC_PDZ | ADCX140_PWR_CFG_PLL_PDZ;
|
||||
@@ -711,7 +709,7 @@ static void adcx140_pwr_ctrl(struct adcx140_priv *adcx140, bool power_state)
|
||||
ret = regmap_write(adcx140->regmap, ADCX140_PHASE_CALIB,
|
||||
adcx140->phase_calib_on ? 0x00 : 0x40);
|
||||
if (ret)
|
||||
dev_err(component->dev, "%s: register write error %d\n",
|
||||
dev_err(adcx140->dev, "%s: register write error %d\n",
|
||||
__func__, ret);
|
||||
}
|
||||
|
||||
@@ -727,7 +725,7 @@ static int adcx140_hw_params(struct snd_pcm_substream *substream,
|
||||
struct adcx140_priv *adcx140 = snd_soc_component_get_drvdata(component);
|
||||
u8 data = 0;
|
||||
|
||||
switch (params_width(params)) {
|
||||
switch (params_physical_width(params)) {
|
||||
case 16:
|
||||
data = ADCX140_16_BIT_WORD;
|
||||
break;
|
||||
@@ -742,7 +740,7 @@ static int adcx140_hw_params(struct snd_pcm_substream *substream,
|
||||
break;
|
||||
default:
|
||||
dev_err(component->dev, "%s: Unsupported width %d\n",
|
||||
__func__, params_width(params));
|
||||
__func__, params_physical_width(params));
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
@@ -1156,6 +1154,9 @@ static int adcx140_i2c_probe(struct i2c_client *i2c)
|
||||
adcx140->gpio_reset = devm_gpiod_get_optional(adcx140->dev,
|
||||
"reset", GPIOD_OUT_LOW);
|
||||
if (IS_ERR(adcx140->gpio_reset))
|
||||
return dev_err_probe(&i2c->dev, PTR_ERR(adcx140->gpio_reset),
|
||||
"Failed to get Reset GPIO\n");
|
||||
if (!adcx140->gpio_reset)
|
||||
dev_info(&i2c->dev, "Reset GPIO not defined\n");
|
||||
|
||||
adcx140->supply_areg = devm_regulator_get_optional(adcx140->dev,
|
||||
|
||||
Reference in New Issue
Block a user