[PATCH 3/3] exports: Fix export of SPI access functions

Wolfgang Denk wd at denx.de
Fri Aug 26 15:42:44 CEST 2022


Dear Paul,

In message <20220505153242.1598807-4-paul.barker at sancloud.com> you wrote:
> * With CONFIG_DM_SPI defined, spi_get_bus_and_cs needs to be used
> instead of spi_setup_slave to configure a SPI bus. As spi_setup_slave is
> already present in the export list it is reasonable to also export
> spi_get_bus_and_cs.
>
> * For the functions listed in the jump table to be callable they must
> also be defined in the "exports.h" header. Define the various exported
> SPI functions so that they can be used.
>
> Signed-off-by: Paul Barker <paul.barker at sancloud.com>
> ---
>  include/_exports.h |  4 ++++
>  include/exports.h  | 15 ++++++++++++++-
>  2 files changed, 18 insertions(+), 1 deletion(-)

Sorry, but I disagree here.  The SPI functions should have never
been part of the export interface.  As far as I can see now, they
have been added by commit bedd8403f7

    export SPI functions to standalone apps

    While we're here, fix the broken #ifdef handling in _exports.h.

    Signed-off-by: Mike Frysinger <vapier at gentoo.org>

in 2009. Actually I must even have seen them, as I complained about
incorrect comment style :-(

But no, SPI support should not be inclluded.  I2C was there because
it was needed for reading the environment from an EEPROM, but then
the interface was frozen ano no more new interfices / drivers should
be allowed.


Viele Grüße,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich,  Office: Kirchenstr. 5, 82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
If you can't explain it to a six year old, you  don't  understand  it
yourself.                                           - Albert Einstein


More information about the U-Boot mailing list