PCI Device Driver - Newbie - Embedded

This is a discussion on PCI Device Driver - Newbie - Embedded ; Hello, I am writing a PCI Device Driver for a customised PCI card. I have one basic doubt. The PCI Driver structure does not have open, close, read, write in the FOPS. so do we have to create a another ...

+ Reply to Thread
Results 1 to 2 of 2

Thread: PCI Device Driver - Newbie

  1. PCI Device Driver - Newbie

    Hello,

    I am writing a PCI Device Driver for a customised PCI card.
    I have one basic doubt.

    The PCI Driver structure does not have open, close, read, write in the
    FOPS.
    so do we have to create a another layer of driver above this PCI Driver
    to handle all
    these mentioned functionalities.

    Where can i get a sample PCI driver to study ?

    Thanks
    Raj


  2. Re: PCI Device Driver - Newbie

    pranav.tendulkar@gmail.com wrote:
    > Hello,

    Hello

    >
    > I am writing a PCI Device Driver for a customised PCI card.
    > I have one basic doubt.
    >
    > The PCI Driver structure does not have open, close, read, write in the
    > FOPS.

    Because it is the driver of PCI-bus-controller. It implements routine to
    communicate with a PCI-card on PCI-bus through a PCI-protocol.


    > so do we have to create a another layer of driver above this PCI Driver
    > to handle all
    > these mentioned functionalities.

    Yes.
    If you need to implement read() and write(), you should register a char
    driver and include it in PCI list (pci_register_driver()).

    >
    > Where can i get a sample PCI driver to study ?

    /driver/char
    /driver/video
    ....

    teo_icKs


+ Reply to Thread