From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755397AbbHYHeW (ORCPT ); Tue, 25 Aug 2015 03:34:22 -0400 Received: from mail-wi0-f178.google.com ([209.85.212.178]:38308 "EHLO mail-wi0-f178.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754191AbbHYHeT (ORCPT ); Tue, 25 Aug 2015 03:34:19 -0400 Date: Tue, 25 Aug 2015 08:34:16 +0100 From: Lee Jones To: Javier Martinez Canillas Cc: linux-kernel@vger.kernel.org, Samuel Ortiz Subject: Re: [PATCH] mfd: cros_ec: i2c: Add OF match table Message-ID: <20150825073416.GC19409@x1> References: <1440481690-28491-1-git-send-email-javier@osg.samsung.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1440481690-28491-1-git-send-email-javier@osg.samsung.com> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 > > --- > > 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