Commit 41f8fee3 authored by Janusz Krzysztofik's avatar Janusz Krzysztofik Committed by Tony Lindgren

ARM: OMAP1: ams-delta: Hog "keybrd_dataout" GPIO pin

"keybrd_dataout" GPIO pin used to be initialized by ams-delta-serio
driver to a state safe for ams-delta-serio device function and not
changed thereafter.  As such, it may be assumed not under the driver
control and responsibility for its initialization handed over to board
init file.

Introduce a GPIO hog table and take over control of the
"keybrd_dataout" GPIO pin from the ams-delta-serio driver.
Signed-off-by: default avatarJanusz Krzysztofik <jmkrzyszt@gmail.com>
Signed-off-by: default avatarTony Lindgren <tony@atomide.com>
parent 2bcb1be0
...@@ -607,6 +607,12 @@ static int gpiochip_match_by_label(struct gpio_chip *chip, void *data) ...@@ -607,6 +607,12 @@ static int gpiochip_match_by_label(struct gpio_chip *chip, void *data)
return !strcmp(label, chip->label); return !strcmp(label, chip->label);
} }
static struct gpiod_hog ams_delta_gpio_hogs[] = {
GPIO_HOG(LATCH2_LABEL, LATCH2_PIN_KEYBRD_DATAOUT, "keybrd_dataout",
GPIO_ACTIVE_HIGH, GPIOD_OUT_LOW),
{},
};
static void __init ams_delta_init(void) static void __init ams_delta_init(void)
{ {
/* mux pins for uarts */ /* mux pins for uarts */
...@@ -627,6 +633,8 @@ static void __init ams_delta_init(void) ...@@ -627,6 +633,8 @@ static void __init ams_delta_init(void)
omap_cfg_reg(J19_1610_CAM_D6); omap_cfg_reg(J19_1610_CAM_D6);
omap_cfg_reg(J18_1610_CAM_D7); omap_cfg_reg(J18_1610_CAM_D7);
gpiod_add_hogs(ams_delta_gpio_hogs);
omap_serial_init(); omap_serial_init();
omap_register_i2c_bus(1, 100, NULL, 0); omap_register_i2c_bus(1, 100, NULL, 0);
......
...@@ -121,11 +121,6 @@ static const struct gpio ams_delta_gpios[] __initconst_or_module = { ...@@ -121,11 +121,6 @@ static const struct gpio ams_delta_gpios[] __initconst_or_module = {
.flags = GPIOF_DIR_IN, .flags = GPIOF_DIR_IN,
.label = "serio-clock", .label = "serio-clock",
}, },
{
.gpio = AMS_DELTA_GPIO_PIN_KEYBRD_DATAOUT,
.flags = GPIOF_OUT_INIT_LOW,
.label = "serio-dataout",
},
}; };
static int ams_delta_serio_init(struct platform_device *pdev) static int ams_delta_serio_init(struct platform_device *pdev)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment