public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Solomon Peachy <pizza@shaftnet.org>
To: Arnd Bergmann <arnd@arndb.de>
Cc: linux-kernel@vger.kernel.org,
	"John W. Linville" <linville@tuxdriver.com>,
	Wei Yongjun <yongjun_wei@trendmicro.com.cn>,
	Dmitry Tarnyagin <dmitry.tarnyagin@lockless.no>,
	Ajitpal Singh <ajitpal.singh@stericsson.com>,
	linux-wireless@vger.kernel.org
Subject: Re: [PATCH] cw1200: fix some obvious mistakes
Date: Wed, 5 Jun 2013 00:08:02 -0400	[thread overview]
Message-ID: <20130605040802.GA22735@shaftnet.org> (raw)
In-Reply-To: <2014948.bdhzSga56L@wuerfel>

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

On Mon, Jun 03, 2013 at 10:40:42AM +0200, Arnd Bergmann wrote:
> It's much better than what you have today, but not ideal because it
> means the driver cannot be a loadable module any more.

At least not when being built with platform data, anyway.

I suppose the next step here is to define some devicetree mappings for 
this device.

> At least it's not in a released kernel yet.

Given the boneheaded buffer overflow bug that was just pointed out (and 
fixed), I'm glad it's getting a lot more scrutiny.

> Regarding a long-term solution, I think what we should do here is to
> move the reset logic into the SDIO framework itself: We have similar
> requirements even for eMMC and SD cards, where you need to provide
> the correct voltage to a device on the MMC port in order for it to
> work. Today this is supported to a varying degree on the MMC controller
> level, where we hook into various frameworks (clk, reset-controller,
> regulator, gpio, pinctrl, power domain) based on platformm data or
> device tree information on the controller node.

If I understand you correctly, the "traditional" platform data -- power 
supply, clock source, and gpio (ie POWERUP, RESET) lines would be 
brought up using this mechanism, in order to get the device to attach to 
the SDIO bus.  One wrinkle here is that the cw1200 has some minimum 
timing requirements between when each of those signals are brought up; I 
don't know if there's a way to encode that into the devicetree.

But that's only half the equation.

Once the device has identified it to the SDIO bus and the driver's 
probe() function is called, the other half of the platform data is 
needed to successfully probe the hardware.  Namely, the 'ref_clk' field. 
This would need to be made available to the probe() call (eg via 
func->dev.platform_data) but from what I can tell there's currently no 
mechanism to make that connection.

Anyway, it's time for bed.

 - Solomon
-- 
Solomon Peachy        		       pizza at shaftnet dot org	 
Delray Beach, FL                          ^^ (email/xmpp) ^^
Quidquid latine dictum sit, altum viditur.

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

  reply	other threads:[~2013-06-05  4:08 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-01 22:37 [PATCH] cw1200: fix some obvious mistakes Arnd Bergmann
2013-06-02 12:29 ` Solomon Peachy
2013-06-02 13:27   ` Solomon Peachy
2013-06-02 13:59   ` Arnd Bergmann
2013-06-02 14:47     ` Solomon Peachy
2013-06-02 19:38       ` Linus Walleij
2013-06-03  8:40       ` Arnd Bergmann
2013-06-05  4:08         ` Solomon Peachy [this message]
2013-06-05 12:08           ` Arnd Bergmann

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=20130605040802.GA22735@shaftnet.org \
    --to=pizza@shaftnet.org \
    --cc=ajitpal.singh@stericsson.com \
    --cc=arnd@arndb.de \
    --cc=dmitry.tarnyagin@lockless.no \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=linville@tuxdriver.com \
    --cc=yongjun_wei@trendmicro.com.cn \
    /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