Skip to content

完善设备驱动模型,基于kset、kobj来维护对象之间的关系 #401

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 8 commits into from
Oct 10, 2023

Conversation

fslongjin
Copy link
Member

根据Linux 6.1.9完善设备驱动模型。

  • 将sysfs与真正的文件系统操作解耦合
  • 使用kset、kobj来维护对象之间的关系
  • 完善了bus的抽象

目前实现了platform总线的注册,以及对其属性进行操作。
关于设备注册:
由于还需要较大的工作量,这部分打算在下一个pr里面:抽象出tty层(负责把tty跟具体设备对接),以及完善字符设备框架,并注册uart设备到platform总线上。

Copy link
Collaborator

@YJwu2023 YJwu2023 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

没什么问题

return self.name();
}

fn dev_groups(&self) -> &'static [&'static dyn AttributeGroup] {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这里两个'static都是必要的吗?看起来有点离谱。是不是外面那个可以去掉

@fslongjin
Copy link
Member Author

fslongjin commented Oct 10, 2023 via email

@fslongjin fslongjin merged commit 06d5e24 into DragonOS-Community:master Oct 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants