背景

在研究高通平台驱动震动马达时,我需要为内核驱动实现以下功能:/sys/class/timed_output/vibrator/enable":sysfs文件系统注册接口、提供showstore方法。

根据前人提供的文档(Android 5),我在Android 10 的代码中 跟踪挖出一种叫做 greybus 的总线,替代了 timed_out_dev 。

觉得还挺有意思的,网上没有对应的中文文档,分享一下。

介绍

Greybus是Google Project Ara的一部分(该项目是9月份结束的模块化智能手机计划),作为一种框架,它允许“通用”摄像机、音频设备和其他类设备,以及一个桥接的“物理”层协议,可以与串行、spi、uart、pwm、gpio、i2c甚至USB主机控制器进行通信。

附录: greybus 子系统的 提交请求

https://lkml.org/lkml/2016/9/14/250

[GIT PULL] Greybus driver subsystem for 4.9-rc1

From: Greg KH

Date: Wed Sep 14 2016 - 06:09:58 EST

Hi all,

As many of you know, I, and lots of other developers, have been working
on a new application level protocol for the Unipro hardware transport
called "Greybus". It has shown up in numerous demos from Google for the
Ara Phone platform, and an older version of the codebase is currently
shipping in a phone from Motorola any-day-now. There is a
semi-up-to-date version of the protocol specification available at:
https://github.com/projectara/greybus-spec
A newer version should be available soon, matching the code
implementation here, as soon as I work through a few final details with
some lawyers on the wording of the license. Many other software packages to help out with greybus devices are on
that github project page (manfest generator, emulator, firmware
examples, etc.), if people are interested. Given that it's never a good idea to keep subsystems out of the mainline
kernel, I've put together this pull request that adds the greybus driver
layer to drivers/greybus/. Because this was 2 1/2 years of work, with
many many developers contributing, I didn't want to flatten all of their
effort into a few small patches, as that wouldn't be very fair. So I've
built a git tree with all of the changes going back to the first commit,
and merged it into the kernel tree, just like btrfs was merged into the
kernel. The protocol design, and implementation, was a group effort, and it would
not have turned out well at all without the contributions of all of
these talented developers. I'll send out a follow-up set of "simple" patches that just add the
files to the kernel tree, to give people an idea of the code involved.
Overall, it's a tiny stand-alone driver subsystem, only 37k lines, that
implements a protocol which allows for "generic" cameras, audio devices,
and other class type devices, as well as a bridged "physical" layer
protocol to talk to serial, spi, uart, pwm, gpio, i2c, and even USB host
controllers. Included here is a USB bridge host controller driver that
interacts with a USB device that converts USB data to Unipro data,
allowing any system to talk to a Unipro platform (no special SoC
interface required.) Unless people point out some major problems with this, I'd like to get
it merged into 4.9-rc1. The shortlog and diffstat can be seen below. If anyone has any questions about this, please let us know. thanks, greg k-h
----------------------------------------------------------------------
大家好,
如你们所知,我和其他许多开发人员一直在为Unipro硬件传输开发一种新的应用层协议,称为“Greybus”。
它已经出现在谷歌为Ara手机平台做的大量演示中,而且现在摩托罗拉的一款手机现在随时都会提供旧版本的codebase。
协议规范的半更新版本可从以下网址获得:https://github.com/projectara/greybus-spec
一个更新的版本应该很快就会推出,与这里的代码实现相匹配,只要我和一些律师就许可证的措辞完成一些最后的细节。 如果人们感兴趣的话,可以在github项目页面(manfestgenerator、模拟器、固件示例等)上找到许多其他帮助greybus设备的软件包。
考虑到将子系统排除在主线内核之外并不是一个好主意,我将这个pull请求组合到drivers/greybus/中,它将greybus驱动程序层添加到drivers/greybus/。
因为这是2年半的工作,许多开发人员都在做贡献,所以我不想把他们所有的精力都放在几个小补丁上,因为这样做不太公平。
因此,我构建了一个git树,其中所有的更改都可以追溯到第一次提交,并将其合并到内核树中,就像btrfs被合并到内核中一样。 协议的设计和实现是一个团队的工作,如果没有这些有才华的开发人员的贡献,它就不会有好的结果。
我将发送一组后续的“简单”补丁,它们只是将文件添加到内核树中,让人们了解其中涉及的代码。 总的来说,它是一个很小的独立驱动子系统,只有37k行,它实现了一个协议,允许“通用”摄像机、音频设备和其他类设备,以及一个桥接的“物理”层协议,可以与串行、spi、uart、pwm、gpio、i2c甚至USB主机控制器进行通信。 这里包括一个USB桥接主机控制器驱动程序,它与一个USB设备交互,该设备将USB数据转换成Unipro数据,允许任何系统与Unipro平台通信(不需要特殊的SoC接口) 除非人们指出一些主要的问题,否则我想把它合并到4.9-rc1中。 下面可以看到shortlog和diffstat。
如果有人对此有任何疑问,请告诉我们。
谢谢 greg k-h

