Received: by 10.223.185.116 with SMTP id b49csp3580314wrg; Mon, 26 Feb 2018 02:27:42 -0800 (PST) X-Google-Smtp-Source: AG47ELsa1pPbkj/SpvJXnVWjoBhDcSWXm73vSDKiTVk9KQnx4s2Nk8Rmb0Etjyccs4CPfnI8NZ+4 X-Received: by 10.98.85.197 with SMTP id j188mr7972048pfb.86.1519640862064; Mon, 26 Feb 2018 02:27:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519640862; cv=none; d=google.com; s=arc-20160816; b=oJCftU7FXm0WWUMfvLnlqrq0TJTGqMFxeb6ZT2yEuYoOWnRtrWa2zl2VtBjpcZNrrg qZ2Enxdveq07dqWKXIRDEmt80whk6yZ+1r7aG8yUy6P3okqLj3ysJb6xFckufkiCk9Yp 9aMthF2SYt1+YVX7a2lDYeSbkrvPvwpnlWToeKhSoXr8214XS8u8jpKOsaKnA8yeuETg HPrlp79xf1389zCvvBJNwY7L1CRxhoXe73Sgx0MSsIgmJMJ30yYkljURA5FfyN0Iyjht iGcg1LnEo98Qn5AqVU1w63OAdilCExSGxEAuN33etAG/KBtWm32IQw7whnSF57NXnulJ alwQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:arc-authentication-results; bh=sRNmRNgA0OIgbdnMNoFSZeGHa3ppR0LzLRoUqzuAXYc=; b=OvVdI06otcOLfvrw8fzjzwWdRiUDPSEdbD0IKUBLkP/BKVe/5b4uW7QhXFH65OFrPq OYPsxetZp29JGoooYGy5BslnZrvwGJObVhZR1jReC5rulMFbH1n2E2GQ1hQ65+u7rHo4 hcxhHMtAr4FJSrehSS3pheAitiMyd1/3tlbGw6lEcYTjliVWhMKgHmW0c5XautJAQYLy dLLCcYVfglCyfu+U9KQ3p+gC7P0hQ3SrixhwvinjOeM8ETxzCAyhsWUTHMrBRY08MNSG rKIra6EGX++0cIJCSACP2Fs2hUL7Nr2/CiLncWTSz9ROqCXEPG0YtLUbaZm4uY444HKO d6PA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=collabora.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q25si5363461pge.457.2018.02.26.02.27.27; Mon, 26 Feb 2018 02:27:42 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=collabora.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752720AbeBZK0b (ORCPT + 99 others); Mon, 26 Feb 2018 05:26:31 -0500 Received: from bhuna.collabora.co.uk ([46.235.227.227]:48338 "EHLO bhuna.collabora.co.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752634AbeBZK0T (ORCPT ); Mon, 26 Feb 2018 05:26:19 -0500 Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: eballetbo) with ESMTPSA id 8EE4B277772 From: Enric Balletbo i Serra To: lee.jones@linaro.org Cc: groeck@chromium.org, andy.shevchenko@gmail.com, kernel@collabora.com, gwendal@chromium.org, linux-kernel@vger.kernel.org, Wei-Ning Huang Subject: [PATCH v3 7/8] mfd: cros_ec_i2c: add ACPI module device table Date: Mon, 26 Feb 2018 11:26:05 +0100 Message-Id: <20180226102606.15093-8-enric.balletbo@collabora.com> X-Mailer: git-send-email 2.16.1 In-Reply-To: <20180226102606.15093-1-enric.balletbo@collabora.com> References: <20180226102606.15093-1-enric.balletbo@collabora.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Wei-Ning Huang Add ACPI module device table for matching cros-ec devices to load the cros_ec_i2c driver automatically. Signed-off-by: Wei-Ning Huang Acked-by: Benson Leung Signed-off-by: Enric Balletbo i Serra Reviewed-by: Gwendal Grignou Reviewed-by: Andy Shevchenko --- Changes in v3: - [7/8] Add the Reviewed-by Andy Shevchenko. - [7/8] Avoid commas in terminator entries. Changes in v2: - [7/8] Add the Reviewed-by Gwendal. drivers/mfd/cros_ec_i2c.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/drivers/mfd/cros_ec_i2c.c b/drivers/mfd/cros_ec_i2c.c index 9f70de1e4c70..02a7bacdc056 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. */ +#include #include #include #include @@ -344,11 +345,13 @@ 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); +#ifdef CONFIG_OF 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); +#endif static const struct i2c_device_id cros_ec_i2c_id[] = { { "cros-ec-i2c", 0 }, @@ -356,9 +359,18 @@ static const struct i2c_device_id cros_ec_i2c_id[] = { }; MODULE_DEVICE_TABLE(i2c, cros_ec_i2c_id); +#ifdef CONFIG_ACPI +static const struct acpi_device_id cros_ec_i2c_acpi_id[] = { + { "GOOG0008", 0 }, + { /* sentinel */ } +}; +MODULE_DEVICE_TABLE(acpi, cros_ec_i2c_acpi_id); +#endif + static struct i2c_driver cros_ec_driver = { .driver = { .name = "cros-ec-i2c", + .acpi_match_table = ACPI_PTR(cros_ec_i2c_acpi_id), .of_match_table = of_match_ptr(cros_ec_i2c_of_match), .pm = &cros_ec_i2c_pm_ops, }, -- 2.16.1