ARM: imx: Use GPIO descriptors for gpio_keys

This switches all relevant i.MX boards still using boardfiles to
using GPIO descriptors to look up the GPIO lines for gpio_keys.

Most conversions were straight-forward, I dropped comments on how
the offsets are looked up where appropriate.

The VPR200 board was seemingly incorrect. It assigned the members
of struct gpio_keys_button with the direct, non-C99 syntax
like so:

  #define VPR_KEY_DEBOUNCE       500
  static struct gpio_keys_button vpr200_gpio_keys_table[] = {
    {KEY_F2, GPIO_BUTTON1, 1, "vpr-keys: F2", 0, VPR_KEY_DEBOUNCE},
    {KEY_F3, GPIO_BUTTON2, 1, "vpr-keys: F3", 0, VPR_KEY_DEBOUNCE},
    (...)

This is confusing as it seems to have been wrong already when the
patch was merged. The members are assigned in order:

struct gpio_keys_button {
        unsigned int code;
        int gpio;
        int active_low;
        const char *desc;
        unsigned int type;
        int wakeup;
        int debounce_interval;
        bool can_disable;
(...)

Meaning KEY_XX, GPIO_BUTTON1, 1, "key name", type us right, then
comes wakeup capability and this should be 0 or 1, but is instead
assigned VPR_KEY_DEBOUNCE which is 500. I have corrected the code
to do what I think the author intended. I consider this a
non-critical fix because I bet it works (or the board is completely
unused), but add the fixing tag for reference.

Cc: Marc Reilly <marc@cpdesign.com.au>
Fixes: 00c89c1d1831 ("Introduce VPR200 board.")
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
4 files changed