Adds a MODULE_DEVICE_TABLE() to allow probing of this driver from a DTS
setting.
Cc: Heikki Krogerus <[email protected]>
Cc: Greg Kroah-Hartman <[email protected]>
Cc: Nikolaus Voss <[email protected]>
Cc: Andy Shevchenko <[email protected]>
Cc: Gustavo A. R. Silva <[email protected]>
Cc: Kees Cook <[email protected]>
Cc: [email protected]
Cc: [email protected]
Signed-off-by: Bryan O'Donoghue <[email protected]>
---
drivers/usb/typec/tps6598x.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/drivers/usb/typec/tps6598x.c b/drivers/usb/typec/tps6598x.c
index 0698addd1185..defa651282b0 100644
--- a/drivers/usb/typec/tps6598x.c
+++ b/drivers/usb/typec/tps6598x.c
@@ -563,6 +563,12 @@ static int tps6598x_remove(struct i2c_client *client)
return 0;
}
+static const struct of_device_id tps6598x_of_match[] = {
+ { .compatible = "ti,tps6598x", },
+ {}
+};
+MODULE_DEVICE_TABLE(of, tps6598x_of_match);
+
static const struct i2c_device_id tps6598x_id[] = {
{ "tps6598x" },
{ }
@@ -572,6 +578,7 @@ MODULE_DEVICE_TABLE(i2c, tps6598x_id);
static struct i2c_driver tps6598x_i2c_driver = {
.driver = {
.name = "tps6598x",
+ .of_match_table = tps6598x_of_match,
},
.probe_new = tps6598x_probe,
.remove = tps6598x_remove,
--
2.25.1
From: Bryan O'Donoghue <[email protected]>
> Adds a MODULE_DEVICE_TABLE() to allow probing of this driver from a DTS
> setting.
Tested-by: Martin Kepplinger <[email protected]>
thanks!
martin
On Thu, May 07, 2020 at 10:47:33PM +0100, Bryan O'Donoghue wrote:
> Adds a MODULE_DEVICE_TABLE() to allow probing of this driver from a DTS
> setting.
>
> Cc: Heikki Krogerus <[email protected]>
> Cc: Greg Kroah-Hartman <[email protected]>
> Cc: Nikolaus Voss <[email protected]>
> Cc: Andy Shevchenko <[email protected]>
> Cc: Gustavo A. R. Silva <[email protected]>
> Cc: Kees Cook <[email protected]>
> Cc: [email protected]
> Cc: [email protected]
> Signed-off-by: Bryan O'Donoghue <[email protected]>
Reviewed-by: Heikki Krogerus <[email protected]>
> ---
> drivers/usb/typec/tps6598x.c | 7 +++++++
> 1 file changed, 7 insertions(+)
>
> diff --git a/drivers/usb/typec/tps6598x.c b/drivers/usb/typec/tps6598x.c
> index 0698addd1185..defa651282b0 100644
> --- a/drivers/usb/typec/tps6598x.c
> +++ b/drivers/usb/typec/tps6598x.c
> @@ -563,6 +563,12 @@ static int tps6598x_remove(struct i2c_client *client)
> return 0;
> }
>
> +static const struct of_device_id tps6598x_of_match[] = {
> + { .compatible = "ti,tps6598x", },
> + {}
> +};
> +MODULE_DEVICE_TABLE(of, tps6598x_of_match);
> +
> static const struct i2c_device_id tps6598x_id[] = {
> { "tps6598x" },
> { }
> @@ -572,6 +578,7 @@ MODULE_DEVICE_TABLE(i2c, tps6598x_id);
> static struct i2c_driver tps6598x_i2c_driver = {
> .driver = {
> .name = "tps6598x",
> + .of_match_table = tps6598x_of_match,
> },
> .probe_new = tps6598x_probe,
> .remove = tps6598x_remove,
> --
> 2.25.1
thanks,
--
heikki