public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Paul Parsons <lost.distance@yahoo.com>
To: Samuel Ortiz <sameo@linux.intel.com>
Cc: linux-kernel@vger.kernel.org, philipp.zabel@gmail.com, mad_soft@inbox.ru
Subject: Re: [PATCH] mfd: Add ASIC3 PCMCIA/CF support
Date: Mon, 23 May 2011 15:27:18 +0100 (BST)	[thread overview]
Message-ID: <680026.93151.qm@web29013.mail.ird.yahoo.com> (raw)
In-Reply-To: <20110522221459.GQ18610@sortiz-mobl>

Hi Samuel,

> Why is this driver linked to the pxa2 pcmcia driver ? Can't
> we make it just
> asic3 specific and enable it from the board asic3 platform
> data ?

This driver isn't the actual driver! This patch merely provides the platform_data for the asic3 pcmcia platform_device. This is then linked to the existing pxa2xx-pcmcia platform_driver, which is the actual driver.

In the case of pcmcia, the platform_data provides callbacks (struct pcmcia_low_level) rather than simple static data, and thus needs to reside in drivers/pcmcia where those callbacks are declared.

In the case of asic3, the pcmcia platform_device also needs to provide a parent link back to the asic3 platform_device because the callbacks need to access asic3 registers (in addition to GPIOs).

Thus either the pcmcia platform_data or the asic3 platform_device need to be made global if both are to be referenced by the pcmcia platform_device. I chose the former, simply because the pcmcia platform_device was already defined in arch/arm/mach-pxa/hx4700.c

Agreed this arrangement seems somewhat untidy. I am keen to hear if someone can improve upon it.

Paul

      reply	other threads:[~2011-05-23 14:27 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-20 14:49 [PATCH] mfd: Add ASIC3 PCMCIA/CF support Paul Parsons
2011-05-22 22:15 ` Samuel Ortiz
2011-05-23 14:27   ` Paul Parsons [this message]

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=680026.93151.qm@web29013.mail.ird.yahoo.com \
    --to=lost.distance@yahoo.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mad_soft@inbox.ru \
    --cc=philipp.zabel@gmail.com \
    --cc=sameo@linux.intel.com \
    /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