Linux greybus的更多相关文章

  1. Linux 驱动开发

    linux驱动开发总结(一) 基础性总结 1, linux驱动一般分为3大类: * 字符设备 * 块设备 * 网络设备 2, 开发环境构建: * 交叉工具链构建 * NFS和tftp服务器安装 3, ...

  2. Linux 内核概述 - Linux Kernel

    Linux 内核学习笔记整理. Unix unix 已有40历史,但计算机科学家仍认为其是现存操作系统中最大和最优秀的系统,它已成为一种传奇的存在,历经时间的考验却依然声名不坠. 1973 年,在用 ...

  3. 死磕内存篇 --- JAVA进程和linux内存间的大小关系

    运行个JAVA 用sleep去hold住 package org.hjb.test; public class TestOnly { public static void main(String[] ...

  4. NodeJs在Linux下使用的各种问题

    环境:ubuntu16.04 ubuntu中安装NodeJs 通过apt-get命令安装后发现只能使用nodejs,而没有node命令 如果想避免这种情况请看下面连接的这种安装方式: 拓展见:Linu ...

  5. [linux]阿里云主机的免登陆安全SSH配置与思考

    公司服务器使用的第三方云端服务,即阿里云,而本地需要经常去登录到服务器做相应的配置工作,鉴于此,每次登录都要使用密码是比较烦躁的,本着极速思想,我们需要配置我们的免登陆. 一 理论概述 SSH介绍 S ...

  6. Linux平台 Oracle 10gR2(10.2.0.5)RAC安装 Part3:db安装和升级

    Linux平台 Oracle 10gR2(10.2.0.5)RAC安装 Part3:db安装和升级 环境:OEL 5.7 + Oracle 10.2.0.5 RAC 5.安装Database软件 5. ...

  7. Linux平台 Oracle 10gR2(10.2.0.5)RAC安装 Part1:准备工作

    Linux平台 Oracle 10gR2(10.2.0.5)RAC安装 Part1:准备工作 环境:OEL 5.7 + Oracle 10.2.0.5 RAC 1.实施前准备工作 1.1 服务器安装操 ...

  8. SQL Server on Linux 理由浅析

    SQL Server on Linux 理由浅析 今天的爆炸性新闻<SQL Server on Linux>基本上在各大科技媒体上刷屏了 大家看到这个新闻都觉得非常震精,而美股,今天微软开 ...

  9. Microsoft Loves Linux

    微软新任CEO纳德拉提出的“Microsoft Loves Linux”,并且微软宣布.NET框架的开源,近期Microsoft不但宣布了Linux平台的SQL Server,还宣布了Microsof ...

  10. Linux 江湖系列阶段性总结

    引言 我使用 Linux 已经有很多年了,最开始接触 Linux 的时候是从 RedHat 9(没有 Enterprise),中途换过 N 个不同的发行版.多年前,我在 BlogJava 上面分享 J ...

随机推荐

  1. NOIP2023游寄

    Day -?? 模拟赛挂分. Day -18 模拟赛挂大分,挂分大于得分.(180/400,得分/标准分,下同) 连着挂了好多场了,感觉有点迷茫了. Day -17 模拟赛--AK了?(400/400 ...

  2. Git/SourceTree版本管理

    目录 视频课程: 工作区: 文件状态: 回退版本: 合并分支 合并提交 冲突 删除分支 忽略文件 汉英对照表 多端同步 添加远程仓库 推送代码到远程仓库 拉取代码 视频课程: https://www. ...

  3. golang计时器

    timer 计时器 用于在指定的Duration类型时间后调用函数或计算表达式. 如果只是想指定时间之后执行,使用time.Sleep() 使用NewTimer(),可以返回的Timer类型在计时器到 ...

  4. LVS负载均衡(1)-- LVS概述及LVS网络模型

    目录 1. 负载均衡集群概述 2. LVS理论基础 2.1 LVS常用术语 2.2 LVS数据调度原理 2.3 LVS工作模型 2.3.1 NAT模型 2.3.2 DR模型 2.3.3 TUNNEL模 ...

  5. 【OpenVINO™】在 C# 中使用OpenVINO™ 部署PP-YOLOE实现物体检测

     前言 OpenVINO C# API 是一个 OpenVINO 的 .Net wrapper,应用最新的 OpenVINO 库开发,通过 OpenVINO C API 实现 .Net 对 OpenV ...

  6. 2024-05-18:用go语言,给定一个从 0 开始的字符串 s,以及两个子字符串 a 和 b,还有一个整数 k。 定义一个“美丽下标”,当满足以下条件时: 1.找到字符串 a 在字符串 s 中的位

    2024-05-18:用go语言,给定一个从 0 开始的字符串 s,以及两个子字符串 a 和 b,还有一个整数 k. 定义一个"美丽下标",当满足以下条件时: 1.找到字符串 a ...

  7. 添加身份认证和鉴权方案-使用jwtbearer

    HTTP身份认证框架 RFC 7235 定义了一个 HTTP 身份验证框架,服务器可以用来质询(challenge)客户端的请求,客户端则可以提供身份验证凭据. 服务端开启了身份认证后.如果客户端访问 ...

  8. 彻底搞懂JavaScript原型和原型链

    基于原型编程 在面向对象的编程语言中,类和对象的关系是铸模和铸件的关系,对象总是从类创建而来,比如Java中,必须先创建类再基于类实例化对象. 而在基于原型编程的思想中,类并不是必须的,对象都是通过克 ...

  9. es 排序突然很慢的原因

    今天突然之间发现一个访问es的查询很慢.由刚上线之前测试的100ms直接到了5s左右.瞬间懵逼. 这个用户索引大概200w的数据. 查询语句如下 GET /user/_search{"fro ...

  10. MyBatis完成CRUD 详细细节内容

    1. MyBatis完成CRUD 详细细节内容 @ 目录 1. MyBatis完成CRUD 详细细节内容 每博一文案 2. MyBatis工具类SqlSessionUtil的封装 3. 准备工作 3. ...