mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 03:01:39 -04:00
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: Hans-Christian Noren Egtvedt <[email protected]> Signed-off-by: Linus Walleij <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
This commit is contained in:
parent
836bd41983
commit
adb77b3e51
1 changed files with 8 additions and 0 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Reference in a new issue