daniel-santos / mcp2210-linux

MCP2210 driver for linux
http://danielthesantos.blogspot.com/search/label/mcp2210
51 stars 31 forks source link

Can I transfer dummy data when called _mcp2210_irq_do_intr_counter() ?? #39

Open kmc724 opened 5 years ago

kmc724 commented 5 years ago

Hello, I want to transfer dummy data when called _mcp2210_irq_do_intr_counter()

When data remain in MCP2210, he occur interrupt, master transfer dummy data and master get data which remain in MCP2210.

I don't know what should I do, so could you help me please..?

daniel-santos commented 5 years ago

Hello. I think you would want to just write an spi protocol driver that consumes the interrupt generated by this driver -- at least that is how my driver is designed. Ideally you won't have to modify this driver unless it has a bug or is lacking something. A lot of people don't seem to understand that. For specialized behaviour specific to your use case, write a separate spi protocol driver and allow the mcp2210 to probe your driver by configuring with struct mcp2210_board_config.pin[x].modalias where x is the pin your you're using for your peripheral's CS line.

Also, you can use spidev and do this from user space.