平台驱动Linux [英] Platform driver Linux

查看:53
本文介绍了平台驱动Linux的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,



我是一名嵌入式Linux开发人员,我是Linux的新手,我对平台驱动程序有疑问,任何人都可以给以下结构的解释



  struct  platform_device {
const char * name;
u32 id;
struct device dev;
u32 num_resources;
struct resource * resource;
};

如果我们为 id添加 -1 ,我想知道结构中 id 的工作是什么这是什么意思





谢谢,

shan



从标题中删除大喊[/编辑]

解决方案

id大多数情况下是标识符aka句柄。 -1通常用于无效值



PS:这是一个更多Windows风格的论坛,所以对于Linux问题,它不是最好找的地方

hi all,

I am working as a embedded linux developer and i am new to Linux, i am having a doubt in platform driver, can any one give a explanation on the below structure

struct platform_device {
	const char	*name;
	u32		id;
	struct device	dev;
	u32		num_resources;
	struct resource	*resource;
};

I want to know what is the work of id in the structure if we put -1 for id what does it mean


Thanks,
shan

[Edit]Shouting removed from title[/Edit]

解决方案

id is most times an "identifier" aka "handle". -1 is often used for "invalid value"

PS: here is a more Windows-flavour forum, so with Linux-question it is not the best place to find


这篇关于平台驱动Linux的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