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

H Hartley Sweeten hartleys at visionengravers.com
Wed Feb 2 11:53:15 EST 2011


On Wednesday, February 02, 2011 6:27 AM, Alexander Sverdlin wrote:
> 
> Dear Mark, Dear Hartley,
> 
> On Wed, 2011-02-02 at 12:53 +0000, Mark Brown wrote:
>>> Now Hartley suggested to move GPIO handling to platform code. This makes
>>> sense, as SPI-enable will be managed automatically, and reset is also
>>> more related to platform (depending on schematics, inversion and so on).
>>
>> What is the advantage of this?  The GPIO management has to be done
>> somewhere and replicating it in every platform seems like a complete
>> waste of time.  Given that one of the GPIOs is a power control it'll
>> also mean that it's not possible to manage the power dynamically at
>> runtime.
>> 
>
> I think we can leave reset management in CODEC (as it will be almost the
> same for all platforms), leave enable pin management in CODEC unused,
> but attach enable GPIO to spi_board_info in platform to enable other SPI
> devices on bus.
> 
> Hartley, in this case we cannot use existing cs4271_platform_data and
> have to leave long if-else statemens as is. Would it be ok?

I don't have any problem with leaving the reset management in the codec.
The enable (chip-select) should be handled in the platform code.  But,
gpio_disable should be removed from struct cs4271_platform_data to avoid
any confusion.

I have an idea on how to remove the if-else mess in the ep93xx platform init.
Please make any updates you have and post the patches.  I will comment on
it then.

Thanks,
Hartley


More information about the linux-arm-kernel mailing list