Commit 5d718e63 authored by Mark Brown's avatar Mark Brown

Merge remote-tracking branches 'asoc/topic/nau8824', 'asoc/topic/nau8825' and...

Merge remote-tracking branches 'asoc/topic/nau8824', 'asoc/topic/nau8825' and 'asoc/topic/nuc900' into asoc-next
...@@ -69,7 +69,7 @@ Optional properties: ...@@ -69,7 +69,7 @@ Optional properties:
- nuvoton,jack-insert-debounce: number from 0 to 7 that sets debounce time to 2^(n+2) ms - nuvoton,jack-insert-debounce: number from 0 to 7 that sets debounce time to 2^(n+2) ms
- nuvoton,jack-eject-debounce: number from 0 to 7 that sets debounce time to 2^(n+2) ms - nuvoton,jack-eject-debounce: number from 0 to 7 that sets debounce time to 2^(n+2) ms
- nuvoton,crosstalk-bypass: make crosstalk function bypass if set. - nuvoton,crosstalk-enable: make crosstalk function enable if set.
- clocks: list of phandle and clock specifier pairs according to common clock bindings for the - clocks: list of phandle and clock specifier pairs according to common clock bindings for the
clocks described in clock-names clocks described in clock-names
...@@ -98,7 +98,7 @@ Example: ...@@ -98,7 +98,7 @@ Example:
nuvoton,short-key-debounce = <2>; nuvoton,short-key-debounce = <2>;
nuvoton,jack-insert-debounce = <7>; nuvoton,jack-insert-debounce = <7>;
nuvoton,jack-eject-debounce = <7>; nuvoton,jack-eject-debounce = <7>;
nuvoton,crosstalk-bypass; nuvoton,crosstalk-enable;
clock-names = "mclk"; clock-names = "mclk";
clocks = <&tegra_car TEGRA210_CLK_CLK_OUT_2>; clocks = <&tegra_car TEGRA210_CLK_CLK_OUT_2>;
......
...@@ -43,7 +43,7 @@ static bool nau8824_is_jack_inserted(struct nau8824 *nau8824); ...@@ -43,7 +43,7 @@ static bool nau8824_is_jack_inserted(struct nau8824 *nau8824);
/* the parameter threshold of FLL */ /* the parameter threshold of FLL */
#define NAU_FREF_MAX 13500000 #define NAU_FREF_MAX 13500000
#define NAU_FVCO_MAX 124000000 #define NAU_FVCO_MAX 100000000
#define NAU_FVCO_MIN 90000000 #define NAU_FVCO_MIN 90000000
/* scaling for mclk from sysclk_src output */ /* scaling for mclk from sysclk_src output */
...@@ -811,7 +811,8 @@ static void nau8824_eject_jack(struct nau8824 *nau8824) ...@@ -811,7 +811,8 @@ static void nau8824_eject_jack(struct nau8824 *nau8824)
NAU8824_JD_SLEEP_MODE, NAU8824_JD_SLEEP_MODE); NAU8824_JD_SLEEP_MODE, NAU8824_JD_SLEEP_MODE);
/* Close clock for jack type detection at manual mode */ /* Close clock for jack type detection at manual mode */
nau8824_config_sysclk(nau8824, NAU8824_CLK_DIS, 0); if (dapm->bias_level < SND_SOC_BIAS_PREPARE)
nau8824_config_sysclk(nau8824, NAU8824_CLK_DIS, 0);
} }
static void nau8824_jdet_work(struct work_struct *work) static void nau8824_jdet_work(struct work_struct *work)
...@@ -843,6 +844,11 @@ static void nau8824_jdet_work(struct work_struct *work) ...@@ -843,6 +844,11 @@ static void nau8824_jdet_work(struct work_struct *work)
event_mask |= SND_JACK_HEADSET; event_mask |= SND_JACK_HEADSET;
snd_soc_jack_report(nau8824->jack, event, event_mask); snd_soc_jack_report(nau8824->jack, event, event_mask);
/* Enable short key press and release interruption. */
regmap_update_bits(regmap, NAU8824_REG_INTERRUPT_SETTING,
NAU8824_IRQ_KEY_RELEASE_DIS |
NAU8824_IRQ_KEY_SHORT_PRESS_DIS, 0);
nau8824_sema_release(nau8824); nau8824_sema_release(nau8824);
} }
...@@ -850,15 +856,15 @@ static void nau8824_setup_auto_irq(struct nau8824 *nau8824) ...@@ -850,15 +856,15 @@ static void nau8824_setup_auto_irq(struct nau8824 *nau8824)
{ {
struct regmap *regmap = nau8824->regmap; struct regmap *regmap = nau8824->regmap;
/* Enable jack ejection, short key press and release interruption. */ /* Enable jack ejection interruption. */
regmap_update_bits(regmap, NAU8824_REG_INTERRUPT_SETTING_1, regmap_update_bits(regmap, NAU8824_REG_INTERRUPT_SETTING_1,
NAU8824_IRQ_INSERT_EN | NAU8824_IRQ_EJECT_EN, NAU8824_IRQ_INSERT_EN | NAU8824_IRQ_EJECT_EN,
NAU8824_IRQ_EJECT_EN); NAU8824_IRQ_EJECT_EN);
regmap_update_bits(regmap, NAU8824_REG_INTERRUPT_SETTING, regmap_update_bits(regmap, NAU8824_REG_INTERRUPT_SETTING,
NAU8824_IRQ_EJECT_DIS | NAU8824_IRQ_KEY_RELEASE_DIS | NAU8824_IRQ_EJECT_DIS, 0);
NAU8824_IRQ_KEY_SHORT_PRESS_DIS, 0);
/* Enable internal VCO needed for interruptions */ /* Enable internal VCO needed for interruptions */
nau8824_config_sysclk(nau8824, NAU8824_CLK_INTERNAL, 0); if (nau8824->dapm->bias_level < SND_SOC_BIAS_PREPARE)
nau8824_config_sysclk(nau8824, NAU8824_CLK_INTERNAL, 0);
regmap_update_bits(regmap, NAU8824_REG_ENA_CTRL, regmap_update_bits(regmap, NAU8824_REG_ENA_CTRL,
NAU8824_JD_SLEEP_MODE, 0); NAU8824_JD_SLEEP_MODE, 0);
} }
......
This diff is collapsed.
...@@ -476,7 +476,8 @@ struct nau8825 { ...@@ -476,7 +476,8 @@ struct nau8825 {
int xtalk_event_mask; int xtalk_event_mask;
bool xtalk_protect; bool xtalk_protect;
int imp_rms[NAU8825_XTALK_IMM]; int imp_rms[NAU8825_XTALK_IMM];
int xtalk_bypass; int xtalk_enable;
bool xtalk_baktab_initialized; /* True if initialized. */
}; };
int nau8825_enable_jack_detect(struct snd_soc_codec *codec, int nau8825_enable_jack_detect(struct snd_soc_codec *codec,
......
...@@ -67,7 +67,7 @@ static unsigned short nuc900_ac97_read(struct snd_ac97 *ac97, ...@@ -67,7 +67,7 @@ static unsigned short nuc900_ac97_read(struct snd_ac97 *ac97,
/* polling the AC_R_FINISH */ /* polling the AC_R_FINISH */
while (!(AUDIO_READ(nuc900_audio->mmio + ACTL_ACCON) & AC_R_FINISH) while (!(AUDIO_READ(nuc900_audio->mmio + ACTL_ACCON) & AC_R_FINISH)
&& timeout--) && --timeout)
mdelay(1); mdelay(1);
if (!timeout) { if (!timeout) {
...@@ -121,7 +121,7 @@ static void nuc900_ac97_write(struct snd_ac97 *ac97, unsigned short reg, ...@@ -121,7 +121,7 @@ static void nuc900_ac97_write(struct snd_ac97 *ac97, unsigned short reg,
/* polling the AC_W_FINISH */ /* polling the AC_W_FINISH */
while ((AUDIO_READ(nuc900_audio->mmio + ACTL_ACCON) & AC_W_FINISH) while ((AUDIO_READ(nuc900_audio->mmio + ACTL_ACCON) & AC_W_FINISH)
&& timeout--) && --timeout)
mdelay(1); mdelay(1);
if (!timeout) if (!timeout)
...@@ -345,11 +345,10 @@ static int nuc900_ac97_drvprobe(struct platform_device *pdev) ...@@ -345,11 +345,10 @@ static int nuc900_ac97_drvprobe(struct platform_device *pdev)
goto out; goto out;
} }
nuc900_audio->irq_num = platform_get_irq(pdev, 0); ret = platform_get_irq(pdev, 0);
if (!nuc900_audio->irq_num) { if (ret < 0)
ret = -EBUSY;
goto out; goto out;
} nuc900_audio->irq_num = ret;
nuc900_ac97_data = nuc900_audio; nuc900_ac97_data = nuc900_audio;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment