All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH 0/2] usb_kbd with DM enabled
@ 2018-06-27 13:10 Michal Simek
  2018-06-27 13:10 ` [U-Boot] [PATCH 1/2] usb_kbd: Add support for watchdog Michal Simek
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Michal Simek @ 2018-06-27 13:10 UTC (permalink / raw)
  To: u-boot

Hi,

I am playing with usb keyboard support with USB_DM on and I see some
issues which I want to share with you.
First of all there is missing support for multiple usb keyboards because
all are registered as usbkbd.
This can be changed by
-       strcpy(usb_kbd_dev.name, DEVNAME);
+       snprintf(usb_kbd_dev.name, sizeof(usb_kbd_dev.name),
+                "%s%x", DEVNAME, dev->devnum);

That devnum ID will be added there and then from usb tree you can see
which usb device should be used for example "setenv stdin usbkbd5"
Unfortunatelly remove part should be also handled to point to proper
stdio_dev.

Why there is usb-keyboard compatible string? Code is discovering
usb when usb start is called. Or is there also support via DT?

Next thing what I found a problematic is when probe_usb_keyboard()
is called from usb_kbd_probe(). There is code which reads stdin variable
if it is not setup to usbkbd then probe fails which seems to me wrong.
I for example want to start with serial and then start usb and use input
from keyboard or both. That's why I think this code should be out of DM
probe function and probing shouldn't be mixed with user setting.

Last but not least I see with kermit double echo when usbkbd is used
which is quite weird.
Similar problem was reported here.
https://lists.denx.de/pipermail/u-boot/2014-November/196713.html
Do you know what's the reason for that echo?
(usb_kbd_getc() is really returning only one char).

Thanks,
Michal


Michal Simek (2):
  usb_kbd: Add support for watchdog
  usb_kdb: Get stdio_dev directly from sdev pointer

 common/usb_kbd.c | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

-- 
1.9.1

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2018-06-27 13:18 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-06-27 13:10 [U-Boot] [PATCH 0/2] usb_kbd with DM enabled Michal Simek
2018-06-27 13:10 ` [U-Boot] [PATCH 1/2] usb_kbd: Add support for watchdog Michal Simek
2018-06-27 13:10 ` [U-Boot] [PATCH 2/2] usb_kdb: Get stdio_dev directly from sdev pointer Michal Simek
2018-06-27 13:18 ` [U-Boot] [PATCH 0/2] usb_kbd with DM enabled Michal Simek

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.