linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ARM: pxa: hx4700: Enable ASIC3 GPIO as a wakeup source
@ 2012-04-11  0:44 Paul Parsons
  2012-04-16 20:16 ` Philipp Zabel
  0 siblings, 1 reply; 3+ messages in thread
From: Paul Parsons @ 2012-04-11  0:44 UTC (permalink / raw)
  To: linux-arm-kernel

This patch enables the ASIC3 GPIO (12) as a wakeup source:
1. Set the WAKEUP_ON_EDGE_RISE MFP config bits for GPIO12 in
hx4700_pin_config[].
2. Call gpio_set_wake() for GPIO12.

With GPIO12 thus enabled, the mfd/asic3 driver can enable its own GPIOs
as wakeup sources by implementing a irq_set_wake() handler.

Signed-off-by: Paul Parsons <lost.distance@yahoo.com>
Cc: Philipp Zabel <philipp.zabel@gmail.com>
---
 arch/arm/mach-pxa/hx4700.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/arch/arm/mach-pxa/hx4700.c b/arch/arm/mach-pxa/hx4700.c
index de01277..00a00a9 100644
--- a/arch/arm/mach-pxa/hx4700.c
+++ b/arch/arm/mach-pxa/hx4700.c
@@ -129,7 +129,7 @@ static unsigned long hx4700_pin_config[] __initdata = {
 	GPIO88_GPIO,
 
 	/* HX4700 specific input GPIOs */
-	GPIO12_GPIO,	/* ASIC3_IRQ */
+	GPIO12_GPIO | WAKEUP_ON_EDGE_RISE,	/* ASIC3_IRQ */
 	GPIO13_GPIO,	/* W3220_IRQ */
 	GPIO14_GPIO,	/* nWLAN_IRQ */
 
@@ -863,6 +863,7 @@ static void __init hx4700_init(void)
 	int ret;
 
 	pxa2xx_mfp_config(ARRAY_AND_SIZE(hx4700_pin_config));
+	gpio_set_wake(GPIO12_HX4700_ASIC3_IRQ, 1);
 	ret = gpio_request_array(ARRAY_AND_SIZE(global_gpios));
 	if (ret)
 		pr_err ("hx4700: Failed to request GPIOs.\n");
-- 
1.7.3.4

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [PATCH] ARM: pxa: hx4700: Enable ASIC3 GPIO as a wakeup source
  2012-04-11  0:44 [PATCH] ARM: pxa: hx4700: Enable ASIC3 GPIO as a wakeup source Paul Parsons
@ 2012-04-16 20:16 ` Philipp Zabel
  2012-04-27  4:20   ` Haojian Zhuang
  0 siblings, 1 reply; 3+ messages in thread
From: Philipp Zabel @ 2012-04-16 20:16 UTC (permalink / raw)
  To: linux-arm-kernel

Am Mittwoch, den 11.04.2012, 01:44 +0100 schrieb Paul Parsons:
> This patch enables the ASIC3 GPIO (12) as a wakeup source:
> 1. Set the WAKEUP_ON_EDGE_RISE MFP config bits for GPIO12 in
> hx4700_pin_config[].
> 2. Call gpio_set_wake() for GPIO12.

Acked-by: Philipp Zabel <philipp.zabel@gmail.com>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH] ARM: pxa: hx4700: Enable ASIC3 GPIO as a wakeup source
  2012-04-16 20:16 ` Philipp Zabel
@ 2012-04-27  4:20   ` Haojian Zhuang
  0 siblings, 0 replies; 3+ messages in thread
From: Haojian Zhuang @ 2012-04-27  4:20 UTC (permalink / raw)
  To: linux-arm-kernel

On Tue, Apr 17, 2012 at 4:16 AM, Philipp Zabel <philipp.zabel@gmail.com> wrote:
> Am Mittwoch, den 11.04.2012, 01:44 +0100 schrieb Paul Parsons:
>> This patch enables the ASIC3 GPIO (12) as a wakeup source:
>> 1. Set the WAKEUP_ON_EDGE_RISE MFP config bits for GPIO12 in
>> hx4700_pin_config[].
>> 2. Call gpio_set_wake() for GPIO12.
>
> Acked-by: Philipp Zabel <philipp.zabel@gmail.com>
>
>

This patch enables the ASIC3 GPIO (12) as a wakeup source:=0A1. Set the WAK=
EUP_ON_EDGE_RISE MFP config bits for GPIO12 in=0Ahx4700_pin_config[].=0A2. =
Call gpio_set_wake() for GPIO12.=0A=0AWith GPIO12 thus enabled, the mfd/asi=
c3 driver can enable its own GPIOs=0Aas wakeup sources by implementing a ir=
q_set_wake() handler.=0A=0ASigned-off-by: Paul Parsons <lost.distance@yahoo=
.com>=0ACc: Philipp Zabel <philipp.zabel@gmail.com>=0A---=0A arch/arm/mach-=
pxa/hx4700.c |    3 ++-=0A 1 files changed, 2 insertions(+), 1 deletions(-)=
=0A=0Adiff --git a/arch/arm/mach-pxa/hx4700.c b/arch/arm/mach-pxa/hx4700.c=
=0Aindex de01277..00a00a9 100644=0A--- a/arch/arm/mach-pxa/hx4700.c=0A+++ b=
/arch/arm/mach-pxa/hx4700.c=0A@@ -129,7 +129,7 @@ static unsigned long hx47=
00_pin_config[] __initdata =3D {=0A =09GPIO88_GPIO,=0A =0A =09/* HX4700 spe=
cific input GPIOs */=0A-=09GPIO12_GPIO,=09/* ASIC3_IRQ */=0A+=09GPIO12_GPIO=
 | WAKEUP_ON_EDGE_RISE,=09/* ASIC3_IRQ */=0A =09GPIO13_GPIO,=09/* W3220_IRQ=
 */=0A =09GPIO14_GPIO,=09/* nWLAN_IRQ */=0A =0A@@ -863,6 +863,7 @@ static v=
oid __init hx4700_init(void)=0A =09int ret;=0A =0A =09pxa2xx_mfp_config(ARR=
AY_AND_SIZE(hx4700_pin_config));=0A+=09gpio_set_wake(GPIO12_HX4700_ASIC3_IR=
Q, 1);=0A =09ret =3D gpio_request_array(ARRAY_AND_SIZE(global_gpios));=0A =
=09if (ret)=0A =09=09pr_err ("hx4700: Failed to request GPIOs.\n");=0A-- =
=0A1.7.3.4=0A

Need to re-format this patch.

Regards
Haojian

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2012-04-27  4:20 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-04-11  0:44 [PATCH] ARM: pxa: hx4700: Enable ASIC3 GPIO as a wakeup source Paul Parsons
2012-04-16 20:16 ` Philipp Zabel
2012-04-27  4:20   ` Haojian Zhuang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).