[U-Boot] : Suggestions for SPI driver pusher

Hi,
FYI: I am trying to prepare the spi driver code to more readable. As each spi driver has a common set of calls.
<< header file inclusion >> << Register bit masks >>
<< MISC macro definitions >>
<< controller reg structure >>
<< controller private slave structure >>
<< inline func defination >>
<< spi_xfer_sub() >>
<< spi_setup_slave_sub >>
<< spi_cs_is_valid >>
<< spi_cs_activate >>
<< spi_cs_deactivate >>
<< spi_init >>
<< spi_setup_slave >> { spi_setup_slave_sub() }
<< spi_free_slave >>
<< spi_claim_bus >>
<< spi_release_bus >>
<< spi_xfer code >> { spi_xfer_sub() }
I am just trying to do the above format at-least from the drivers which are pushing now onwards.
Please see the reff driver http://git.denx.de/?p=u-boot/u-boot-spi.git;a=commitdiff;h=1465d055f9d7a81ed...
Let me know your views.
-- Thanks, Jagan.

-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
On 08/09/2013 04:48 AM, Jagan Teki wrote:
Hi,
FYI: I am trying to prepare the spi driver code to more readable. As each spi driver has a common set of calls.
<< header file inclusion >> << Register bit masks >>
<< MISC macro definitions >>
<< controller reg structure >>
<< controller private slave structure >>
<< inline func defination >>
<< spi_xfer_sub() >>
<< spi_setup_slave_sub >>
<< spi_cs_is_valid >>
<< spi_cs_activate >>
<< spi_cs_deactivate >>
<< spi_init >>
<< spi_setup_slave >> { spi_setup_slave_sub() }
<< spi_free_slave >>
<< spi_claim_bus >>
<< spi_release_bus >>
<< spi_xfer code >> { spi_xfer_sub() }
I am just trying to do the above format at-least from the drivers which are pushing now onwards.
Please see the reff driver http://git.denx.de/?p=u-boot/u-boot-spi.git;a=commitdiff;h=1465d055f9d7a81ed...
Sounds
like a good idea to me.
- -- Tom
participants (2)
-
Jagan Teki
-
Tom Rini