]> 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)
commit3dbe64d2d71f56018745b460badca72766fb741f
tree9ea5270c9139d9dd1047738c5eda6d89ef311162
parenta3f97f5045c6bce975eaa9076a583969c7082b49
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