lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <680026.93151.qm@web29013.mail.ird.yahoo.com>
Date:	Mon, 23 May 2011 15:27:18 +0100 (BST)
From:	Paul Parsons <lost.distance@...oo.com>
To:	Samuel Ortiz <sameo@...ux.intel.com>
Cc:	linux-kernel@...r.kernel.org, philipp.zabel@...il.com,
	mad_soft@...ox.ru
Subject: Re: [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.

Paul
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