204{
207
211
213 if (rc < 0) {
214 goto err_i2cm_grab;
215 }
217 if (rc < 0) {
218 goto err_i2cm_lock;
219 }
221 if ((drv) && (drv->
xfer)) {
222 rc = drv->
xfer(i2cm, msg, num, to);
223 } else {
225 }
226 if (rc < 0) {
227 goto err_drv_xfer;
228 }
232
233err_drv_xfer:
235err_i2cm_lock:
237err_i2cm_grab:
238 return rc;
239}
xwer_t xwds_i2cm_put(struct xwds_i2cm *i2cm)
XWDS API:减少对象的引用计数
xwer_t xwds_i2cm_grab(struct xwds_i2cm *i2cm)
XWDS API:增加对象的引用计数
#define xwds_cast(type, dev)
#define XWDS_VALIDATE(exp, errstr,...)
#define EINVAL
Invalid argument
#define EFAULT
Bad address
#define ENOSYS
Function not implemented
static xwer_t xwos_mtx_lock_to(struct xwos_mtx *mtx, xwtm_t to)
XWOS API:限时等待上锁互斥锁
static xwer_t xwos_mtx_unlock(struct xwos_mtx *mtx)
XWOS API:解锁互斥锁
const struct xwds_driver * drv
xwer_t(* xfer)(struct xwds_i2cm *, struct xwds_i2c_msg *, xwsz_t, xwtm_t)
struct xwds_i2cm::@17 xfer