architecture for slave mode

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

I have managed successfully to make the scx200_acb.c module use either
interrupts or use polling, so that I can ultimately operate the adapter
as a slave.

To achieve this, I need a 'task' that sleeps most of the time, and will
get woken up by my ISR. This task can then do one of two things:

    (a) If the adapter is busy as a master, then wake the master
        state-machine to continue with the comms, or
    (b) If the adapter is idle, invoke the slave state-machine to receive
        the data from the bus.

(At the moment the ISR just wakes the master state-machine directly.)

Questions:

    (1) How is it best to create/start this 'receiver task'?
        Should this be done in i2c-core.c ?
    (2) An interpreter proc will have to be called by the slave
        state-machine. Presumably my 'client' driver will install this
        by means of some call-back. Would one use something like
        i2c_register_entry() for that ? 

I don't really understand fully how all the i2c-* modules fit together,
so please feel free to tell me if I'm off the track here..

Regards,
Thomas




[Index of Archives]     [Linux Kernel]     [Linux Hardware Monitoring]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux