@@ -563,6 +563,14 @@ static int tps6598x_remove(struct i2c_client *client)
return 0;
}
+#ifdef CONFIG_OF
+static const struct of_device_id tps6598x_of_match[] = {
+ { .compatible = "ti,tps6598x", },
+ {},
+};
+MODULE_DEVICE_TABLE(of, tps6598x_of_match);
+#endif
+
static const struct i2c_device_id tps6598x_id[] = {
{ "tps6598x" },
{ }
@@ -572,6 +580,7 @@ MODULE_DEVICE_TABLE(i2c, tps6598x_id);
static struct i2c_driver tps6598x_i2c_driver = {
.driver = {
.name = "tps6598x",
+ .of_match_table = of_match_ptr(tps6598x_of_match),
},
.probe_new = tps6598x_probe,
.remove = tps6598x_remove,
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> --- drivers/usb/typec/tps6598x.c | 9 +++++++++ 1 file changed, 9 insertions(+)