diff options
author | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2015-05-22 13:09:11 -0700 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2015-05-22 15:30:11 -0700 |
commit | f91a3f08b741e3c5ecf501c160e51f6032718f52 (patch) | |
tree | 9377e88c031c45af1000ede29b34bcbff4096526 | |
parent | 25d238b2260973bfca0b82181824340c7aeae45a (diff) | |
download | op-kernel-dev-f91a3f08b741e3c5ecf501c160e51f6032718f52.zip op-kernel-dev-f91a3f08b741e3c5ecf501c160e51f6032718f52.tar.gz |
Input: stmpe-ts - fix automatic module loading
When STMPE is instantiated via device tree individual MFD cells rae formed
with OF modaliases, not platform modaliases, and so we need to add OF
device table to the driver if we want it to load automatically:
of:Nstmpe_touchscreenT<NULL>Cst,stmpe-ts
Reported-by: Heiner Kallweit <hkallweit1@gmail.com>
Tested-by: Heiner Kallweit <hkallweit1@gmail.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
-rw-r--r-- | drivers/input/touchscreen/stmpe-ts.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/drivers/input/touchscreen/stmpe-ts.c b/drivers/input/touchscreen/stmpe-ts.c index e4c3125..e4977c6 100644 --- a/drivers/input/touchscreen/stmpe-ts.c +++ b/drivers/input/touchscreen/stmpe-ts.c @@ -383,13 +383,21 @@ static int stmpe_ts_remove(struct platform_device *pdev) static struct platform_driver stmpe_ts_driver = { .driver = { - .name = STMPE_TS_NAME, - }, + .name = STMPE_TS_NAME, + }, .probe = stmpe_input_probe, .remove = stmpe_ts_remove, }; module_platform_driver(stmpe_ts_driver); +#ifdef CONFIG_OF +static const struct of_device_id stmpe_ts_ids[] = { + { .compatible = "st,stmpe-ts", }, + { }, +}; +MODULE_DEVICE_TABLE(of, stmpe_ts_ids); +#endif + MODULE_AUTHOR("Luotao Fu <l.fu@pengutronix.de>"); MODULE_DESCRIPTION("STMPEXXX touchscreen driver"); MODULE_LICENSE("GPL"); |