All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sebastian Andrzej Siewior <bigeasy-hfZtesqFncYOwBW4kG4KsQ@public.gmane.org>
To: Russell King - ARM Linux <linux-lFZ/pmaqli7XmaaqVzeoHQ@public.gmane.org>
Cc: David Brownell
	<dbrownell-Rn4VEauK+AKRv+LV9MX5uipxlwaOVQ5f@public.gmane.org>,
	eric.y.miao-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org,
	Mark Brown
	<broonie-yzvPICuk2AATkU/dhu1WVueM+bqZidxxQQ4Iyu8u01E@public.gmane.org>,
	Haojian Zhuang
	<haojian.zhuang-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
	sodaville-hfZtesqFncYOwBW4kG4KsQ@public.gmane.org,
	drwyrm-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org,
	spi-devel-general-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org
Subject: Re: [sodaville] [PATCH 1/9] spi/pxa2xx: don't use subys initcall for driver init
Date: Fri, 26 Nov 2010 14:29:16 +0100	[thread overview]
Message-ID: <4CEFB62C.6020508@linutronix.de> (raw)
In-Reply-To: <20101126110605.GI9310-l+eeeJia6m9vn6HldHNs0ANdhmdF6hFW@public.gmane.org>

Russell King - ARM Linux wrote:
> On Fri, Nov 26, 2010 at 11:50:28AM +0100, Sebastian Andrzej Siewior wrote:
>> * Russell King - ARM Linux | 2010-11-25 23:54:15 [+0000]:
>>
>>> Why should the PXA code change when you haven't explained _why_ you want
>>> to change the SPI driver to conform to your idea?
>> The problem was, that the platform driver never got probed after I
>> registered the PCI driver. For that reason I made the patch attached. It
>> got lost while moving the tree forward and I did not notice it earlier.
>> While at it, I changed the subsys_init to module_init because it looked
>> wrong. At this time I was also thinking about using one module for the
>> platform and PCI code but never got to it.
> 
> This is one of the problems of the foo_driver_probe() idea - if the
> device is not present at the time the driver is registered, then the
> driver loses out completely.
> 
> This would seem to be exagerated as you're creating this platform device
> from a PCI device - who's to say that someone won't unbind the PCI device
> and re-bind it later, causing the platform device to be deleted and
> re-created?

Unbinding a PCI device should call ->remove of the pci driver and this in
turn will remove the platform device which calls ->remove of the driver.

> As such, I think the patch you've shown in this email is more appropriate
> (getting rid of the platform_driver_probe()) than trying to sort out
> init-level dependencies.  Really, the init-level dependencies in this case
> are not the problem - the use of platform_driver_probe() is.

Okay. So I leave as it.

Sebastian

------------------------------------------------------------------------------
Increase Visibility of Your 3D Game App & Earn a Chance To Win $500!
Tap into the largest installed PC base & get more eyes on your game by
optimizing for Intel(R) Graphics Technology. Get started today with the
Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs.
http://p.sf.net/sfu/intelisp-dev2dev

WARNING: multiple messages have this Message-ID (diff)
From: bigeasy@linutronix.de (Sebastian Andrzej Siewior)
To: linux-arm-kernel@lists.infradead.org
Subject: [sodaville] [PATCH 1/9] spi/pxa2xx: don't use subys initcall for driver init
Date: Fri, 26 Nov 2010 14:29:16 +0100	[thread overview]
Message-ID: <4CEFB62C.6020508@linutronix.de> (raw)
In-Reply-To: <20101126110605.GI9310@n2100.arm.linux.org.uk>

