linux驱动模式
linux-bus,device,driver,class
总线
总线是处理器和一个或多个设备之间的通道,在设备模型中, 所有的设备都通过总线相连, 甚至是内部的虚拟"platform"总线。总线能相互插入。设备模型展示了总线和他们所控制的设备之间的实际连接。
在 Linux 设备模型中, 总线由 bus_type 结构表示, 定义在 :
struct bus_type {
const char * name;/*总线类型名称*/
struct module * owner;/*指向模块的指针(如果有), 此模块负责操作这个总线*/
struct kset subsys;/*和该总线相关的子系统*/
struct kset drivers;/*总线驱动程式的kset*/
struct kset devices;/* 挂在该总线的所有设备的kset*/
struct klist klist_devices;/*和该总线相关的驱动程式链表*/
struct klist klist_drivers;/*挂接在该总线的设备链表*/
struct blocking_notifier_head bus_notifier;
struct bus_attribute * bus_attrs; /*总线属性*/
struct device_attribute * dev_attrs; /*设备属性,指向为每个加入总线的设备建立的默认属性链表*/
struct driver_attribute * drv_attrs; /*驱动程式属性*/
struct bus_attribute drivers_autoprobe_attr;/*驱动自动探测属性*/
struct bus_attribute drivers_probe_attr;/*驱动探测属性*/
int (*match)(struct device * dev, struct device_driver * drv);
int (*uevent)(struct device *dev, char **envp,
int num_envp, char *buffer, int buffer_size);
int (*probe)(struct device * dev);
int (*remove)(struct device * dev);
&nbs
相关文档:
Service Discovery Protocol(SDP)提供一种能力,让应用程序有方法发现哪种服务可用以及这种服务的特性。
服务发现协议(SDP或Bluetooth SDP)在蓝牙协议栈中对蓝牙环境中的应用程序有特殊的含意,发现哪个服务是可用的和确定这些可用服务的特征。SDP定义了bluetooth client发现可用bluetooth server服务和它们的特征的方法。 ......
跳出惯性思维解决Linux上不了网的问题
(来自http://hi.baidu.com/zfxwyh1985/blog/item/b3882a1285fa3cc8c3fd78c2.html)
2008-10-29 09:54
一台交换机, 一台Win2003的机器做为局域网的网关(其IP地址设为192.168.0.1),电信公司给我们一个上网帐号可以几台机器同时拨号。其它机器的IP 地址设成192. ......
from: http://www.pcstu.com/system/Linux/20090804/65873.html
本文介绍下linux at命令的另一个作用:linux下使用linux at命令定时关机。
首先创建一个文件,写入:
#!/bin/sh
shutdown -h now
保存为power文件.之后
chmod +x power之后就能使用linux at命令定时关机了.
但是需要有root权限才能关机,
所以需 ......
貌似用-t ntfs挂载上的盘子是只读文件系统,今天查了一下ntfs文件系统的读写问题:
CentOS 5默认是不支持NTFS,网上找了些,看ntfs-3g支持读和写,装来试下效果确实不错。
1. 安装之前要先装fuse,否则ntfs-3g不能使用。
下载:
复制内容到剪贴板
代码:
http://sourceforge.net/project/showfiles.php?group_id=121684 ......