Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
cloud-kernel
提交
cb432b35
cloud-kernel
项目概览
openanolis
/
cloud-kernel
大约 1 年 前同步成功
通知
158
Star
36
Fork
7
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
10
列表
看板
标记
里程碑
合并请求
2
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
cloud-kernel
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
10
Issue
10
列表
看板
标记
里程碑
合并请求
2
合并请求
2
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
cb432b35
编写于
1月 11, 2010
作者:
E
Eric Miao
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[ARM] pxa/corgi: cleanup GPIO configurations and low power mode settings
Signed-off-by:
N
Eric Miao
<
eric.y.miao@gmail.com
>
上级
e63f591a
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
32 addition
and
59 deletion
+32
-59
arch/arm/mach-pxa/corgi.c
arch/arm/mach-pxa/corgi.c
+32
-20
arch/arm/mach-pxa/corgi_pm.c
arch/arm/mach-pxa/corgi_pm.c
+0
-39
未找到文件。
arch/arm/mach-pxa/corgi.c
浏览文件 @
cb432b35
...
...
@@ -106,18 +106,18 @@ static unsigned long corgi_pin_config[] __initdata = {
GPIO8_MMC_CS0
,
/* GPIO Matrix Keypad */
GPIO66_GPIO
,
/* column 0 */
GPIO67_GPIO
,
/* column 1 */
GPIO68_GPIO
,
/* column 2 */
GPIO69_GPIO
,
/* column 3 */
GPIO70_GPIO
,
/* column 4 */
GPIO71_GPIO
,
/* column 5 */
GPIO72_GPIO
,
/* column 6 */
GPIO73_GPIO
,
/* column 7 */
GPIO74_GPIO
,
/* column 8 */
GPIO75_GPIO
,
/* column 9 */
GPIO76_GPIO
,
/* column 10 */
GPIO77_GPIO
,
/* column 11 */
GPIO66_GPIO
|
MFP_LPM_DRIVE_HIGH
,
/* column 0 */
GPIO67_GPIO
|
MFP_LPM_DRIVE_HIGH
,
/* column 1 */
GPIO68_GPIO
|
MFP_LPM_DRIVE_HIGH
,
/* column 2 */
GPIO69_GPIO
|
MFP_LPM_DRIVE_HIGH
,
/* column 3 */
GPIO70_GPIO
|
MFP_LPM_DRIVE_HIGH
,
/* column 4 */
GPIO71_GPIO
|
MFP_LPM_DRIVE_HIGH
,
/* column 5 */
GPIO72_GPIO
|
MFP_LPM_DRIVE_HIGH
,
/* column 6 */
GPIO73_GPIO
|
MFP_LPM_DRIVE_HIGH
,
/* column 7 */
GPIO74_GPIO
|
MFP_LPM_DRIVE_HIGH
,
/* column 8 */
GPIO75_GPIO
|
MFP_LPM_DRIVE_HIGH
,
/* column 9 */
GPIO76_GPIO
|
MFP_LPM_DRIVE_HIGH
,
/* column 10 */
GPIO77_GPIO
|
MFP_LPM_DRIVE_HIGH
,
/* column 11 */
GPIO58_GPIO
,
/* row 0 */
GPIO59_GPIO
,
/* row 1 */
GPIO60_GPIO
,
/* row 2 */
...
...
@@ -128,17 +128,20 @@ static unsigned long corgi_pin_config[] __initdata = {
GPIO65_GPIO
,
/* row 7 */
/* GPIO */
GPIO9_GPIO
,
/* CORGI_GPIO_nSD_DETECT */
GPIO7_GPIO
,
/* CORGI_GPIO_nSD_WP */
GPIO21_GPIO
,
/* CORGI_GPIO_ADC_TEMP */
GPIO22_GPIO
,
/* CORGI_GPIO_IR_ON */
GPIO33_GPIO
,
/* CORGI_GPIO_SD_PWR */
GPIO38_GPIO
,
/* CORGI_GPIO_CHRG_ON */
GPIO43_GPIO
,
/* CORGI_GPIO_CHRG_UKN */
GPIO44_GPIO
,
/* CORGI_GPIO_HSYNC */
GPIO9_GPIO
,
/* CORGI_GPIO_nSD_DETECT */
GPIO7_GPIO
,
/* CORGI_GPIO_nSD_WP */
GPIO11_GPIO
|
WAKEUP_ON_EDGE_BOTH
,
/* CORGI_GPIO_MAIN_BAT_{LOW,COVER} */
GPIO13_GPIO
|
MFP_LPM_KEEP_OUTPUT
,
/* CORGI_GPIO_LED_ORANGE */
GPIO21_GPIO
,
/* CORGI_GPIO_ADC_TEMP */
GPIO22_GPIO
,
/* CORGI_GPIO_IR_ON */
GPIO33_GPIO
,
/* CORGI_GPIO_SD_PWR */
GPIO38_GPIO
|
MFP_LPM_KEEP_OUTPUT
,
/* CORGI_GPIO_CHRG_ON */
GPIO43_GPIO
|
MFP_LPM_KEEP_OUTPUT
,
/* CORGI_GPIO_CHRG_UKN */
GPIO44_GPIO
,
/* CORGI_GPIO_HSYNC */
GPIO0_GPIO
|
WAKEUP_ON_EDGE_BOTH
,
/* CORGI_GPIO_KEY_INT */
GPIO1_GPIO
|
WAKEUP_ON_EDGE_RISE
,
/* CORGI_GPIO_AC_IN */
GPIO3_GPIO
|
WAKEUP_ON_EDGE_BOTH
,
/* CORGI_GPIO_WAKEUP */
};
/*
...
...
@@ -676,6 +679,15 @@ static void __init corgi_init(void)
pxa2xx_mfp_config
(
ARRAY_AND_SIZE
(
corgi_pin_config
));
/* allow wakeup from various GPIOs */
gpio_set_wake
(
CORGI_GPIO_KEY_INT
,
1
);
gpio_set_wake
(
CORGI_GPIO_WAKEUP
,
1
);
gpio_set_wake
(
CORGI_GPIO_AC_IN
,
1
);
gpio_set_wake
(
CORGI_GPIO_CHRG_FULL
,
1
);
if
(
!
machine_is_corgi
())
gpio_set_wake
(
CORGI_GPIO_MAIN_BAT_LOW
,
1
);
pxa_set_ffuart_info
(
NULL
);
pxa_set_btuart_info
(
NULL
);
pxa_set_stuart_info
(
NULL
);
...
...
arch/arm/mach-pxa/corgi_pm.c
浏览文件 @
cb432b35
...
...
@@ -77,45 +77,6 @@ static void corgi_discharge(int on)
static
void
corgi_presuspend
(
void
)
{
int
i
;
unsigned
long
wakeup_mask
;
/* charging , so CHARGE_ON bit is HIGH during OFF. */
if
(
READ_GPIO_BIT
(
CORGI_GPIO_CHRG_ON
))
PGSR1
|=
GPIO_bit
(
CORGI_GPIO_CHRG_ON
);
else
PGSR1
&=
~
GPIO_bit
(
CORGI_GPIO_CHRG_ON
);
if
(
READ_GPIO_BIT
(
CORGI_GPIO_LED_ORANGE
))
PGSR0
|=
GPIO_bit
(
CORGI_GPIO_LED_ORANGE
);
else
PGSR0
&=
~
GPIO_bit
(
CORGI_GPIO_LED_ORANGE
);
if
(
READ_GPIO_BIT
(
CORGI_GPIO_CHRG_UKN
))
PGSR1
|=
GPIO_bit
(
CORGI_GPIO_CHRG_UKN
);
else
PGSR1
&=
~
GPIO_bit
(
CORGI_GPIO_CHRG_UKN
);
/* Resume on keyboard power key */
PGSR2
=
(
PGSR2
&
~
CORGI_GPIO_ALL_STROBE_BIT
)
|
CORGI_GPIO_STROBE_BIT
(
0
);
wakeup_mask
=
GPIO_bit
(
CORGI_GPIO_KEY_INT
)
|
GPIO_bit
(
CORGI_GPIO_WAKEUP
)
|
GPIO_bit
(
CORGI_GPIO_AC_IN
)
|
GPIO_bit
(
CORGI_GPIO_CHRG_FULL
);
if
(
!
machine_is_corgi
())
wakeup_mask
|=
GPIO_bit
(
CORGI_GPIO_MAIN_BAT_LOW
);
PWER
=
wakeup_mask
|
PWER_RTC
;
PRER
=
wakeup_mask
;
PFER
=
wakeup_mask
;
for
(
i
=
0
;
i
<=
15
;
i
++
)
{
if
(
PRER
&
PFER
&
GPIO_bit
(
i
))
{
if
(
GPLR0
&
GPIO_bit
(
i
)
)
PRER
&=
~
GPIO_bit
(
i
);
else
PFER
&=
~
GPIO_bit
(
i
);
}
}
}
static
void
corgi_postsuspend
(
void
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录