diff options
| author | Janusz Krzysztofik <jmkrzyszt@gmail.com> | 2018-06-21 18:41:25 -0400 |
|---|---|---|
| committer | Tony Lindgren <tony@atomide.com> | 2018-07-03 02:05:14 -0400 |
| commit | a32d5ce1dbf9389ad28d438dbcdaa520a913cde8 (patch) | |
| tree | 909f1b49bc8722ccb996eff1aa01bc7ab1e5fa85 /drivers/input | |
| parent | 97abda99a56949059955ac0d82c0f6c8277416c4 (diff) | |
ARM: OMAP1: ams-delta FIQ: Keep serio input GPIOs requested
From the very beginning, input GPIO pins of ams-delta serio port have
been used by FIQ handler, not serio driver.
Don't request those pins from the ams-delta-serio driver any longer,
instead keep them requested and initialized by the FIQ initialization
routine which already requests them and releases while identifying GPIO
IRQs.
Signed-off-by: Janusz Krzysztofik <jmkrzyszt@gmail.com>
Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Diffstat (limited to 'drivers/input')
| -rw-r--r-- | drivers/input/serio/ams_delta_serio.c | 30 |
1 files changed, 2 insertions, 28 deletions
diff --git a/drivers/input/serio/ams_delta_serio.c b/drivers/input/serio/ams_delta_serio.c index b955c6a72e99..7952a29f9540 100644 --- a/drivers/input/serio/ams_delta_serio.c +++ b/drivers/input/serio/ams_delta_serio.c | |||
| @@ -110,19 +110,6 @@ static void ams_delta_serio_close(struct serio *serio) | |||
| 110 | regulator_disable(priv->vcc); | 110 | regulator_disable(priv->vcc); |
| 111 | } | 111 | } |
| 112 | 112 | ||
| 113 | static const struct gpio ams_delta_gpios[] __initconst_or_module = { | ||
| 114 | { | ||
| 115 | .gpio = AMS_DELTA_GPIO_PIN_KEYBRD_DATA, | ||
| 116 | .flags = GPIOF_DIR_IN, | ||
| 117 | .label = "serio-data", | ||
| 118 | }, | ||
| 119 | { | ||
| 120 | .gpio = AMS_DELTA_GPIO_PIN_KEYBRD_CLK, | ||
| 121 | .flags = GPIOF_DIR_IN, | ||
| 122 | .label = "serio-clock", | ||
| 123 | }, | ||
| 124 | }; | ||
| 125 | |||
| 126 | static int ams_delta_serio_init(struct platform_device *pdev) | 113 | static int ams_delta_serio_init(struct platform_device *pdev) |
| 127 | { | 114 | { |
| 128 | struct ams_delta_serio *priv; | 115 | struct ams_delta_serio *priv; |
| @@ -133,13 +120,6 @@ static int ams_delta_serio_init(struct platform_device *pdev) | |||
| 133 | if (!priv) | 120 | if (!priv) |
| 134 | return -ENOMEM; | 121 | return -ENOMEM; |
| 135 | 122 | ||
| 136 | err = gpio_request_array(ams_delta_gpios, | ||
| 137 | ARRAY_SIZE(ams_delta_gpios)); | ||
| 138 | if (err) { | ||
| 139 | dev_err(&pdev->dev, "Couldn't request gpio pins\n"); | ||
| 140 | goto serio; | ||
| 141 | } | ||
| 142 | |||
| 143 | priv->vcc = devm_regulator_get(&pdev->dev, "vcc"); | 123 | priv->vcc = devm_regulator_get(&pdev->dev, "vcc"); |
| 144 | if (IS_ERR(priv->vcc)) { | 124 | if (IS_ERR(priv->vcc)) { |
| 145 | err = PTR_ERR(priv->vcc); | 125 | err = PTR_ERR(priv->vcc); |
| @@ -157,7 +137,7 @@ static int ams_delta_serio_init(struct platform_device *pdev) | |||
| 157 | */ | 137 | */ |
| 158 | if (err == -ENODEV) | 138 | if (err == -ENODEV) |
| 159 | err = -EPROBE_DEFER; | 139 | err = -EPROBE_DEFER; |
| 160 | goto gpio; | 140 | return err; |
| 161 | } | 141 | } |
| 162 | 142 | ||
| 163 | err = request_irq(gpio_to_irq(AMS_DELTA_GPIO_PIN_KEYBRD_CLK), | 143 | err = request_irq(gpio_to_irq(AMS_DELTA_GPIO_PIN_KEYBRD_CLK), |
| @@ -165,7 +145,7 @@ static int ams_delta_serio_init(struct platform_device *pdev) | |||
| 165 | DRIVER_NAME, priv); | 145 | DRIVER_NAME, priv); |
| 166 | if (err < 0) { | 146 | if (err < 0) { |
| 167 | dev_err(&pdev->dev, "IRQ request failed (%d)\n", err); | 147 | dev_err(&pdev->dev, "IRQ request failed (%d)\n", err); |
| 168 | goto gpio; | 148 | return err; |
| 169 | } | 149 | } |
| 170 | /* | 150 | /* |
| 171 | * Since GPIO register handling for keyboard clock pin is performed | 151 | * Since GPIO register handling for keyboard clock pin is performed |
| @@ -201,10 +181,6 @@ static int ams_delta_serio_init(struct platform_device *pdev) | |||
| 201 | 181 | ||
| 202 | irq: | 182 | irq: |
| 203 | free_irq(gpio_to_irq(AMS_DELTA_GPIO_PIN_KEYBRD_CLK), priv); | 183 | free_irq(gpio_to_irq(AMS_DELTA_GPIO_PIN_KEYBRD_CLK), priv); |
| 204 | gpio: | ||
| 205 | gpio_free_array(ams_delta_gpios, | ||
| 206 | ARRAY_SIZE(ams_delta_gpios)); | ||
| 207 | serio: | ||
| 208 | return err; | 184 | return err; |
| 209 | } | 185 | } |
| 210 | 186 | ||
| @@ -214,8 +190,6 @@ static int ams_delta_serio_exit(struct platform_device *pdev) | |||
| 214 | 190 | ||
| 215 | serio_unregister_port(priv->serio); | 191 | serio_unregister_port(priv->serio); |
| 216 | free_irq(gpio_to_irq(AMS_DELTA_GPIO_PIN_KEYBRD_CLK), 0); | 192 | free_irq(gpio_to_irq(AMS_DELTA_GPIO_PIN_KEYBRD_CLK), 0); |
| 217 | gpio_free_array(ams_delta_gpios, | ||
| 218 | ARRAY_SIZE(ams_delta_gpios)); | ||
| 219 | 193 | ||
| 220 | return 0; | 194 | return 0; |
| 221 | } | 195 | } |
