Re: [PATCH 3/3] UIO: generic platform driver

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Uwe <Uwe.Kleine-Koenig@...>
Cc: Hans J. Koch <hjk@...>, Greg Kroah-Hartman <gregkh@...>, <linux-kernel@...>
Date: Sunday, April 27, 2008 - 1:12 pm

On Wed, Apr 23, 2008 at 10:56:29AM +0200, Uwe Kleine-König wrote:

Hi Uwe,
sorry for the delay, I was away for a few days and had an awful lot of
work when I came back.

About your generic platform driver: I think we've got two choices, both
of them are acceptable as far as I'm concerned:

1.) Use the clk API and make your driver depend on it. AFAICS, only ARM
and PPC implement it right now. On some platforms, it will probably
never be implemented. E.g. x86 doesn't have any clocks that could be
controlled that way. It's probably only useful for SoCs.
Advantages: People who need it get clk support for free, without having
to write much code.
Disadvantages: The generic platform driver is not available for all
platforms. It might not be easy to implement the dependency in Kconfig
in a way acceptable to all maintainers ;-)

2.) Don't use the clk API. I don't think we would lose much. Drivers
could implement clk stuff in their board support. You could add some
generic function pointers in struct uio_platdata that are called in
open/release/probe/remove. That way, any platform specific stuff,
including clk, could be handled.
Advantages: The generic platform driver is available for all
platforms, no need for dependencies in Kconfig.
Disadvantages: People who need clk_* must write a lot of code within
their board support file. Not nice and clean...

I'm ready to accept 1.) or 2.), or even both of them (why can't we have
two generic platform drivers?)

As you are the author (and probably user) of this driver, please decide,
and send a new patch for review.

Thanks,
Hans

--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH 0/4] UIO: fixes, cleanups and a new driver, Uwe Kleine-König, (Thu Apr 10, 8:36 am)
Re: [PATCH 0/3] UIO: cleanup and platform driver, Hans J. Koch, (Tue Apr 22, 9:39 am)
[PATCH 1/3] UIO: don't let UIO_CIF and UIO_SMX depend twice ..., Uwe Kleine-König, (Tue Apr 22, 5:52 am)
[PATCH 2/3] provide a dummy implementation of the clk API, Uwe Kleine-König, (Tue Apr 22, 5:52 am)
[PATCH 3/3] UIO: generic platform driver, Uwe Kleine-König, (Tue Apr 22, 5:52 am)
Re: [PATCH 3/3] UIO: generic platform driver, Hans J. Koch, (Sun Apr 27, 1:12 pm)
[PATCH] UIO: don't let UIO_CIF and UIO_SMX depend twice on UIO, Uwe Kleine-König, (Tue May 20, 5:24 am)
[PATCH] UIO: generic platform driver, Uwe Kleine-König, (Tue May 20, 5:24 am)
Re: [PATCH] UIO: generic platform driver, Hans J. Koch, (Tue May 20, 5:08 pm)
Re: [PATCH] UIO: generic platform driver, Uwe , (Mon May 26, 1:58 am)
Re: [PATCH] UIO: generic platform driver, Greg KH, (Mon May 26, 2:02 am)
Re: [PATCH] UIO: generic platform driver, Uwe , (Fri May 30, 5:16 am)
Re: [PATCH] UIO: generic platform driver, Greg KH, (Fri May 30, 12:35 pm)
Re: [PATCH] UIO: generic platform driver, Uwe , (Tue Jun 3, 3:21 am)
Re: [PATCH] UIO: generic platform driver, Hans J. Koch, (Tue Jun 3, 5:24 am)
Re: [PATCH 3/3] UIO: generic platform driver, Ben Nizette, (Tue Apr 22, 6:26 am)
Re: [PATCH 3/3] UIO: generic platform driver, Hans J. Koch, (Tue Apr 22, 9:35 am)
[PATCH 1/4] UIO: hold a reference to the device's owner whil..., Uwe Kleine-König, (Thu Apr 10, 8:37 am)
[PATCH 2/4] UIO: use menuconfig, Uwe Kleine-König, (Thu Apr 10, 8:37 am)
Re: [PATCH 2/4] UIO: use menuconfig, Hans J. Koch, (Thu Apr 10, 3:39 pm)
Re: [PATCH 2/4] UIO: use menuconfig, Greg KH, (Fri Apr 11, 5:36 pm)
Re: [PATCH 2/4] UIO: use menuconfig, Hans J. Koch, (Fri Apr 11, 6:58 pm)
[PATCH 3/4] UIO: wrap all uio drivers in "if UIO" and "endif", Uwe Kleine-König, (Thu Apr 10, 8:37 am)
[PATCH 4/4] [RFC] UIO: generic platform driver, Uwe Kleine-König, (Thu Apr 10, 8:37 am)
Re: [PATCH 4/4] [RFC] UIO: generic platform driver, Hans J. Koch, (Thu Apr 10, 6:48 pm)
Re: [PATCH 4/4] [RFC] UIO: generic platform driver, Hans J. Koch, (Fri Apr 11, 5:24 am)
Re: [PATCH 4/4] [RFC] UIO: generic platform driver, Hans J. Koch, (Fri Apr 11, 3:59 pm)
Re: [PATCH 4/4 v2] [RFC] UIO: generic platform driver, Hans J. Koch, (Fri Apr 11, 6:54 pm)
Re: [PATCH 4/4 v2] [RFC] UIO: generic platform driver, Hans J. Koch, (Fri Apr 11, 6:33 am)
Re: [PATCH 4/4 v2] [RFC] UIO: generic platform driver, Hans J. Koch, (Fri Apr 11, 7:17 am)
Re: [PATCH 4/4 v2] [RFC] UIO: generic platform driver, Russell King - ARM Linux, (Sat Apr 12, 9:16 am)
Re: [PATCH] Re: [PATCH 4/4 v2] [RFC] UIO: generic platform d..., Russell King - ARM Linux, (Mon Apr 14, 5:37 am)
Re: [PATCH] Re: [PATCH 4/4 v2] [RFC] UIO: generic platform d..., Russell King - ARM Linux, (Mon Apr 14, 6:17 am)
Re: [PATCH] Re: [PATCH 4/4 v2] [RFC] UIO: generic platform d..., Russell King - ARM Linux, (Mon Apr 14, 7:37 am)
Re: [PATCH 4/4] [RFC] UIO: generic platform driver, Hans J. Koch, (Thu Apr 10, 3:54 pm)
Re: [PATCH 4/4] [RFC] UIO: generic platform driver, Hans J. Koch, (Thu Apr 10, 5:17 pm)
Re: [PATCH 4/4] [RFC] UIO: generic platform driver, Ben Nizette, (Thu Apr 10, 9:34 pm)