Re: [RFC PATCH 1/2] mmc_spi: export probe and remove functions

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Pierre Ossman
Date: Sunday, June 1, 2008 - 3:18 am

On Mon, 26 May 2008 17:10:09 +0400
Anton Vorontsov <avorontsov@ru.mvista.com> wrote:


There's a big difference. usb_add_hcd() is designed specifically to be
called by other, real probe functions. mmc_spi_probe() _is_ a probe
function. Also exporting it as a library function is very confusing.


That's not a callback, but an explicit call to another module.


All of this work looks a bit like trying to wedge a square piece into a
round hole. It looks to me that the kernel needs a bit of restructuring
to handle it. You can't really export every probe function of every
platform device so that you can add OF hooks to it.

From what I can tell, the OF stuff behaves very much like the PNP
system on PCs. The information relayed is a bit more versatile though.
Perhaps what is needed is a more advanced "platform" bus that is
modeled after the PNP bus, but with the extra ability of handling the
stuff currently crammed into the platform structures. mmc_spi would
then be extended to be driver for the "platform" bus and we could have
generic calls like platform_get_pin(dev, "ro");.

Rgds
-- 
     -- Pierre Ossman

  Linux kernel, MMC maintainer        http://www.kernel.org
  rdesktop, core developer          http://www.rdesktop.org
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[RFC] OpenFirmware bindings for the MMC-over-SPI driver, Anton Vorontsov, (Fri May 23, 11:27 am)
[RFC PATCH 1/2] mmc_spi: export probe and remove functions, Anton Vorontsov, (Fri May 23, 11:28 am)
Re: [RFC] OpenFirmware bindings for the MMC-over-SPI driver, David Brownell, (Sat May 24, 12:56 pm)
Re: [RFC PATCH 2/2] mmc: add OpenFirmware bindings for the ..., Segher Boessenkool, (Sat May 24, 4:06 pm)
Re: [RFC PATCH 2/2] mmc: add OpenFirmware bindings for the ..., Segher Boessenkool, (Sat May 24, 4:14 pm)
Re: [RFC PATCH 1/2] mmc_spi: export probe and remove functions, Pierre Ossman, (Sun Jun 1, 3:18 am)