From 34ab37eef5a5f8023abc657ab38f7b9fe11c38b3 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Tue, 8 Sep 2015 11:15:11 -0600 Subject: dm: usb: Add support for USB keyboards with driver model Switch USB keyboards over to use driver model instead of scanning with the horrible usb_get_dev_index() function. This involves creating a new uclass for keyboards, although so far there is no API. Signed-off-by: Simon Glass --- common/cmd_usb.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'common/cmd_usb.c') diff --git a/common/cmd_usb.c b/common/cmd_usb.c index 1ef55dcd1c..4679134478 100644 --- a/common/cmd_usb.c +++ b/common/cmd_usb.c @@ -527,11 +527,14 @@ static void do_usb_start(void) /* Driver model will probe the devices as they are found */ #ifndef CONFIG_DM_USB -#ifdef CONFIG_USB_STORAGE +# ifdef CONFIG_USB_STORAGE /* try to recognize storage devices immediately */ usb_stor_curr_dev = usb_stor_scan(1); -#endif -#endif +# endif +# ifdef CONFIG_USB_KEYBOARD + drv_usb_kbd_init(); +# endif +#endif /* !CONFIG_DM_USB */ #ifdef CONFIG_USB_HOST_ETHER # ifdef CONFIG_DM_ETH # ifndef CONFIG_DM_USB @@ -542,9 +545,6 @@ static void do_usb_start(void) usb_ether_curr_dev = usb_host_eth_scan(1); # endif #endif -#ifdef CONFIG_USB_KEYBOARD - drv_usb_kbd_init(); -#endif } #ifdef CONFIG_DM_USB -- cgit v1.2.1