mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Felipe Balbi <balbi@ti.com>
To: Andy Shevchenko <andy.shevchenko@gmail.com>
Cc: balbi@ti.com, viresh kumar <viresh.kumar@linaro.org>,
	Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
	Vinod Koul <vinod.koul@intel.com>,
	linux-kernel@vger.kernel.org,
	spear-devel <spear-devel@list.st.com>,
	Heikki Krogerus <heikki.krogerus@linux.intel.com>,
	Mika Westerberg <mika.westerberg@linux.intel.com>
Subject: Re: [PATCH 1/4] dmaengine: dw_dmac: use helper macro module_platform_driver()
Date: Wed, 10 Oct 2012 16:42:00 +0300	[thread overview]
Message-ID: <20121010134159.GA4114@arwen.pp.htv.fi> (raw)
In-Reply-To: <CAHp75VdprTQBsmEJudGExceFRRjXiN_xFGaMtU+mcw+vzM1oVg@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1987 bytes --]

Hi,

On Wed, Oct 10, 2012 at 03:52:40PM +0300, Andy Shevchenko wrote:
> On Wed, Oct 10, 2012 at 3:40 PM, Felipe Balbi <balbi@ti.com> wrote:
> > On Wed, Oct 10, 2012 at 12:21:04PM +0300, Andy Shevchenko wrote:
> >> On Wed, Oct 10, 2012 at 12:08 PM, viresh kumar <viresh.kumar@linaro.org> wrote:
> >> > On Wed, Oct 10, 2012 at 2:34 PM, Andy Shevchenko
> >> > <andriy.shevchenko@linux.intel.com> wrote:
> >> >> On Tue, 2012-10-02 at 14:41 +0300, Andy Shevchenko wrote:
> >> >>> From: Heikki Krogerus <heikki.krogerus@linux.intel.com>
> >> >>>
> >> >>> Since v3.2 we have nice macro to define the platform driver's init and exit
> >> >>> calls. This patch simplifies the dw_dmac driver by using that macro.
> >> >>
> >> >> Actually we can't do this. It will break initialization of some other
> >> >> drivers.
> >> >
> >> > why?
> >>
> >> We have spi, i2c and hsuart devices connected to the DMA controller.
> >> In case we would like to use DMA we have to have the dw_dmac loaded
> >> before them. Currently we have spi driver on subsys_initcall level,
> >> and Mika, who is developing it, will change to module_init_call level.
> >> However, it will just hide the potential issue. He also tried to use
> >> deferred module loading, but we don't know if it's good solution or
> >> not, and that solution requires something to stop deferring at some
> >> moment.
> >>
> >> Might be we missed something and there is a better solution.
> >
> > if they can only work with DMA, they should return -EPROBE_DEFER so
> > their probe() function can be called after DMA driver has finished
> > probing.
> 
> They could work either with DMA or via PIO mode.
> How does the driver know when to stop to return -EPROBE_DEFER?

Why would you even allow to work as PIO-only ? Who would even want to
use the driver as PIO only ?

In any case, you can add a Kconfig choice like WHATEVER_PIO_ONLY and
only return -EPROBE_DEFER ifndef WHATEVER_PIO_ONLY.

-- 
balbi

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

  reply	other threads:[~2012-10-10 13:47 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-02 11:41 [PATCH 0/4] dw_dmac: few cleanups to the driver Andy Shevchenko
2012-10-02 11:41 ` [PATCH 1/4] dmaengine: dw_dmac: use helper macro module_platform_driver() Andy Shevchenko
2012-10-10  9:04   ` Andy Shevchenko
2012-10-10  9:08     ` viresh kumar
2012-10-10  9:21       ` Andy Shevchenko
2012-10-10  9:23         ` Viresh Kumar
2012-10-10 12:40         ` Felipe Balbi
2012-10-10 12:52           ` Andy Shevchenko
2012-10-10 13:42             ` Felipe Balbi [this message]
2012-10-10 13:45               ` Felipe Balbi
2012-10-11  5:39               ` Mika Westerberg
2012-10-02 11:41 ` [PATCH 2/4] dmaengine: dw_dmac: add module alias Andy Shevchenko
2012-10-10  9:00   ` Andy Shevchenko
2012-10-02 11:42 ` [PATCH 3/4] dmaengine: dw_dmac: remove CLK dependency Andy Shevchenko
2012-10-02 11:42 ` [PATCH 4/4] dmaengine: dw_dmac: amend description and indentation Andy Shevchenko
2012-10-03  3:25 ` [PATCH 0/4] dw_dmac: few cleanups to the driver viresh kumar

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=20121010134159.GA4114@arwen.pp.htv.fi \
    --to=balbi@ti.com \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=andy.shevchenko@gmail.com \
    --cc=heikki.krogerus@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mika.westerberg@linux.intel.com \
    --cc=spear-devel@list.st.com \
    --cc=vinod.koul@intel.com \
    --cc=viresh.kumar@linaro.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

all inboxes | Powered by JetHome®