[alsa-devel] [PATCH] EDB93xx: Add support for CS4271 CODEC on EDB93xx boards

Alexander Sverdlin subaparts at yandex.ru
Wed Feb 2 11:48:08 CET 2011

Dear Hartley, Dear Mark,

On Tue, 2011-02-01 at 18:02 -0600, H Hartley Sweeten wrote:
> > +static int edb93xx_cs4271_hw_setup(struct spi_device *spi)
> > +{
> > +	int gpio_nreset;
> > +	int err;
> > +
> > +	if (machine_is_edb9301() || machine_is_edb9302()) {
> > +		gpio_nreset = EP93XX_GPIO_LINE_EGPIO1;
> Are you planning on removing gpio_nreset and gpio_disable from struct cs4271_platform_data?
> If not, you should just setup the gpio mapping in edb93xx_register_spi before you actually
> register the spi_board_info.  Then this function and the following two can just do something
> like the following and not worry about the if ... else if ... etc.

Initially I had GPIO code in machine driver, but during the
conversations in alsa-devel list it has been moved to CODEC driver:

I'm really confused now, where should it be? If I will init
cs4271_platform_data with GPIO values, CODEC driver will manage it.
Otherwise CODEC driver should be rewritten without GPIO support and I
can add it to platform code.

Mark Brown, could you please comment on this, as I've moved GPIO things
to CODEC part based on your review.

Best regards,
	Alexander Sverdlin.

More information about the Alsa-devel mailing list