Linux greybus
背景
在研究高通平台驱动震动马达时,我需要为内核驱动实现以下功能:/sys/class/timed_output/vibrator/enable":sysfs文件系统注册接口、提供show、store方法。
根据前人提供的文档(Android 5),我在Android 10 的代码中 跟踪挖出一种叫做 greybus 的总线,替代了 timed_out_dev 。
觉得还挺有意思的,网上没有对应的中文文档,分享一下。
介绍
Greybus是Google Project Ara的一部分(该项目是9月份结束的模块化智能手机计划),作为一种框架,它允许“通用”摄像机、音频设备和其他类设备,以及一个桥接的“物理”层协议,可以与串行、spi、uart、pwm、gpio、i2c甚至USB主机控制器进行通信。
附录: greybus 子系统的 提交请求
[GIT PULL] Greybus driver subsystem for 4.9-rc1
From: Greg KH
Date: Wed Sep 14 2016 - 06:09:58 EST
- Next message: [ Peter Ujfalusi: "PATCH] mmc: omap: Initialize dma_slave_config to avoid random data in it's fields"
- Previous message: [ Johannes Thumshirn: "PATCH 0/2] MCB patches for v4.9"
- Next in thread: [ Mark Rutland: "Re: GIT PULL] Greybus driver subsystem for 4.9-rc1"
- Messages sorted by: [date ] [thread ] [subject ] [author ]
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的更多相关文章
- Linux 驱动开发
linux驱动开发总结(一) 基础性总结 1, linux驱动一般分为3大类: * 字符设备 * 块设备 * 网络设备 2, 开发环境构建: * 交叉工具链构建 * NFS和tftp服务器安装 3, ...
- Linux 内核概述 - Linux Kernel
Linux 内核学习笔记整理. Unix unix 已有40历史,但计算机科学家仍认为其是现存操作系统中最大和最优秀的系统,它已成为一种传奇的存在,历经时间的考验却依然声名不坠. 1973 年,在用 ...
- 死磕内存篇 --- JAVA进程和linux内存间的大小关系
运行个JAVA 用sleep去hold住 package org.hjb.test; public class TestOnly { public static void main(String[] ...
- NodeJs在Linux下使用的各种问题
环境:ubuntu16.04 ubuntu中安装NodeJs 通过apt-get命令安装后发现只能使用nodejs,而没有node命令 如果想避免这种情况请看下面连接的这种安装方式: 拓展见:Linu ...
- [linux]阿里云主机的免登陆安全SSH配置与思考
公司服务器使用的第三方云端服务,即阿里云,而本地需要经常去登录到服务器做相应的配置工作,鉴于此,每次登录都要使用密码是比较烦躁的,本着极速思想,我们需要配置我们的免登陆. 一 理论概述 SSH介绍 S ...
- 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. ...
- 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 服务器安装操 ...
- SQL Server on Linux 理由浅析
SQL Server on Linux 理由浅析 今天的爆炸性新闻<SQL Server on Linux>基本上在各大科技媒体上刷屏了 大家看到这个新闻都觉得非常震精,而美股,今天微软开 ...
- Microsoft Loves Linux
微软新任CEO纳德拉提出的“Microsoft Loves Linux”,并且微软宣布.NET框架的开源,近期Microsoft不但宣布了Linux平台的SQL Server,还宣布了Microsof ...
- Linux 江湖系列阶段性总结
引言 我使用 Linux 已经有很多年了,最开始接触 Linux 的时候是从 RedHat 9(没有 Enterprise),中途换过 N 个不同的发行版.多年前,我在 BlogJava 上面分享 J ...
随机推荐
- 自制一个发送验证码的10秒倒计时js效果
<template> <div class="conten1"> <input class="code" ...
- vue-cli快速搭建项目的几个文件(二)
=======ggcss样式======== :root{ --bgColor : #d3252a; --pinkColor : #ff4e81; --textColor : ...
- 【爬虫数据集】李子柒YouTube频道TOP10热门视频的TOP2000热门评论,共计2W条
目录 一.背景 二.爬取目标 三.结果展示 四.演示视频 五.附完整数据 一.背景 这段时间,有超多小伙伴找我要YouTube数据,做数据分析.情感分析之类的研究工作,但很多人并不是计算机软件相关专业 ...
- 机器学习策略篇:详解开发集和测试集的大小(Size of dev and test sets)
在深度学习时代,设立开发集和测试集的方针也在变化. 可能听说过一条经验法则,在机器学习中,把取得的全部数据用70/30比例分成训练集和测试集.或者如果必须设立训练集.开发集和测试集,会这么分60%训练 ...
- WEB服务与NGINX(6)-location使用详解
目录 1. location的详细用法 1.1 精确匹配 1.2 区分大小写 1.3 不区分大小写 1.4 匹配URI开始 1.5 测试location的优先级 1.6 location的生产使用示例 ...
- fastposter发布1.5.0 跨语言的海报生成器
fastposter发布1.5.0 跨语言的海报生成器 v1.5.0 增加右键复制.粘贴操作 fastposter低代码海报生成器,一分钟完成海报开发.支持Java,Python,PHP,Go,Jav ...
- EAV模型(实体-属性-值)的设计和低代码的处理方案(1)
一般我们在开发的时候,习惯上使用常规的关系型数据库来设计数据库表,对于一些业务表的字段比较固定的场景,是一种非常不错的选择,而且查询的时候,由于是基于固定的表字段进行查询,性能基本上是最优的.不过有一 ...
- .NET 中的表达式树
.NET 中的表达式树(Expression Trees) 表达式树是什么? 表达式树(Expression Trees)是.NET框架中的一个强大功能,它将代码表示为一个由表达式节点组成的树形结构. ...
- Go post重定向的两种方式
1.Location 2.http.Redirect 代码 /index -> /login -> /home package main import ( "fmt" ...
- Vue cli使用Element UI
当前的测试环境如下: ---- 新版的@vue/cli ---- Vue2.x版本 第一步:安装Element UI npm i element-ui -S 第二步:引入Element UI 在mai ...