26#ifndef __xwcd_ds_device_h__
27#define __xwcd_ds_device_h__
44#define xwds_itr_next_device(ds, p) \
45 xwlib_bclst_itr_next_entry(p, &(ds)->devhead, \
46 struct xwds_device, obj.node)
51#define xwds_itr_prev_device(ds, p) \
52 xwlib_bclst_itr_prev_entry(p, &(ds)->devhead, \
53 struct xwds_device, obj.node)
58#define xwds_itr_next_device_safe(ds, p, n) \
59 xwlib_bclst_itr_next_entry_safe(p, n, &(ds)->devhead, \
60 struct xwds_device, obj.node)
65#define xwds_itr_prev_device_safe(ds, p, n) \
66 xwlib_bclst_itr_prev_entry_safe(p, n, &(ds)->devhead, \
67 struct xwds_device, obj.node)
70#define __IOC_TYPEBITS 8
71#define __IOC_SIZEBITS 14
72#define __IOC_DIRBITS 2
74#define __IOC_NRMASK ((1 << __IOC_NRBITS) - 1)
75#define __IOC_TYPEMASK ((1 << __IOC_TYPEBITS) - 1)
76#define __IOC_SIZEMASK ((1 << __IOC_SIZEBITS) - 1)
77#define __IOC_DIRMASK ((1 << __IOC_DIRBITS) - 1)
79#define __IOC_NRSHIFT 0
80#define __IOC_TYPESHIFT (__IOC_NRSHIFT + __IOC_NRBITS)
81#define __IOC_SIZESHIFT (__IOC_TYPESHIFT + __IOC_TYPEBITS)
82#define __IOC_DIRSHIFT (__IOC_SIZESHIFT + __IOC_SIZEBITS)
88#define __IOC(dir, type, nr, size) \
89 (((dir) << __IOC_DIRSHIFT) | \
90 ((type) << __IOC_TYPESHIFT) | \
91 ((nr) << __IOC_NRSHIFT) | \
92 ((size) << __IOC_SIZESHIFT))
104#if defined(XWCDCFG_ds_PM) && (1 == XWCDCFG_ds_PM)
146#if defined(XWCDCFG_ds_PM) && (1 == XWCDCFG_ds_PM)
208#if defined(XWCDCFG_ds_PM) && (1 == XWCDCFG_ds_PM)
259#if defined(XWCDCFG_ds_LITE) && (1 == XWCDCFG_ds_LITE)
static xwer_t xwds_device_grab(struct xwds_device *dev)
XWDS API:增加对象的引用计数
xwer_t xwds_device_vop_start(struct xwds_device *dev)
设备基本操作函数:启动设备
xwer_t xwds_device_suspend_all(struct xwds *ds, bool ign_err)
XWDS API:暂停所有设备
static xwsq_t xwds_device_get_refcnt(struct xwds_device *dev)
XWDS API:得到对象的引用计数
void xwds_device_construct(struct xwds_device *dev)
XWDS API:设备的构造函数
void xwds_device_destruct(struct xwds_device *dev)
XWDS API:设备的析构函数
xwer_t xwds_device_probe(struct xwds *ds, struct xwds_device *dev, xwobj_gc_f gcfunc)
XWDS API:探测设备
xwer_t xwds_device_stop(struct xwds_device *dev)
XWDS API:停止设备
static xwsq_t xwds_device_get_tik(struct xwds_device *dev)
XWDS API:获取设备对象的标签
static xwer_t xwds_device_put(struct xwds_device *dev)
XWDS API:减少对象的引用计数
xwer_t xwds_device_resume_all(struct xwds *ds, bool ign_err)
XWDS API:继续所有设备
xwer_t xwds_device_vop_stop(struct xwds_device *dev)
设备基本操作函数:停止设备
xwer_t xwds_device_suspend(struct xwds_device *dev)
XWDS API:暂停设备
xwer_t xwds_device_vop_remove(struct xwds_device *dev)
设备基本操作函数:删除设备
xwer_t xwds_device_remove(struct xwds_device *dev)
XWDS API:删除设备
xwer_t xwds_device_vop_resume(struct xwds_device *dev)
设备基本操作函数:继续设备
xwer_t xwds_device_resume(struct xwds_device *dev)
XWDS API:继续设备
xwer_t xwds_device_start(struct xwds_device *dev)
XWDS API:启动设备
xwer_t xwds_device_vop_probe(struct xwds_device *dev)
设备基本操作函数:探测设备
xwer_t xwds_device_vop_suspend(struct xwds_device *dev)
设备基本操作函数:暂停设备
xwer_t xwds_obj_put(struct xwds_object *obj)
xwsq_t xwds_obj_get_tik(struct xwds_object *obj)
xwsq_t xwds_obj_get_refcnt(struct xwds_object *obj)
xwer_t xwds_obj_grab(struct xwds_object *obj)
#define __xwds_inline_api
xwer_t(* xwobj_gc_f)(struct xwos_object *)
垃圾回收函数指针类型
const struct xwds_driver * drv
const struct xwds_virtual_operation * vop
const struct xwds_resources * resources
xwer_t(* start)(struct xwds_device *)
xwer_t(* resume)(struct xwds_device *)
xwer_t(* probe)(struct xwds_device *)
xwer_t(* suspend)(struct xwds_device *)
xwer_t(* stop)(struct xwds_device *)
xwer_t(* remove)(struct xwds_device *)
xwer_t(* suspend)(struct xwds_device *)
xwer_t(* start)(struct xwds_device *)
xwer_t(* stop)(struct xwds_device *)
xwer_t(* remove)(struct xwds_device *)
xwer_t(* probe)(struct xwds_device *)
xwer_t(* resume)(struct xwds_device *)