[RFC]Question regrading TODO list for bcm2835 camera and bcm2835-audio
Greg KH
gregkh at linuxfoundation.org
Mon Feb 27 00:50:32 PST 2017
On Mon, Feb 27, 2017 at 12:30:41AM -0800, Michael Zoran wrote:
> On Mon, 2017-02-27 at 08:14 +0100, Greg KH wrote:
> > On Sun, Feb 26, 2017 at 11:56:04AM -0800, Michael Zoran wrote:
> > > I noticed that the TODO list for the RPI camera and the audio
> > > driver
> > > have fixing the issue of the runtime load order dependency between
> > > vchiq and the function driver(camera/audio). The TODO list mentions
> > > making the camera driver a platform driver.
> > >
> > > I've been toying for awhile with the concept of making vchiq a bus
> > > driver that function drivers register with rather the making the
> > > camera
> > > a platform driver. Meaning when vchiq loads, it walks the
> > > registered
> > > functions drivers and using the standard driver methods and bus
> > > matching methods it calls the probe function on the function
> > > drivers.
> > >
> > > Taking this farther, one could also change vchiq to be a non-
> > > platform
> > > driver with the raspberrypi firmware driver also being a bus
> > > driver. I
> > > have prototyped converting the firmware driver to be a bus driver,
> > > but
> > > perhaps it would be better to start from the other direction and
> > > convert the camera and audio drivers first.
> >
> > Yes! I hate platform drivers, they abuse the system in lots of
> > places.
> > I strongly recommend bus-specific drivers and subsystems like this,
> > so
> > this has my vote for "things that would be good to do" :)
>
> Seriously Greg, your joking right? I'm not 100% sure how to take what
> your saying.
I am not joking at all, I think this is the correct thing to do.
> It's not like doing this is much code. I have something mostly working
> with a few hundred lines. The basics of it are described in the book,
> "Linux Device Drivers". I do understand I'm a newbee and all through
> and this is a more advanced topic.
Writing a bus is a pain in the ass, sorry about that, but yes, it should
be just a few hundred lines of code, as you have found out.
> Platform drivers are great for root devices of a system, but I'm not
> sure they make sense for things that are attached through a driver.
I totally agree.
thanks,
greg k-h
More information about the linux-rpi-kernel
mailing list