Lines Matching +full:everything +full:- +full:else
1 // SPDX-License-Identifier: GPL-2.0-only
3 * Based on sound/arm/pxa2xx-ac97.c and sound/soc/pxa/pxa2xx-ac97.c
21 #include <sound/pxa2xx-lib.h>
24 #include <mach/regs-ac97.h>
48 int val = -ENODEV; in pxa2xx_ac97_read()
52 return -ENODEV; in pxa2xx_ac97_read()
59 else in pxa2xx_ac97_read()
73 val = -ETIMEDOUT; in pxa2xx_ac97_read()
99 else in pxa2xx_ac97_write()
110 ret = -EIO; in pxa2xx_ac97_write()
128 GCR &= GCR_COLD_RST; /* clear everything but nCRST */ in pxa_ac97_cold_pxa25x()
152 GCR &= GCR_COLD_RST; /* clear everything but nCRST */ in pxa_ac97_cold_pxa27x()
182 GCR &= GCR_COLD_RST; /* clear everything but nCRST */ in pxa_ac97_cold_pxa3xx()
202 else in pxa2xx_ac97_try_warm_reset()
207 else in pxa2xx_ac97_try_warm_reset()
212 else in pxa2xx_ac97_try_warm_reset()
216 while (!((GSR | gsr_bits) & (GSR_PCR | GSR_SCR)) && timeout--) in pxa2xx_ac97_try_warm_reset()
239 else in pxa2xx_ac97_try_cold_reset()
244 else in pxa2xx_ac97_try_cold_reset()
249 else in pxa2xx_ac97_try_cold_reset()
253 while (!((GSR | gsr_bits) & (GSR_PCR | GSR_SCR)) && timeout--) in pxa2xx_ac97_try_cold_reset()
321 pxa2xx_audio_ops_t *pdata = dev->dev.platform_data; in pxa2xx_ac97_hw_probe()
324 switch (pdata->reset_gpio) { in pxa2xx_ac97_hw_probe()
327 reset_gpio = pdata->reset_gpio; in pxa2xx_ac97_hw_probe()
332 case -1: in pxa2xx_ac97_hw_probe()
335 dev_err(&dev->dev, "Invalid reset GPIO %d\n", in pxa2xx_ac97_hw_probe()
336 pdata->reset_gpio); in pxa2xx_ac97_hw_probe()
338 } else if (!pdata && dev->dev.of_node) { in pxa2xx_ac97_hw_probe()
339 pdata = devm_kzalloc(&dev->dev, sizeof(*pdata), GFP_KERNEL); in pxa2xx_ac97_hw_probe()
341 return -ENOMEM; in pxa2xx_ac97_hw_probe()
342 pdata->reset_gpio = of_get_named_gpio(dev->dev.of_node, in pxa2xx_ac97_hw_probe()
343 "reset-gpios", 0); in pxa2xx_ac97_hw_probe()
344 if (pdata->reset_gpio == -ENOENT) in pxa2xx_ac97_hw_probe()
345 pdata->reset_gpio = -1; in pxa2xx_ac97_hw_probe()
346 else if (pdata->reset_gpio < 0) in pxa2xx_ac97_hw_probe()
347 return pdata->reset_gpio; in pxa2xx_ac97_hw_probe()
348 reset_gpio = pdata->reset_gpio; in pxa2xx_ac97_hw_probe()
349 } else { in pxa2xx_ac97_hw_probe()
356 * This gpio is needed for a work-around to a bug in the ac97 in pxa2xx_ac97_hw_probe()
370 ac97conf_clk = clk_get(&dev->dev, "AC97CONFCLK"); in pxa2xx_ac97_hw_probe()
378 ac97_clk = clk_get(&dev->dev, "AC97CLK"); in pxa2xx_ac97_hw_probe()