Russell King - ARM Linux wrote:
> On Fri, Nov 26, 2010 at 11:50:28AM +0100, Sebastian Andrzej Siewior wrote:
>> * Russell King - ARM Linux | 2010-11-25 23:54:15 [+0000]:
>>
>>> Why should the PXA code change when you haven't explained _why_ you want
>>> to change the SPI driver to conform to your idea?
>> The problem was, that the platform driver never got probed after I
>> registered the PCI driver. For that reason I made the patch attached. It
>> got lost while moving the tree forward and I did not notice it earlier.
>> While at it, I changed the subsys_init to module_init because it looked
>> wrong. At this time I was also thinking about using one module for the
>> platform and PCI code but never got to it.
> 
> This is one of the problems of the foo_driver_probe() idea - if the
> device is not present at the time the driver is registered, then the
> driver loses out completely.
> 
> This would seem to be exagerated as you're creating this platform device
> from a PCI device - who's to say that someone won't unbind the PCI device
> and re-bind it later, causing the platform device to be deleted and
> re-created?

Unbinding a PCI device should call ->remove of the pci driver and this in
turn will remove the platform device which calls ->remove of the driver.

> As such, I think the patch you've shown in this email is more appropriate
> (getting rid of the platform_driver_probe()) than trying to sort out
> init-level dependencies.  Really, the init-level dependencies in this case
> are not the problem - the use of platform_driver_probe() is.

Okay. So I leave as it.

Sebastian

  parent reply	other threads:[~2010-11-26 13:29 UTC|newest]

Thread overview: 52+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-24 11:13 SPI support for Sodaville Sebastian Andrzej Siewior
2010-11-24 11:13 ` Sebastian Andrzej Siewior
     [not found] ` <1290597207-29838-1-git-send-email-bigeasy-hfZtesqFncYOwBW4kG4KsQ@public.gmane.org>
2010-11-24 11:13   ` [PATCH 1/9] spi/pxa2xx: don't use subys initcall for driver init Sebastian Andrzej Siewior
2010-11-24 11:13     ` Sebastian Andrzej Siewior
2010-11-24 13:18     ` Antonio Ospite
2010-11-24 13:18       ` Antonio Ospite
     [not found]     ` <1290597207-29838-2-git-send-email-bigeasy-hfZtesqFncYOwBW4kG4KsQ@public.gmane.org>
2010-11-24 13:54       ` Haojian Zhuang
2010-11-24 13:54         ` Haojian Zhuang
     [not found]         ` <AANLkTin4vh85XRkEd7YocCmKngViR_qZDe7z1b4JXyd--JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2010-11-24 14:09           ` Sebastian Andrzej Siewior
2010-11-24 14:09             ` Sebastian Andrzej Siewior
     [not found]             ` <4CED1C95.8070300-hfZtesqFncYOwBW4kG4KsQ@public.gmane.org>
2010-11-24 14:14               ` Haojian Zhuang
2010-11-24 14:14                 ` Haojian Zhuang
2010-11-24 14:16               ` Mark Brown
2010-11-24 14:16                 ` Mark Brown
     [not found]                 ` <20101124141623.GH24970-HF5t3jzXg/6ND3a5+9QAFujbO/Zr0HzV@public.gmane.org>
2010-11-24 15:30                   ` Grant Likely
2010-11-24 15:30                     ` Grant Likely
     [not found]                     ` <AANLkTikC+XW7JtJO77vQL99=d9FKpO2tLtkCuxE57j7o-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2010-11-24 15:43                       ` Mark Brown
2010-11-24 15:43                         ` Mark Brown
2010-11-24 15:39                 ` Sebastian Andrzej Siewior
2010-11-24 15:39                   ` Sebastian Andrzej Siewior
     [not found]                   ` <4CED3199.2040700-hfZtesqFncYOwBW4kG4KsQ@public.gmane.org>
