[alsa-devel] [PATCH 1/2] ALSA: ASoC: add DT bindings for cs4270

Timur Tabi timur at freescale.com
Tue Jul 24 22:39:21 CEST 2012


Daniel Mack wrote:
> Yes, I'm aware of this, I just wonder how does your DT note looks like?

Take a look at arch/powerpc/boot/dts/mpc8610_hpcd.dts

> And are you ok with the 2nd patch?

Isn't that something that should be done in platform code?  It seems very
platform-specific for a codec driver.  I have no problem using the CS4270
on my board, and I don't need this feature.

> +	/* See if we way to bring the codec out of reset */
> +	if (np) {
> +		enum of_gpio_flags reset_gpio_flags;

Blank line after variable declarations

> +		int reset_gpio = of_get_named_gpio_flags(np, "reset-gpio", 0,
> +							 &reset_gpio_flags);

Can you make this line shorter by using shorter variable names or something?

> +		if (devm_gpio_request_one(&i2c_client->dev, reset_gpio,
> +				     reset_gpio_flags & OF_GPIO_ACTIVE_LOW ?
> +					GPIOF_OUT_INIT_LOW : GPIOF_OUT_INIT_HIGH,
> +				     "cs4270 reset") < 0) {
> +			reset_gpio = -EINVAL;
> +		}

I don't see where you test whether the reset-gpio property is present.  It
won't be present in my device tree.

> +	}
> +

-- 
Timur Tabi
Linux kernel developer at Freescale



More information about the Alsa-devel mailing list