Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
20 years ago

Device driver for custom peripheral

Hi,

I'm trying to write a device driver for my peripheral. It has 64 registers and single IRQ. IRq is generated upon completion of HW operation. I've been able to register handler during initialization of kernel, but i'm not able to signal this information back to the process (which needs to read the result).

Can someone help me to solve this problem?

Regards,

Pankaj

2 Replies

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Does your device driver create a character device, a block device, or a network device?

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Hi Pankaj,

    > but i'm not able to signal this information back to the process

    There are many ways to do this. The easiest is probably just implementing a

    blocking read ... that returns the result after the interrupt.

    Once you sort out the basics you can always add stuff like SIGIO,

    ioctl ... whatever ... as you see fit.

    Regards,

    --Scott