[U-Boot] [PATCH v3 1/7] dm: serial: Add ->getconfig() callback

Simon Glass sjg at chromium.org
Wed Dec 5 12:55:37 UTC 2018


HI Andy,

On Tue, 27 Nov 2018 at 09:03, Andy Shevchenko
<andriy.shevchenko at linux.intel.com> wrote:
>
> On Mon, Nov 26, 2018 at 06:02:28PM -0700, Simon Glass wrote:
> > Hi Andy,
> >
> > On Tue, 20 Nov 2018 at 14:52, Andy Shevchenko
> > <andriy.shevchenko at linux.intel.com> wrote:
> > >
> > > In some cases it would be good to know the settings, such as parity,
> > > of current serial console. One example might be an ACPI SPCR table
> > > to generate using these parameters.
> > >
> > > Signed-off-by: Andy Shevchenko <andriy.shevchenko at linux.intel.com>
> > > ---
> > >  drivers/serial/sandbox.c       | 13 +++++++++++++
> > >  drivers/serial/serial-uclass.c | 16 ++++++++++++++++
> > >  include/common.h               |  1 +
> > >  include/serial.h               | 26 +++++++++++++++++++++++---
> > >  test/dm/serial.c               |  7 +++++++
> > >  5 files changed, 60 insertions(+), 3 deletions(-)
> > >
> >
> > My only concern is that serial_get_config() should have a device parameter.
>
> It's obviously out of scope of this series.
>
> The rest of similar functions are operate on top of current console device and
> do not have such parameter, while being DM-based functions.
>
> I would gladly rebase my series on top any work which is done regard above request.
> For now, I don't see such possibility.

My point is that you are adding a new function which does not use
driver model properly. The serial_getconfig() function should have a
device parameter, and it should not support non-DM, since it is a new
feature.

I'm going to pick this up, absent any other issues, and see if I can
do a patch for it afterwards.

Reviewed-by: Simon Glass <sjg at chromium.org>

Regards,
Simon


More information about the U-Boot mailing list