[U-Boot] [PATCH 0/7] [RFC] Driver model, take 1

Graeme Russ graeme.russ at gmail.com
Tue Sep 4 03:06:14 CEST 2012


Hi DM Team,

On Thu, Aug 23, 2012 at 4:28 AM, Marek Vasut <marek.vasut at gmail.com> wrote:
> Dear Marek Vasut,
>
>> I'm submitting hereby the initial code for the driver model. This is a RFC
>> patch, please give it a spin and scream :-)

I haven't had a really deep play with this yet, but a couple of things
do come to mind...

I've been thinking of a scenario of a simple LED module with both a
Serial (RS-232) and USB interface (or maybe an I2C connection). I can
think of two options:
 a) Write a separate driver for each interface
 b) Write a single driver that can handle all supported interfaces

If going with option b, the LED driver is going to need to know what
type of interface it is attached on in order for it to issue the
correct commands to the upstream driver. I can't see a way in the
current model to determine the type of the upstream driver

Another thought is naming if instances (this was in particular
relation to stdio) - If you have two UARTS onboard, it would make
sense to name them in U-Boot according to how they are named on the
board (UART1 / UART2, Port 1 / Port 2, Console / Diagnostics, etc.)
and when directing stdio, using the name of the port.

Regards,

Graeme


More information about the U-Boot mailing list