[PATCH] u_serial: add setbrg to be able to use loadb & co

Jean-Christophe PLAGNIOL-VILLARD plagnioj at jcrosoft.com
Wed Jan 4 06:45:33 EST 2012


On 11:35 Wed 04 Jan     , Eric Bénard wrote:
> Signed-off-by: Eric Bénard <eric at eukrea.com>
> ---
>  drivers/usb/gadget/u_serial.c |    5 +++++
>  1 files changed, 5 insertions(+), 0 deletions(-)
> 
> diff --git a/drivers/usb/gadget/u_serial.c b/drivers/usb/gadget/u_serial.c
> index e310c3a..980b527 100644
> --- a/drivers/usb/gadget/u_serial.c
> +++ b/drivers/usb/gadget/u_serial.c
> @@ -420,6 +420,10 @@ static int serial_getc(struct console_device *cdev)
>  static void serial_flush(struct console_device *cdev)
>  {
>  }
> +static int serial_setbaudrate(struct console_device *cdev, int baudrate)
> +{
> +	return 0;
> +}
>  
>  static struct console_device *mycdev;
>  
> @@ -469,6 +473,7 @@ int gserial_connect(struct gserial *gser, u8 port_num)
>  	cdev->putc = serial_putc;
>  	cdev->getc = serial_getc;
>  	cdev->flush = serial_flush;
> +	cdev->setbrg = serial_setbaudrate;
>  	console_register(cdev);
>  	mycdev = cdev;

if no setbrg this need to be manage at framework level

Best Regards,
J.



More information about the barebox mailing list