machinekit / machinekit-dkms

DKMS modules for machinekit
GNU Lesser General Public License v2.1
0 stars 3 forks source link

UIO_IRQ_DISABLED : 1 versus 0 - what's the logic here? #2

Open mhaberler opened 8 years ago

mhaberler commented 8 years ago

@the-snowwhite : how does this add up:

https://github.com/machinekit/machinekit-dkms/blob/master/drivers/hm2reg_uio/hm2reg_uio.c#L42

versus

https://github.com/mhaberler/linux-socfpga/blob/4.1-rt-overlay/drivers/uio/uio_pdrv_genirq.c#L42

the-snowwhite commented 8 years ago
UIO_IRQ_DISABLED = 1,

Is current implementation, disabling the irq functionality.

not documented but it seems to work.

Setting the irq disable to 0 will the enable the irq functionality in the kernel,,,, however there was no irq functionality put into the original hm2_soc_io ip core, so this would probably give some interresting displays of error enabling it with that ip core interface version.

mhaberler commented 8 years ago

I see an enum as a definition of a constant, not a variable value, which why this is super-confusing redefining constants across source files?

the-snowwhite commented 8 years ago

Well thanks for the education... being happily ignorant is sometimes bliss...., and I thought no biggie of redefining that constant into something that seemed more appropriate for the actual application / implementation. ... I cannot remember if it works in the original version = 0

the-snowwhite commented 8 years ago

https://github.com/machinekit/mksocfpga/pull/21