I.MX6 Power off register hacking
/***********************************************************************
* I.MX6 Power off register hacking
* 声明:
* 本文主要记录I.MX6DL中的Power off按键的注册过程。
*
* 2016-1-28 深圳 南山平山村 曾剑锋
**********************************************************************/ 一、cat arch/arm/mach-mx6/board-mx6dl_sabresd.h
......
static iomux_v3_cfg_t mx6dl_sabresd_pads[] = {
......
MX6DL_PAD_GPIO_17__GPIO_7_12, /* power off */
......
}
...... 二、cat arch/arm/mach-mx6/board-mx6q_sabresd.c
......
#define SABRESD_POWER_OFF IMX_GPIO_NR(7, 12)
......
static struct gpio_keys_button new_sabresd_buttons[] = {
GPIO_BUTTON(SABRESD_VOLUME_UP, KEY_VOLUMEUP, , "volume-up", , ),
GPIO_BUTTON(SABRESD_VOLUME_DN, KEY_VOLUMEDOWN, , "volume-down", , ),
GPIO_BUTTON(SABRESD_POWER_OFF, KEY_POWER, , "power-key", , ),
}; static struct gpio_keys_platform_data new_sabresd_button_data = {
.buttons = new_sabresd_buttons,
.nbuttons = ARRAY_SIZE(new_sabresd_buttons),
}; static struct platform_device sabresd_button_device = {
.name = "gpio-keys",
.id = -,
.num_resources = ,
}; static void __init imx6q_add_device_buttons(void)
{
/* fix me */
/* For new sabresd(RevB4 ane above) change the
* ONOFF key(SW1) design, the SW1 now connect
* to GPIO_3_29, it can be use as a general power
* key that Android reuired. But those old sabresd
* such as RevB or older could not support this
* change, so it needs a way to distinguish different
* boards. Before board id/rev are defined cleary,
* there is a simple way to achive this, that is using
* SOC revison to identify differnt board revison.
*
* With the new sabresd change and SW mapping the
* SW1 as power key, below function related to power
* key are OK on new sabresd board(B4 or above).
* 1 Act as power button to power on the device when device is power off
* 2 Act as power button to power on the device(need keep press SW1 >5s)
* 3 Act as power key to let device suspend/resume
* 4 Act screenshort(hold power key and volume down key for 2s)
*/
platform_device_add_data(&sabresd_button_device,
&new_sabresd_button_data,
sizeof(new_sabresd_button_data)); platform_device_register(&sabresd_button_device);
}
......
I.MX6 Power off register hacking的更多相关文章
- I.MX6 Ar8031 device register hacking
/***************************************************************************** * I.MX6 Ar8031 device ...
- Linux power supply class hacking
/*************************************************************************** * Linux power supply cl ...
- I.MX6 android BatteryService jni hacking
/**************************************************************************** * I.MX6 android Batter ...
- I.MX6 PWM buzzer driver hacking with Demo test
/***************************************************************************** * I.MX6 PWM buzzer dr ...
- I.MX6 U-boot lvds display hacking
/*********************************************************************************** * I.MX6 U-boot ...
- OK335xS GPMC nand device register hacking
/********************************************************************************* * OK335xS GPMC na ...
- OK335xS pwm device register hacking
/************************************************************************* * OK335xS pwm device regi ...
- IOC Unity
1. 依赖倒置原则和IOC2. IOC(Inversion of Control)的好处3. 介绍和使用Unity依赖倒置原则(DIP):上层和下层之间,依赖抽象,而不依赖细节IOC 控制反转,把上端 ...
- PSAM读卡芯片TDA8007BHL开发
WWT:Work Waiting Time ATR:Answer To Reset,复位应答 etu =F/Df 1. PSAM概述和应用 PSAM(PurchaseSecure Access ...
随机推荐
- UVA 11149 Power of Matrix 快速幂
题目链接: http://acm.hust.edu.cn/vjudge/contest/122094#problem/G Power of Matrix Time Limit:3000MSMemory ...
- 解决Tomcat 7遇到StackOverflowError的异常
参考网址:http://qingyuexiao.iteye.com/blog/1886059 前言:在写此博客前,首先感谢姚双琪.林瑞丰.网友qingyuexiao的倾囊相助!此博文不过是笔者对于他们 ...
- 【转】成为it精英,我奋斗7年
转载地址:http://liangwang985.blog.163.com/blog/static/119549233201191394259491/ 这些日子 我一直在写一个实时操作系统内核,已有小 ...
- STL中的单向队列queue
转载自:http://blog.csdn.net/morewindows/article/details/6950917 stl中的queue指单向队列,使用时,包含头文件<queue>. ...
- cf 363A B C
A水题 ~~ 注意0输出 /************************************************************************* > Author ...
- VMware Workstation 10安装Centos6.4操作步骤说明
1.在网上下载VMware Workstation 10, 百度软件中心助手安装程序高速下载,下载完成后默认是自动启动安装的,而原来的安装程序文件保存在: C:\Users\用户名\Document ...
- Relearning PHP (2) – php 的浮点数float
Relearning PHP (2) – php 的浮点数float 暂无评论 php有很多坑,但是并不妨碍他是最好的语言.其他语言对于浮点数处理同样有问题,这应该是个“共有坑”.不信可以用googl ...
- poj 3358 Period of an Infinite Binary Expansion
由乘2取整得到分数的小数位,可以找到规律!!! 例如:1/10,2/10,4/10,8/10,16/10,32/10,64/10…… 取整后:1/10,2/10,4/10,8/10,6/10,2/10 ...
- PSYoungGen /PSOldGen/PSPermGen区别
原文地址:http://bbs.csdn.net/topics/210064791 谁能解译一下PSYoungGen /PSOldGen/PSPermGen区别及出现的问题? 看来没有收集到答案,查看 ...
- QAQ高精度模板笔记√
#include <cmath> #include <cstdio> #include <cstring> #include <iostream> #i ...