linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: grant.likely@secretlab.ca (Grant Likely)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 1/9] spi/pxa2xx: register driver properly
Date: Wed, 29 Dec 2010 14:36:43 -0700	[thread overview]
Message-ID: <20101229213642.GA15198@angua.secretlab.ca> (raw)
In-Reply-To: <349566.41372.qm@web180301.mail.gq1.yahoo.com>

On Wed, Dec 29, 2010 at 09:00:36AM -0800, David Brownell wrote:
> 
> 
> > Date: Wednesday, December 29, 2010, 12:11 AM
> > On Thu, Dec 02, 2010 at 06:47:29PM
> > +0100, Sebastian Andrzej Siewior wrote:
> > > use platform_driver_register instead of
> > platform_driver_probe. The
> > > latter only checks available devices at the time of
> > calling. So if a
> > > device gets inserter at a later point in time then the
> > driver will never
> > > play with it.
> 
> 
> I detect an effort to change the classic model for board initialization in Linux:  first set up
> and register all system/platform devices on each
> board then do the same for their drivers.  ("hardware first" ... "software second".
> 
> (Without such a change, there's no need for
>  patches like this (of which I've recently
> seen a few).
> 
> I've not seen discussion about the desirability
> of such a change.

That has never been the Linux device model.  It may be a reasonable
assumption on a large number of boards, but it is definitely not the
model.  In this case, this specific driver now needs to be bound to a
device that is registered in a pci device driver's probe routine.  The
change is completely justified.

Regarding the platform_driver_probe() pattern, I've never liked it
because it short circuits the normal device model behaviour and makes
all drivers that use it a special case.  It does recover a couple of
KB at runtime per driver, which is why I tolerate the existing users,
but doing so is effectively pinching pennies to solve a deficit in the
thousands.  I don't think it is worth it and I will not hesitate to
remove platform_device_probe() from a driver if it is possible that a
device will get registered late.

Instead of doing this per-driver special case thing, I would be far
more interested in a mechanism that allows userspace to trigger
discarding of  __devinit sections for any module at runtime, along
with the associated dropping of .probe() hooks, so that a system could
take advantage of the runtime memory savings on all drivers.

g.

  parent reply	other threads:[~2010-12-29 21:36 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-12-02 17:47 SPI support for CE4100, v2 Sebastian Andrzej Siewior
2010-12-02 17:47 ` [PATCH 1/9] spi/pxa2xx: register driver properly Sebastian Andrzej Siewior
2010-12-29  8:11   ` Grant Likely
2010-12-29 17:00     ` David Brownell
2010-12-29 21:26       ` Sebastian Andrzej Siewior
2010-12-29 21:40         ` Grant Likely
2010-12-30  1:55           ` David Brownell
2010-12-29 21:36       ` Grant Likely [this message]
2010-12-02 17:47 ` [PATCH 2/9] spi/pxa2xx: add support for shared IRQ handler Sebastian Andrzej Siewior
2010-12-29  8:11   ` Grant Likely
2010-12-02 17:47 ` [PATCH 3/9] spi/pxa2xx: Use define for SSSR_TFL_MASK instead of plain numbers Sebastian Andrzej Siewior
2010-12-29  8:11   ` Grant Likely
2010-12-02 17:47 ` [PATCH 4/9] arm/pxa2xx: reorgazine SSP and SPI header files Sebastian Andrzej Siewior
2010-12-29  8:11   ` Grant Likely
2010-12-02 17:47 ` [PATCH 5/9] spi/pxa2xx: Add CE4100 support Sebastian Andrzej Siewior
2010-12-29  8:11   ` Grant Likely
2010-12-02 17:47 ` [PATCH 6/9] spi/pxa2xx: Consider CE4100's FIFO depth Sebastian Andrzej Siewior
2010-12-29  8:11   ` Grant Likely
2010-12-02 17:47 ` [PATCH 7/9] spi/pxa2xx: Add chipselect support for Sodaville Sebastian Andrzej Siewior
2010-12-29  8:11   ` Grant Likely
2010-12-02 17:47 ` [PATCH 8/9] spi/pxa2xx: Modify RX-Tresh instead of busy-loop for the remaining RX bytes Sebastian Andrzej Siewior
2010-12-29  8:12   ` Grant Likely
2010-12-02 17:47 ` [PATCH 9/9] spi/pxa2xx: pass of_node to spi device and set a parent device Sebastian Andrzej Siewior
2010-12-29  8:11   ` Grant Likely
2010-12-09 16:43 ` [sodaville] SPI support for CE4100, v2 Sebastian Andrzej Siewior
2010-12-29  8:10   ` Grant Likely

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20101229213642.GA15198@angua.secretlab.ca \
    --to=grant.likely@secretlab.ca \
    --cc=linux-arm-kernel@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).