Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Bryan O'Donoghue and committed by
Greg Kroah-Hartman
0ef1f6e3 5f317337

+7
+7
drivers/usb/typec/tps6598x.c
··· 563 563 return 0; 564 564 } 565 565 566 + static const struct of_device_id tps6598x_of_match[] = { 567 + { .compatible = "ti,tps6598x", }, 568 + {} 569 + }; 570 + MODULE_DEVICE_TABLE(of, tps6598x_of_match); 571 + 566 572 static const struct i2c_device_id tps6598x_id[] = { 567 573 { "tps6598x" }, 568 574 { } ··· 578 572 static struct i2c_driver tps6598x_i2c_driver = { 579 573 .driver = { 580 574 .name = "tps6598x", 575 + .of_match_table = tps6598x_of_match, 581 576 }, 582 577 .probe_new = tps6598x_probe, 583 578 .remove = tps6598x_remove,