文章详情

  • 游戏榜单
  • 软件榜单
关闭导航
热搜榜
热门下载
热门标签
php爱好者> php文档>class_device_create

class_device_create

时间:2009-04-02  来源:hsq863

最近一直再弄2410触摸屏的驱动,在读tsdev.c这个文件很多不懂得地方。需要搞清楚,到底触摸屏的设备文件是哪个?mouse0?还是input0?还是ts0?那主设备号,和次设备号又是多少?
这个函数好像是动态创建设备文件的,但是我的cramfs文件系统,还不可写,怎么处理?

Name

class_device_create — creates a class device and registers it with sysfs

Synopsis

struct class_device * class_device_create ( struct class *   cls,
  struct class_device *   parent,
  dev_t   devt,
  struct device *   device,
  const char *   fmt,
    ...);

Arguments

cls

pointer to the struct class that this device should be registered to.

parent

pointer to the parent struct class_device of this new device, if any.

devt

the dev_t for the char device to be added.

device

a pointer to a struct device that is assiociated with this class device.

fmt

string for the class device's name

...

variable arguments

Description

This function can be used by char device classes. A struct class_device will be created in sysfs, registered to the specified class. A “dev” file will be created, showing the dev_t for the device, if the dev_t is not 0,0. If a pointer to a parent struct class_device is passed in, the newly created struct class_device will be a child of that device in sysfs. The pointer to the struct class_device will be returned from the call. Any further sysfs files that might be required can be created using this pointer.

Note

the struct class passed to this function must have previously been created with a call to class_create.

相关阅读 更多 +
排行榜 更多 +
暗夜格斗手游

暗夜格斗手游

棋牌卡牌 下载
魔渊之刃手游

魔渊之刃手游

角色扮演 下载
像素火影次世代手游版

像素火影次世代手游版

体育竞技 下载