linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] tca8418: fix loading this driver as a module from a device tree
@ 2014-04-10  9:29 Dr. H. Nikolaus Schaller
  2014-04-25  6:52 ` Dmitry Torokhov
  0 siblings, 1 reply; 2+ messages in thread
From: Dr. H. Nikolaus Schaller @ 2014-04-10  9:29 UTC (permalink / raw)
  To: Dmitry Torokhov; +Cc: linux-input, LKML, Marek Belisko

Loading the tca8418 driver as a module on a device tree based system needs
a MODULE_ALIAS because the driver name does not match the automatic
name generation rules of a 'compatible' entry on i2c bus.

Signed-off-by: H. Nikolaus Schaller <hns@goldelico.com>
---
 drivers/input/keyboard/tca8418_keypad.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/drivers/input/keyboard/tca8418_keypad.c b/drivers/input/keyboard/tca8418_keypad.c
index 55c1530..3556360 100644
--- a/drivers/input/keyboard/tca8418_keypad.c
+++ b/drivers/input/keyboard/tca8418_keypad.c
@@ -392,6 +392,11 @@ static const struct of_device_id tca8418_dt_ids[] = {
 	{ }
 };
 MODULE_DEVICE_TABLE(of, tca8418_dt_ids);
+/* the device tree based i2c loader looks for
+ * "i2c:" + second_component_of(property("compatible"))
+ * and therefore we need an alias to be found.
+ */
+MODULE_ALIAS("i2c:tca8418");
 #endif
 
 static struct i2c_driver tca8418_keypad_driver = {
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] tca8418: fix loading this driver as a module from a device tree
  2014-04-10  9:29 [PATCH] tca8418: fix loading this driver as a module from a device tree Dr. H. Nikolaus Schaller
@ 2014-04-25  6:52 ` Dmitry Torokhov
  0 siblings, 0 replies; 2+ messages in thread
From: Dmitry Torokhov @ 2014-04-25  6:52 UTC (permalink / raw)
  To: Dr. H. Nikolaus Schaller; +Cc: linux-input, LKML, Marek Belisko

On Thu, Apr 10, 2014 at 11:29:58AM +0200, Dr. H. Nikolaus Schaller wrote:
> Loading the tca8418 driver as a module on a device tree based system needs
> a MODULE_ALIAS because the driver name does not match the automatic
> name generation rules of a 'compatible' entry on i2c bus.
> 
> Signed-off-by: H. Nikolaus Schaller <hns@goldelico.com>

Applied, thank you.

> ---
>  drivers/input/keyboard/tca8418_keypad.c | 5 +++++
>  1 file changed, 5 insertions(+)
> 
> diff --git a/drivers/input/keyboard/tca8418_keypad.c b/drivers/input/keyboard/tca8418_keypad.c
> index 55c1530..3556360 100644
> --- a/drivers/input/keyboard/tca8418_keypad.c
> +++ b/drivers/input/keyboard/tca8418_keypad.c
> @@ -392,6 +392,11 @@ static const struct of_device_id tca8418_dt_ids[] = {
>  	{ }
>  };
>  MODULE_DEVICE_TABLE(of, tca8418_dt_ids);
> +/* the device tree based i2c loader looks for
> + * "i2c:" + second_component_of(property("compatible"))
> + * and therefore we need an alias to be found.
> + */
> +MODULE_ALIAS("i2c:tca8418");
>  #endif
>  
>  static struct i2c_driver tca8418_keypad_driver = {
> -- 
> 1.9.1
> 
> 

-- 
Dmitry

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-04-25  6:52 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-04-10  9:29 [PATCH] tca8418: fix loading this driver as a module from a device tree Dr. H. Nikolaus Schaller
2014-04-25  6:52 ` Dmitry Torokhov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).