From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
Cc: heikki.krogerus@linux.intel.com, robh+dt@kernel.org,
linux-usb@vger.kernel.org, devicetree@vger.kernel.org,
gregkh@linuxfoundation.org, linux-kernel@vger.kernel.org,
nikolaus.voss@loewensteinmedical.de, garsilva@embeddedor.com,
keescook@chromium.org
Subject: Re: [PATCH 2/2] usb: typec: tps6598x: Add OF probe binding
Date: Thu, 7 May 2020 15:33:46 +0300 [thread overview]
Message-ID: <20200507123346.GU185537@smile.fi.intel.com> (raw)
In-Reply-To: <20200507122352.1773661-3-bryan.odonoghue@linaro.org>
On Thu, May 07, 2020 at 01:23:52PM +0100, Bryan O'Donoghue wrote:
> 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(+)
>
> diff --git a/drivers/usb/typec/tps6598x.c b/drivers/usb/typec/tps6598x.c
> index 0698addd1185..61c6761072c9 100644
> --- a/drivers/usb/typec/tps6598x.c
> +++ b/drivers/usb/typec/tps6598x.c
> @@ -563,6 +563,14 @@ static int tps6598x_remove(struct i2c_client *client)
> return 0;
> }
>
> +#ifdef CONFIG_OF
No need for this (and thus for of_match_ptr() macro below). Saving few dozens of bytes?
> +static const struct of_device_id tps6598x_of_match[] = {
> + { .compatible = "ti,tps6598x", },
> + {},
No comma for terminator line.
> +};
> +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),
--
With Best Regards,
Andy Shevchenko
prev parent reply other threads:[~2020-05-07 12:33 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-07 12:23 [PATCH 0/2] Add TI tps6598x DT binding and probe Bryan O'Donoghue
2020-05-07 12:23 ` [PATCH 1/2] dt-bindings: usb: Add TI tps6598x device tree binding documentation Bryan O'Donoghue
2020-05-07 12:32 ` Andy Shevchenko
2020-05-07 12:23 ` [PATCH 2/2] usb: typec: tps6598x: Add OF probe binding Bryan O'Donoghue
2020-05-07 12:33 ` Andy Shevchenko [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200507123346.GU185537@smile.fi.intel.com \
--to=andriy.shevchenko@linux.intel.com \
--cc=bryan.odonoghue@linaro.org \
--cc=devicetree@vger.kernel.org \
--cc=garsilva@embeddedor.com \
--cc=gregkh@linuxfoundation.org \
--cc=heikki.krogerus@linux.intel.com \
--cc=keescook@chromium.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=nikolaus.voss@loewensteinmedical.de \
--cc=robh+dt@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).