[lkml]   [2011]   [May]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH] mfd: Add ASIC3 PCMCIA/CF support
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.


 \ /
  Last update: 2011-05-23 16:29    [W:0.056 / U:14.852 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site