]> git.baikalelectronics.ru Git - kernel.git/commit
ARM: PXA2xx: MFP: fix potential direction bug
authorIgor Grinberg <grinberg@compulab.co.il>
Thu, 12 Apr 2012 12:43:29 +0000 (15:43 +0300)
committerHaojian Zhuang <haojian.zhuang@gmail.com>
Fri, 27 Apr 2012 03:14:06 +0000 (11:14 +0800)
commit2acb762d4754d864a5c0bac825103b8b6dd42d6d
tree9ea5270c9139d9dd1047738c5eda6d89ef311162
parentd70fe5de9c7a8739b8fa535e0c552dc6a2204b75
ARM: PXA2xx: MFP: fix potential direction bug

Pins configured as input and have MFP_LPM_DRIVE_* flag set, can have a
wrong output value for some period of time (spike) during the suspend
sequence.
This can happen because the direction of the pins (GPDR) is set by
software and the output level is set by hardware (PGSR) at a later
stage.

Fix the above potential bug by setting the output levels first.
Also save the actual levels of the pins before the suspend and restore
them after the resume, but before the direction settings take place, so
the same bug as described above will not happen in the resume sequence.

Reported-by: Paul Parsons <lost.distance@yahoo.com>
Signed-off-by: Igor Grinberg <grinberg@compulab.co.il>
Tested-by: Paul Parsons <lost.distance@yahoo.com>
Signed-off-by: Haojian Zhuang <haojian.zhuang@gmail.com>
arch/arm/mach-pxa/mfp-pxa2xx.c