master/master.h
changeset 430 74754f45d5fa
parent 404 7f7f429e13c7
child 441 ffa13db95e10
equal deleted inserted replaced
429:b21b000e88e3 430:74754f45d5fa
    42 #define _EC_MASTER_H_
    42 #define _EC_MASTER_H_
    43 
    43 
    44 #include <linux/list.h>
    44 #include <linux/list.h>
    45 #include <linux/sysfs.h>
    45 #include <linux/sysfs.h>
    46 #include <linux/timer.h>
    46 #include <linux/timer.h>
       
    47 #include <linux/wait.h>
    47 #include <asm/atomic.h>
    48 #include <asm/atomic.h>
    48 #include <asm/semaphore.h>
    49 #include <asm/semaphore.h>
    49 
    50 
    50 #include "device.h"
    51 #include "device.h"
    51 #include "domain.h"
    52 #include "domain.h"
   135     int (*request_cb)(void *); /**< lock request callback */
   136     int (*request_cb)(void *); /**< lock request callback */
   136     void (*release_cb)(void *); /**< lock release callback */
   137     void (*release_cb)(void *); /**< lock release callback */
   137     void *cb_data; /**< data parameter of locking callbacks */
   138     void *cb_data; /**< data parameter of locking callbacks */
   138 
   139 
   139     uint8_t eeprom_write_enable; /**< allow write operations to EEPROMs */
   140     uint8_t eeprom_write_enable; /**< allow write operations to EEPROMs */
       
   141 
       
   142     struct list_head sdo_requests; /**< list of SDO read/write requests */
       
   143     wait_queue_head_t sdo_wait_queue; /**< wait queue for SDO access */
   140 };
   144 };
   141 
   145 
   142 /*****************************************************************************/
   146 /*****************************************************************************/
   143 
   147 
   144 // master creation and deletion
   148 // master creation and deletion
   167 
   171 
   168 // other methods
   172 // other methods
   169 void ec_sync_config(const ec_sii_sync_t *, const ec_slave_t *, uint8_t *);
   173 void ec_sync_config(const ec_sii_sync_t *, const ec_slave_t *, uint8_t *);
   170 void ec_fmmu_config(const ec_fmmu_t *, const ec_slave_t *, uint8_t *);
   174 void ec_fmmu_config(const ec_fmmu_t *, const ec_slave_t *, uint8_t *);
   171 void ec_master_calc_addressing(ec_master_t *);
   175 void ec_master_calc_addressing(ec_master_t *);
       
   176 void ec_master_flush_sdo_requests(ec_master_t *);
   172 
   177 
   173 /*****************************************************************************/
   178 /*****************************************************************************/
   174 
   179 
   175 #endif
   180 #endif