]> git.baikalelectronics.ru Git - kernel.git/commit
ARM: OMAP1: ams-delta: assign LED GPIO numbers from descriptors
authorJanusz Krzysztofik <jmkrzyszt@gmail.com>
Sun, 27 May 2018 13:55:48 +0000 (15:55 +0200)
committerTony Lindgren <tony@atomide.com>
Mon, 2 Jul 2018 12:27:21 +0000 (05:27 -0700)
commit025235e75f8bc1fbf4989537a47537c6c04e8e09
tree8f5a8e745982e63bbfc2f775cb94b6dfdda02176
parent766953ac1b6c1d3ecfad7c259b4d47bdd1447fa3
ARM: OMAP1: ams-delta: assign LED GPIO numbers from descriptors

Assign a label to latch1 GPIO device the LEDs hang off, enumerate its
pins for the purpose of indexing gpio_led table, remove hardcoded GPIO
numbers from that table replacing them with invalid GPIO numbers and
remove initialization of incompletely described LED device from
machine_init.

As soon as the latch1 GPIO device is registered, use its label to find
respective GPIO chip, identify each LED's GPIO descriptor by its pin
number and assign its gobal GPIO number to the gpio_led table.  Once
completed, register the LED device.

Created and tested against linux-v4.17-rc3.

Signed-off-by: Janusz Krzysztofik <jmkrzyszt@gmail.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
arch/arm/mach-omap1/board-ams-delta.c