Regarding writing a PCMCIA client driver for a multifunction
device
Dominik Brodowski
linux at dominikbrodowski.net
Wed Dec 7 07:03:42 EST 2005
Hi,
On Tue, Nov 29, 2005 at 10:13:48AM +0530, monali.katkar at wipro.com wrote:
> I have a 16 bit Compact flash card. This card facilitates a
> multifunction bridge between a host interface (such as on a PC, PDA )
> and both a USB 1.1 (Full Speed, Low Speed) host interface and a richly
> featured UART. I want to write a driver to support this multifunction
> device on kernel 2.6 .
It'd be interesting to know the output of
tree /sys/bus/pcmcia/
for this device, first, to determine whether it is a true multi-function
device or a pseudo multi-function device.
Also, the UART part of it might be able to be handled by serial-cs?
> a) Could you suggest me the changes that i would need to do if the
> device is multifunction device . Are there any sample multifunction
> PCMCIA drivers. Pointers to any code /documents would help .
true multifunction pcmcia devices are handled by:
drivers/ide/legacy/ide-cs.c
drivers/net/pcmcia/3c574_cs.c
drivers/net/pcmcia/3c589_cs.c
drivers/net/pcmcia/pcnet_cs.c
drivers/net/pcmcia/smc91c92_cs.c
drivers/net/wireless/hostap/hostap_cs.c
drivers/serial/serial_cs.c
pseudo multifunction pcmcia devices are handled by:
drivers/net/pcmcia/axnet_cs.c
drivers/net/pcmcia/fmvj18x_cs.c
drivers/net/pcmcia/pcnet_cs.c
drivers/net/pcmcia/smc91c92_cs.c
drivers/net/pcmcia/xirc2ps_cs.c
drivers/serial/serial_cs.c
> b)How do i look if the card functions can be used independently . What
> in the CIS information is required to support this.
Well, the output of tree /sys/bus/pcmcia/ should be a first
indication.
> c) How to reserve resources for each function on this card
> usage of pcmcia_request_io() and realease_io.
the _attach() / _probe() callbacks are called independently for each
function, be it real or pseudo multifunction devices. The PCMCIA core
correctly knows which one it is, and sets up the resources accordingly.
However, you need to request the proper ones ;)
Hope this helps,
Dominik
More information about the linux-pcmcia
mailing list