diff options
author | Bryan O'Donoghue <bryan.odonoghue@linaro.org> | 2020-05-08 00:47:33 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2020-05-13 15:23:25 +0300 |
commit | 0ef1f6e3808b15f3bcede4976235a7d81cc7f254 (patch) | |
tree | 5fb48a6befdcea02ce821c0c23e846705461113c | |
parent | 5f3173370ecfa984942c12378d8f5af2bda77b7c (diff) | |
download | linux-0ef1f6e3808b15f3bcede4976235a7d81cc7f254.tar.xz |
usb: typec: tps6598x: Add OF probe binding
Adds a MODULE_DEVICE_TABLE() to allow probing of this driver from a DTS
setting.
Cc: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Nikolaus Voss <nikolaus.voss@loewensteinmedical.de>
Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: Gustavo A. R. Silva <garsilva@embeddedor.com>
Cc: Kees Cook <keescook@chromium.org>
Cc: linux-usb@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
Tested-by: Martin Kepplinger <martin.kepplinger@puri.sm>
Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Link: https://lore.kernel.org/r/20200507214733.1982696-3-bryan.odonoghue@linaro.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | drivers/usb/typec/tps6598x.c | 7 |
1 files changed, 7 insertions, 0 deletions
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, |