[alsa-devel] [PATCH] ASoC: cs4271: claim reset GPIO in bus probe function
Daniel Mack
daniel at zonque.org
Wed Feb 19 17:17:42 CET 2014
On 02/19/2014 05:08 PM, Austin, Brian wrote:
>> On Feb 19, 2014, at 7:06, "Daniel Mack" <zonque at gmail.com> wrote:
>> - if (gpio_nreset >= 0)
>> - if (devm_gpio_request(codec->dev, gpio_nreset, "CS4271 Reset"))
>> - gpio_nreset = -EINVAL;
>> - if (gpio_nreset >= 0) {
>> + if (gpio_is_valid(cs4271->gpio_nreset)) {
>> /* Reset codec */
>> - gpio_direction_output(gpio_nreset, 0);
>> + gpio_direction_output(cs4271->gpio_nreset, 0);
>> udelay(1);
>> - gpio_set_value(gpio_nreset, 1);
>> + gpio_set_value(cs4271->gpio_nreset, 1);
>> /* Give the codec time to wake up */
>> udelay(1);
>> }
>
> Since your moving all the GPIO reset code into a new function that's
> called from the bus probes why not put the reset in there as well?
Because I want the codec to stay in reset until it is actually used, and
the machine drivers builds the DAI link.
Daniel
More information about the Alsa-devel
mailing list