Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit adb77b3e authored by Linus Walleij's avatar Linus Walleij Committed by Dmitry Torokhov
Browse files

Input: gpio_mouse - add device tree probing



This makes the GPIO mouse probe nicely from the device tree if found in a
tree. As the driver uses device properties it can easily be amended to also
probe from ACPI devices.

Acked-by: default avatarHans-Christian Noren Egtvedt <egtvedt@samfundet.no>
Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
Signed-off-by: default avatarDmitry Torokhov <dmitry.torokhov@gmail.com>
parent 836bd419
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -14,6 +14,7 @@
#include <linux/input-polldev.h>
#include <linux/gpio/consumer.h>
#include <linux/property.h>
#include <linux/of.h>

/**
 * struct gpio_mouse
@@ -156,10 +157,17 @@ static int gpio_mouse_probe(struct platform_device *pdev)
	return 0;
}

static const struct of_device_id gpio_mouse_of_match[] = {
	{ .compatible = "gpio-mouse", },
	{ },
};
MODULE_DEVICE_TABLE(of, gpio_mouse_of_match);

static struct platform_driver gpio_mouse_device_driver = {
	.probe		= gpio_mouse_probe,
	.driver		= {
		.name	= "gpio_mouse",
		.of_match_table = gpio_mouse_of_match,
	}
};
module_platform_driver(gpio_mouse_device_driver);