2010-11-25 23:54                     ` Russell King - ARM Linux
2010-11-25 23:54                       ` Russell King - ARM Linux
     [not found]                       ` <20101125235415.GA9310-l+eeeJia6m9vn6HldHNs0ANdhmdF6hFW@public.gmane.org>
2010-11-26  1:14                         ` Grant Likely
2010-11-26  1:14                           ` Grant Likely
     [not found]                           ` <AANLkTi=tbiYCvTKH_wDDE0QuFpoBMnw-ZjF826VupnRA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2010-11-26  9:08                             ` Russell King - ARM Linux
2010-11-26  9:08                               ` Russell King - ARM Linux
2010-11-26 10:50                         ` [sodaville] " Sebastian Andrzej Siewior
2010-11-26 10:50                           ` Sebastian Andrzej Siewior
2010-11-26 11:06                           ` Russell King - ARM Linux
2010-11-26 11:06                             ` Russell King - ARM Linux
     [not found]                             ` <20101126110605.GI9310-l+eeeJia6m9vn6HldHNs0ANdhmdF6hFW@public.gmane.org>
2010-11-26 13:29                               ` Sebastian Andrzej Siewior [this message]
2010-11-26 13:29                                 ` Sebastian Andrzej Siewior
2010-11-24 11:13   ` [PATCH 2/9] spi/pxa2xx: add support for shared IRQ handler Sebastian Andrzej Siewior
2010-11-24 11:13     ` Sebastian Andrzej Siewior
2010-11-24 11:13   ` [PATCH 3/9] spi/pxa2xx: Use define for SSSR_TFL_MASK instead of plain numbers Sebastian Andrzej Siewior
2010-11-24 11:13     ` Sebastian Andrzej Siewior
2010-11-24 11:13   ` [PATCH 4/9] arm/pxa2xx: reorgazine SSP and SPI header files Sebastian Andrzej Siewior
2010-11-24 11:13     ` Sebastian Andrzej Siewior
     [not found]     ` <1290597207-29838-5-git-send-email-bigeasy-hfZtesqFncYOwBW4kG4KsQ@public.gmane.org>
2010-11-24 14:03       ` Haojian Zhuang
2010-11-24 14:03         ` Haojian Zhuang
     [not found]         ` <AANLkTinBFQZkuH4haeQAZQv8p0WZN5uh4xJj53sjUGTt-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2010-11-24 14:13           ` Sebastian Andrzej Siewior
2010-11-24 14:13             ` Sebastian Andrzej Siewior
2010-11-24 11:13   ` [PATCH 5/9] spi/pxa2xx: Add CE4100 support Sebastian Andrzej Siewior
2010-11-24 11:13     ` Sebastian Andrzej Siewior
2010-11-24 11:13   ` [PATCH 6/9] spi/pxa2xx: Consider CE4100's FIFO depth Sebastian Andrzej Siewior
2010-11-24 11:13     ` Sebastian Andrzej Siewior
2010-11-24 11:13   ` [PATCH 7/9] spi/pxa2xx: Add chipselect support for Sodaville Sebastian Andrzej Siewior
2010-11-24 11:13     ` Sebastian Andrzej Siewior
2010-11-24 11:13   ` [PATCH 8/9] spi/pxa2xx: Modify RX-Tresh instead of busy-loop for the remaining RX bytes Sebastian Andrzej Siewior
2010-11-24 11:13     ` Sebastian Andrzej Siewior
2010-11-24 11:13   ` [PATCH 9/9] spi/pxa2xx: pass of_node to spi device and set a parent device Sebastian Andrzej Siewior
2010-11-24 11:13     ` Sebastian Andrzej Siewior

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=4CEFB62C.6020508@linutronix.de \
    --to=bigeasy-hfztesqfncyowbw4kg4ksq@public.gmane.org \
    --cc=broonie-yzvPICuk2AATkU/dhu1WVueM+bqZidxxQQ4Iyu8u01E@public.gmane.org \
    --cc=dbrownell-Rn4VEauK+AKRv+LV9MX5uipxlwaOVQ5f@public.gmane.org \
    --cc=drwyrm-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=eric.y.miao-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=haojian.zhuang-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
    --cc=linux-lFZ/pmaqli7XmaaqVzeoHQ@public.gmane.org \
    --cc=sodaville-hfZtesqFncYOwBW4kG4KsQ@public.gmane.org \
    --cc=spi-devel-general-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.