How do we handle multi-function devices? [was Re: [patch] ucb1x00: touchscreen cleanups]

Mark Underwood
2005-08-01T08:03:38Z

--- Richard Purdie <rpurdie@rpsys.net> wrote:

> On Sun, 2005-07-31 at 23:11 +0100, Mark Underwood
> wrote:
> > As this isn't the only chip of this sort (i.e. a
> > multi-function chip not on the CPU bus) maybe we
> > should store the bus driver in a common place. If
> > needed we could have a very simple bus driver
> > subsystem (this might already be in the kernel, I
> > haven't looked at the bus stuff) in which you
> register
> > a bus driver and client drivers register with the
> bus
> > driver. Just an idea :-).
>
> This was the idea with the drivers/soc suggestion
> although I think that
> name is perhaps misleading.
>
> How about drivers/mfd where mfd = Multi Functional
> Devices?

I was thinking of something like driver/bus into which
we might also be able to put the I2C and LL3 buses.
The only problem is that this might leave some parts
of the multi function chip homeless (if they can't
find a home in other subsystems).

>
> I think it would be acceptable (and in keeping with
> the other drivers
> e.g. pcmcia) to seeing the arch and platform
> specific modules with the
> main driver as long as the naming reflected it (like
> the existing mcp
> and ucb code does) i.e.:
>
> mcp-core.c
> mcp-sa1100.c
> ucb1x00-code.c
> ucb1x00-assabet.c
> ucb1x00-collie.c

Maybe, I haven't looked at pcmcia but the I2C
subsystem manages to avoid any arch dependent stuff so
couldn't we? I need to do more homework ;-), but
surely we only need a bus driver (IP block specific,
platform and arch independent), a core driver to
register busses and clients, and client drivers.

>
> If code can be separated out into subsystems, I'm
> not so sure where they
> should go though. The existing policy would suggest
> drivers/input/touchscreen and sound/xxx for these...
>
> ucb1x00-ts.c
> ucb1x00-audio.c

Yes, any function of a multi function device that can
live in a subsystem should do otherwise imagine the
mess, for example, with a chip that has a USB master
on it.

Mark

>
> Opinions/Comments?
>
> Richard
>
>

___________________________________________________________
Yahoo! Messenger - NEW crystal clear PC to PC calling worldwide with voicemail http://uk.messenger.yahoo.com