Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752079AbdHKELJ (ORCPT ); Fri, 11 Aug 2017 00:11:09 -0400 Received: from mail-pf0-f172.google.com ([209.85.192.172]:34944 "EHLO mail-pf0-f172.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750815AbdHKELH (ORCPT ); Fri, 11 Aug 2017 00:11:07 -0400 Date: Thu, 10 Aug 2017 21:11:03 -0700 From: Benson Leung To: Thierry Escande Cc: Benson Leung , Lee Jones , linux-kernel@vger.kernel.org, wnhuang@google.com, bleung@google.com Subject: Re: [PATCH 6/8] mfd: cros_ec_i2c: add ACPI module device table Message-ID: <20170811041103.GD13907@decatoncale.mtv.corp.google.com> References: <1502403410-5233-1-git-send-email-thierry.escande@collabora.com> <1502403410-5233-7-git-send-email-thierry.escande@collabora.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="uxuisgdDHaNETlh8" Content-Disposition: inline In-Reply-To: <1502403410-5233-7-git-send-email-thierry.escande@collabora.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 Content-Length: 3176 Lines: 105 --uxuisgdDHaNETlh8 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi Thierry, On Fri, Aug 11, 2017 at 12:16:48AM +0200, Thierry Escande wrote: > From: Wei-Ning Huang >=20 > Add ACPI module device table for matching cros-ec devices to load the > cros_ec_i2c driver automatically. >=20 > Signed-off-by: Wei-Ning Huang > Signed-off-by: Thierry Escande Acked-by: Benson Leung > --- > drivers/mfd/cros_ec_i2c.c | 12 ++++++++++++ > 1 file changed, 12 insertions(+) >=20 > diff --git a/drivers/mfd/cros_ec_i2c.c b/drivers/mfd/cros_ec_i2c.c > index 576fcc4..56fc667 100644 > --- a/drivers/mfd/cros_ec_i2c.c > +++ b/drivers/mfd/cros_ec_i2c.c > @@ -13,6 +13,7 @@ > * GNU General Public License for more details. > */ > =20 > +#include > #include > #include > #include > @@ -345,11 +346,13 @@ const struct dev_pm_ops cros_ec_i2c_pm_ops =3D { > SET_LATE_SYSTEM_SLEEP_PM_OPS(cros_ec_i2c_suspend, cros_ec_i2c_resume) > }; > =20 > +#ifdef CONFIG_OF > static const struct of_device_id cros_ec_i2c_of_match[] =3D { > { .compatible =3D "google,cros-ec-i2c", }, > { /* sentinel */ }, > }; > MODULE_DEVICE_TABLE(of, cros_ec_i2c_of_match); > +#endif > =20 > static const struct i2c_device_id cros_ec_i2c_id[] =3D { > { "cros-ec-i2c", 0 }, > @@ -357,9 +360,18 @@ static const struct i2c_device_id cros_ec_i2c_id[] = =3D { > }; > MODULE_DEVICE_TABLE(i2c, cros_ec_i2c_id); > =20 > +#ifdef CONFIG_ACPI > +static const struct acpi_device_id cros_ec_i2c_acpi_id[] =3D { > + { "GOOG0008", 0 }, > + { }, > +}; > +MODULE_DEVICE_TABLE(acpi, cros_ec_i2c_acpi_id); > +#endif > + > static struct i2c_driver cros_ec_driver =3D { > .driver =3D { > .name =3D "cros-ec-i2c", > + .acpi_match_table =3D ACPI_PTR(cros_ec_i2c_acpi_id), > .of_match_table =3D of_match_ptr(cros_ec_i2c_of_match), > .pm =3D &cros_ec_i2c_pm_ops, > }, > --=20 > 2.7.4 >=20 --=20 Benson Leung Staff Software Engineer Chrome OS Kernel Google Inc. bleung@google.com Chromium OS Project bleung@chromium.org --uxuisgdDHaNETlh8 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBCgAGBQJZjS5XAAoJEB8J9XsKL+ZYJCcP/RhqYPEXejAOw3mgwvIYKht0 Gh/B5UCwgqAUvw7N3KCdW99pChBR6UVaBC2hOZo6zO2j3HT5g9rZaD394BbBboQD 247uNUph+T6AktEDjl/1xsSeSp3cYT2GyrgFe9uvqXdIWDDYXKvIW/dROGJHkhhE xEmk0JIHy9P9lnGtvXN3K9JKZnkeM6izwtcQhy2bVNfUQkX6AN7IAZ6QpPvonAwY mk99LRVNPXluERwezl98wBNJiLNpMtYA2qFjtFT+75dnulnoRDJ7gbwxkXE0GLPh 2qrQB4QMkwp2CTS4WQp5tQvQadMoAQM+y/ZwZwg8HQyi4GsEMMoCQaQ+4nmH1O0l cVryQMETt2D5Qi3jzgdZyt/Q70Hk6fMR3WYQshDNhmQ36KJmkZM482BU79583u9F +/oaUm0/JdSMuUKTuEd1ehXCbP/Y8dHv/0LrFUtwz1kJQc1sBu1x3sU6rlQm4Dj5 tZoADokuqr+M9btLxldF1FISPCyNPQhQJmSta9BSWtgmomgJkvuhwZE2SfPAwfyU GuhByKkJ5vuxOE/Gt2cm61estsJtfBIloC2sXsKExQx7vd0qwa82/0F8NtwSRPhK cNNtkyp1//BwFga7Q6DE84qjl/KXIh1u/IcLcX+r1omVFI8BQkzDtpD/HsVQdnil V3+OxSgCujD4uKM6KNih =bKGJ -----END PGP SIGNATURE----- --uxuisgdDHaNETlh8--