[PATCH 1/3] gpio: Allow to print pin's label even for pin with GPIOF_FUNC function

Patrice CHOTARD patrice.chotard at foss.st.com
Wed Aug 3 15:12:33 CEST 2022


Hi Simon

On 8/2/22 14:41, Simon Glass wrote:
> On Tue, 2 Aug 2022 at 03:09, Patrice Chotard
> <patrice.chotard at foss.st.com> wrote:
>>
>> Currently, if pin's function is GPIOF_FUNC, only "func" if displayed
>> without any other information. It would be interesting, if information is
>> available, to indicate which pinmuxing's name is used.
>>
>> For example, for STM32 SoC's based platform, "gpio status" command
>> output :
>>
>>    before
>>     Bank GPIOZ:
>>       GPIOZ0: unused : 0 [ ]
>>       GPIOZ1: unused : 0 [ ]
>>       GPIOZ2: unused : 0 [ ]
>>       GPIOZ3: unused : 0 [ ]
>>       GPIOZ4: func
>>       GPIOZ5: func
>>       GPIOZ6: unused : 0 [ ]
>>       GPIOZ7: unused : 0 [ ]
>>       GPIOZ8: unknown
>>       GPIOZ9: unknown
>>       GPIOZ10: unknown
>>       GPIOZ11: unknown
>>       GPIOZ12: unknown
>>       GPIOZ13: unknown
>>       GPIOZ14: unknown
>>       GPIOZ15: unknown
>>
>>    After
>>     Bank GPIOZ:
>>       GPIOZ0: unused : 0 [ ]
>>       GPIOZ1: unused : 0 [ ]
>>       GPIOZ2: unused : 0 [ ]
>>       GPIOZ3: unused : 0 [ ]
>>       GPIOZ4: func i2c4-0
>>       GPIOZ5: func i2c4-0
>>       GPIOZ6: unused : 0 [ ]
>>       GPIOZ7: unused : 0 [ ]
>>       GPIOZ8: unknown
>>       GPIOZ9: unknown
>>       GPIOZ10: unknown
>>       GPIOZ11: unknown
>>       GPIOZ12: unknown
>>       GPIOZ13: unknown
>>       GPIOZ14: unknown
>>       GPIOZ15: unknown
>>
>> Signed-off-by: Patrice Chotard <patrice.chotard at foss.st.com>
>> ---
>>
>>  drivers/gpio/gpio-uclass.c | 16 +++++++++++-----
>>  1 file changed, 11 insertions(+), 5 deletions(-)
> 
> Reviewed-by: Simon Glass <sjg at chromium.org>
> 
> Do you think you could create a basic test for the gpio command? See
> test/dm/acpi.c for an example.

OK i will send a v2 with a test

Thanks
Patrice

> 
> Regards,
> Simon


More information about the U-Boot mailing list