mbox series

[U-Boot,0/5] dm: serial: Fix up some serial API errors

Message ID 20181205195353.246542-1-sjg@chromium.org
Headers show
Series dm: serial: Fix up some serial API errors | expand

Message

Simon Glass Dec. 5, 2018, 7:53 p.m. UTC
New serial functions should use a device pointer as the first argument.
The old functions are only there for backwards compatibilty, and can be
adjusted soon.

For now, adjust the new functions to work correctly.


Simon Glass (5):
  serial: Move new functions to serial.h
  dm: serial: Adjust serial_getconfig() to use proper API
  dm: serial: Adjust serial_setconfig() to use proper API
  dm: serial: Adjust serial_getinfo() to use proper API
  dm: serial: Tidy up header file comments

 arch/x86/lib/acpi_table.c      | 11 +++++++----
 drivers/serial/serial-uclass.c | 27 +++++++++----------------
 include/common.h               |  5 -----
 include/serial.h               | 36 +++++++++++++++++++++++++++++++---
 test/dm/serial.c               | 19 ++++++++++--------
 5 files changed, 60 insertions(+), 38 deletions(-)

Comments

Andy Shevchenko Dec. 5, 2018, 9:26 p.m. UTC | #1
On Wed, Dec 5, 2018 at 9:54 PM Simon Glass <sjg@chromium.org> wrote:
>
> New serial functions should use a device pointer as the first argument.
> The old functions are only there for backwards compatibilty, and can be
> adjusted soon.
>
> For now, adjust the new functions to work correctly.
>

Thanks!
I'm not sure I would be able to test it, but you may use my
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>

Couple of remarks:
- I think it make sense to try for serial device only once in
acpi_create_spcr() if I'm reading result correctly
- the setconfig() / getconfig() have both some staled comments, it
seems you dropped only for one.



> Simon Glass (5):
>   serial: Move new functions to serial.h
>   dm: serial: Adjust serial_getconfig() to use proper API
>   dm: serial: Adjust serial_setconfig() to use proper API
>   dm: serial: Adjust serial_getinfo() to use proper API
>   dm: serial: Tidy up header file comments
>
>  arch/x86/lib/acpi_table.c      | 11 +++++++----
>  drivers/serial/serial-uclass.c | 27 +++++++++----------------
>  include/common.h               |  5 -----
>  include/serial.h               | 36 +++++++++++++++++++++++++++++++---
>  test/dm/serial.c               | 19 ++++++++++--------
>  5 files changed, 60 insertions(+), 38 deletions(-)
>
> --
> 2.20.0.rc1.387.gf8505762e3-goog
>
> _______________________________________________
> U-Boot mailing list
> U-Boot@lists.denx.de
> https://lists.denx.de/listinfo/u-boot
Simon Glass Dec. 6, 2018, 12:56 a.m. UTC | #2
Hi Andy,

On Wed, 5 Dec 2018 at 14:26, Andy Shevchenko <andy.shevchenko@gmail.com> wrote:
>
> On Wed, Dec 5, 2018 at 9:54 PM Simon Glass <sjg@chromium.org> wrote:
> >
> > New serial functions should use a device pointer as the first argument.
> > The old functions are only there for backwards compatibilty, and can be
> > adjusted soon.
> >
> > For now, adjust the new functions to work correctly.
> >
>
> Thanks!
> I'm not sure I would be able to test it, but you may use my
> Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
>
> Couple of remarks:
> - I think it make sense to try for serial device only once in
> acpi_create_spcr() if I'm reading result correctly

I believe that is what I am doing. Can you please be more specific?

> - the setconfig() / getconfig() have both some staled comments, it
> seems you dropped only for one.

Again I am not sure where?

Regards,
Simon