13 Mar, 2020

1 commit

  • 4dbc107f4683 ("cmd: gpio: Correct do_gpio() return value") correctly
    changed the behaviour of the gpio command to return CMD_RET_SUCCESS or
    CMD_RET_FAILURE, but any existing script which expects the return value
    to be the pin value is broken by this change.

    Reinstate the legacy behaviour for `gpio input` only.

    Fixes: 4dbc107f4683 ("cmd: gpio: Correct do_gpio() return value")
    Signed-off-by: Alex Kiernan
    Signed-off-by: Alex Kiernan
    Reviewed-by: Simon Glass

    Alex Kiernan
     

11 Feb, 2020

1 commit


08 Feb, 2020

1 commit

  • Use the correct return value in function do_gpio() and update
    commands documentation with the return values from command_ret_t enum.

    CMD_RET_SUCCESS is returned on command success and CMD_RET_FAILURE is
    returned on command failure.

    The command was returning the pin value, which caused confusion when
    debugging (#define DEBUG).

    Signed-off-by: Luka Kovacic
    Tested-by: Robert Marko

    Luka Kovacic
     

06 Feb, 2020

2 commits

  • At present dm/device.h includes the linux-compatible features. This
    requires including linux/compat.h which in turn includes a lot of headers.
    One of these is malloc.h which we thus end up including in every file in
    U-Boot. Apart from the inefficiency of this, it is problematic for sandbox
    which needs to use the system malloc() in some files.

    Move the compatibility features into a separate header file.

    Signed-off-by: Simon Glass

    Simon Glass
     
  • At present devres.h is included in all files that include dm.h but few
    make use of it. Also this pulls in linux/compat which adds several more
    headers. Drop the automatic inclusion and require files to include devres
    themselves. This provides a good indication of which files use devres.

    Signed-off-by: Simon Glass
    Reviewed-by: Anatolij Gustschin

    Simon Glass
     

26 Aug, 2019

1 commit


20 Feb, 2019

2 commits

  • Allow the 'gpio' command to match GPIO bank names regardless of the case
    of each. While these are generally in upper case, it is useful to be able
    to provide lower case with the command.

    Signed-off-by: Simon Glass
    Reviewed-by: Bin Meng

    Simon Glass
     
  • At present the gpio command only shows GPIOs which are marked as in use.
    This makes sense with 'gpio status' since we already have the '-a' flag
    to indicate that all GPIOs should be shown. But when a particular GPIO is
    requested, it seems better to always display it. At present the request is
    simply ignored.

    For example if GPIO a10 is not in use, then:

    > gpio status a10

    shows nothing, not even the function being used for that GPIO. With this
    change, it shows the pin status:

    > gpio status a10
    a10: input: 0 [ ]

    Add an extra parameter for this to avoid changing the existing flag
    parameter.

    Signed-off-by: Simon Glass
    Reviewed-by: Bin Meng
    Tested-by: Bin Meng
    [bmeng: correct the 'gpio' command in the commit message]
    Signed-off-by: Bin Meng

    Simon Glass
     

01 Feb, 2019

1 commit


16 Jan, 2019

1 commit


18 Mar, 2016

1 commit


16 Feb, 2016

1 commit

  • This is broken - we need to look at the first two characters to distinguish
    'gpio status' from 'gpio set'.

    Fixes: 0ffe6ab5 (gpio: Allow 's' as an abbreviation for 'status')
    Reported-by: Soeren Moch
    Signed-off-by: Simon Glass
    Tested-by: Soeren Moch
    Reviewed-by: Bin Meng
    Tested-by: Hannes Schmelzer

    Simon Glass
     

25 Jan, 2016

1 commit

  • Now that they are in their own directory, we can remove this prefix.
    This makes it easier to find a file since the prefix does not get in the
    way.

    Signed-off-by: Simon Glass
    Reviewed-by: Bin Meng
    Reviewed-by: Heiko Schocher
    Acked-by: Stefan Roese
    Acked-by: Przemyslaw Marczak

    Simon Glass