linux/arch/arm/mach-omap1/include/mach
Janusz Krzysztofik 1464d031c4 ARM: OMAP1: ams-delta: initialize latch2 pins to safe values
Latch2 pins control a number of on-board devices, namely LCD, NAND,
MODEM and CODEC.  Those pins used to be initialized with safe values
from init_machine before that operation was:
1) moved to late_initcall in preparation for conversion of latch2 to
GPIO device - see commit f7519d8c82 ("ARM: OMAP1: ams-delta: register
latch dependent devices later"),
2) replaced with non-atomic initialization performed by means of
gpio_request_array() - see commit 937eb4bb00 ("ARM: OMAP1: ams-delta:
convert latches to basic_mmio_gpio"),
3) made completely asynchronous by delegation of GPIO request
operations performed on subsets of pins to respective device drivers in
subsequent commits.

One visible negative result of that disintegration was corrupt keyboard
data reported by serio driver, recently fixed by commit 41f8fee385
("ARM: OMAP1: ams-delta: Hog "keybrd_dataout" GPIO pin").

Moreover, initialization of LATCH2_PIN_MODEM_CODEC still performed with
ams_delta_latch2_write() wrapper from late_init() is now done on not
requested GPIO pin.

Reintroduce atomic initialization of latch2 pins at machine_init to
prevent from random values potentially corrupting NAND data or maybe
even destroing other hardware.  Also take care of MODEM/CODEC related
pins so MODEM device probe succeeds even if latch2 GPIO device or
dependent regulator is not ready and CODEC can be reached over the
MODEM even if audio driver doesn't take control over
LATCH2_PIN_MODEM_CODEC.

Once done, remove the no longer needed GPIO based implementation of
ams_delta_latch_write() and its frontend macro.

Signed-off-by: Janusz Krzysztofik <jmkrzyszt@gmail.com>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
[tony@atomide.com: updated for the header location to remove dependency]
Signed-off-by: Tony Lindgren <tony@atomide.com>
2018-09-20 14:13:43 -07:00
..
board-ams-delta.h ARM: OMAP1: ams-delta: initialize latch2 pins to safe values 2018-09-20 14:13:43 -07:00
hardware.h ARM: OMAP1: Remove relative includes 2012-10-31 15:37:14 -07:00
io.h ARM: fix __io macro for PCMCIA 2012-04-05 11:29:55 -07:00
irqs.h ARM: OMAP1: Change interrupt numbering for sparse IRQ 2015-05-20 09:01:21 -07:00
lcd_dma.h omap1: DMA: move LCD related code from plat-omap to mach-omap1 2009-12-11 16:16:33 -08:00
lcdc.h omap1: LCD_DMA: Use some define rather than a hexadecimal 2009-12-11 16:16:36 -08:00
memory.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
mtd-xip.h ARM: OMAP1: Fix typo in mtd-xip.h 2016-06-10 04:13:55 -07:00
mux.h ARM: OMAP1: Make plat/mux.h omap1 only 2012-09-20 14:54:57 -07:00
omap7xx.h ARM: OMAP1: Move SoC specific headers from plat to mach for omap1 2012-09-12 18:06:31 -07:00
omap16xx.h ARM: OMAP1: Move SoC specific headers from plat to mach for omap1 2012-09-12 18:06:31 -07:00
omap1510.h ARM: OMAP: Make plat/fpga.h local to arch/arm/plat-omap 2012-10-17 11:36:37 -07:00
serial.h ARM: OMAP1: Move UART defines to prepare for sparse IRQ 2015-05-20 09:01:20 -07:00
soc.h ARM: OMAP1: Change interrupt numbering for sparse IRQ 2015-05-20 09:01:21 -07:00
tc.h ARM: OMAP1: Move plat/tc.h to mach/tc.h for omap1 2012-10-17 11:36:40 -07:00
uncompress.h ARM: 8532/1: uncompress: mark putc as inline 2016-02-22 16:55:42 +00:00
usb.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00