From: Lee Jones <lee.jones@linaro.org>
To: Javier Martinez Canillas <javier@osg.samsung.com>
Cc: linux-kernel@vger.kernel.org, Samuel Ortiz <sameo@linux.intel.com>
Subject: Re: [PATCH] mfd: cros_ec: i2c: Add OF match table
Date: Tue, 25 Aug 2015 08:34:16 +0100 [thread overview]
Message-ID: <20150825073416.GC19409@x1> (raw)
In-Reply-To: <1440481690-28491-1-git-send-email-javier@osg.samsung.com>
On Tue, 25 Aug 2015, Javier Martinez Canillas wrote:
> The Documentation/devicetree/bindings/mfd/cros-ec.txt DT binding doc lists
> "google,cros-ec-i2c" as a compatible string but the corresponding driver
> does not have an OF match table. Add the table to the driver so the I2C
> core can do an OF style match.
>
> Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com>
>
> ---
>
> drivers/mfd/cros_ec_i2c.c | 7 +++++++
> 1 file changed, 7 insertions(+)
Applied, thanks.
> diff --git a/drivers/mfd/cros_ec_i2c.c b/drivers/mfd/cros_ec_i2c.c
> index d06e4b46db80..56a466469664 100644
> --- a/drivers/mfd/cros_ec_i2c.c
> +++ b/drivers/mfd/cros_ec_i2c.c
> @@ -344,6 +344,12 @@ static int cros_ec_i2c_resume(struct device *dev)
> static SIMPLE_DEV_PM_OPS(cros_ec_i2c_pm_ops, cros_ec_i2c_suspend,
> cros_ec_i2c_resume);
>
> +static const struct of_device_id cros_ec_i2c_of_match[] = {
> + { .compatible = "google,cros-ec-i2c", },
> + { /* sentinel */ },
> +};
> +MODULE_DEVICE_TABLE(of, cros_ec_i2c_of_match);
> +
> static const struct i2c_device_id cros_ec_i2c_id[] = {
> { "cros-ec-i2c", 0 },
> { }
> @@ -353,6 +359,7 @@ MODULE_DEVICE_TABLE(i2c, cros_ec_i2c_id);
> static struct i2c_driver cros_ec_driver = {
> .driver = {
> .name = "cros-ec-i2c",
> + .of_match_table = of_match_ptr(cros_ec_i2c_of_match),
> .pm = &cros_ec_i2c_pm_ops,
> },
> .probe = cros_ec_i2c_probe,
--
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
prev parent reply other threads:[~2015-08-25 7:34 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-08-25 5:48 [PATCH] mfd: cros_ec: i2c: Add OF match table Javier Martinez Canillas
2015-08-25 7:34 ` Lee Jones [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=20150825073416.GC19409@x1 \
--to=lee.jones@linaro.org \
--cc=javier@osg.samsung.com \
--cc=linux-kernel@vger.kernel.org \
--cc=sameo@linux.intel.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.