Merge tag 'omap-for-v4.20/omap1-fix-signed' of git://git.kernel.org/pub/scm/linux...
authorOlof Johansson <olof@lixom.net>
Sat, 3 Nov 2018 05:31:40 +0000 (22:31 -0700)
committerOlof Johansson <olof@lixom.net>
Sat, 3 Nov 2018 05:31:40 +0000 (22:31 -0700)
Fix for omap1 ams-delta irq

We need to use IRQ_NOTCONNECTED instead of -EINVAL for
ams_delta_modem_ports irq.

* tag 'omap-for-v4.20/omap1-fix-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap:
  ARM: OMAP1: ams-delta: Fix impossible .irq < 0

Signed-off-by: Olof Johansson <olof@lixom.net>
1  2 
arch/arm/mach-omap1/board-ams-delta.c

@@@ -267,6 -267,7 +267,6 @@@ static struct regulator_init_data modem
  static struct fixed_voltage_config modem_nreset_config = {
        .supply_name            = "modem_nreset",
        .microvolts             = 3300000,
 -      .gpio                   = AMS_DELTA_GPIO_PIN_MODEM_NRESET,
        .startup_delay          = 25000,
        .enable_high            = 1,
        .enabled_at_boot        = 1,
@@@ -281,15 -282,6 +281,15 @@@ static struct platform_device modem_nre
        },
  };
  
 +static struct gpiod_lookup_table ams_delta_nreset_gpiod_table = {
 +      .dev_id = "reg-fixed-voltage",
 +      .table = {
 +              GPIO_LOOKUP(LATCH2_LABEL, LATCH2_PIN_MODEM_NRESET,
 +                          NULL, GPIO_ACTIVE_HIGH),
 +              { },
 +      },
 +};
 +
  struct modem_private_data {
        struct regulator *regulator;
  };
@@@ -529,6 -521,7 +529,6 @@@ static struct regulator_init_data keybr
  static struct fixed_voltage_config keybrd_pwr_config = {
        .supply_name            = "keybrd_pwr",
        .microvolts             = 5000000,
 -      .gpio                   = AMS_DELTA_GPIO_PIN_KEYBRD_PWR,
        .enable_high            = 1,
        .init_data              = &keybrd_pwr_initdata,
  };
@@@ -562,7 -555,6 +562,7 @@@ static struct platform_device *ams_delt
  };
  
  static struct gpiod_lookup_table *ams_delta_gpio_tables[] __initdata = {
 +      &ams_delta_nreset_gpiod_table,
        &ams_delta_audio_gpio_table,
        &keybrd_pwr_gpio_table,
        &ams_delta_lcd_gpio_table,
@@@ -773,7 -765,7 +773,7 @@@ static struct plat_serial8250_port ams_
        {
                .membase        = IOMEM(MODEM_VIRT),
                .mapbase        = MODEM_PHYS,
-               .irq            = -EINVAL, /* changed later */
+               .irq            = IRQ_NOTCONNECTED, /* changed later */
                .flags          = UPF_BOOT_AUTOCONF,
                .irqflags       = IRQF_TRIGGER_RISING,
                .iotype         = UPIO_MEM,
@@@ -864,8 -856,7 +864,7 @@@ static int __init modem_nreset_init(voi
  
  
  /*
-  * This function expects MODEM IRQ number already assigned to the port
-  * and fails if it's not.
+  * This function expects MODEM IRQ number already assigned to the port.
   * The MODEM device requires its RESET# pin kept high during probe.
   * That requirement can be fulfilled in several ways:
   * - with a descriptor of already functional modem_nreset regulator
@@@ -888,9 -879,6 +887,6 @@@ static int __init ams_delta_modem_init(
        if (!machine_is_ams_delta())
                return -ENODEV;
  
-       if (ams_delta_modem_ports[0].irq < 0)
-               return ams_delta_modem_ports[0].irq;
        omap_cfg_reg(M14_1510_GPIO2);
  
        /* Initialize the modem_nreset regulator consumer before use */