From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753170AbbHTHL7 (ORCPT ); Thu, 20 Aug 2015 03:11:59 -0400 Received: from lists.s-osg.org ([54.187.51.154]:58736 "EHLO lists.s-osg.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752695AbbHTHIS (ORCPT ); Thu, 20 Aug 2015 03:08:18 -0400 From: Javier Martinez Canillas To: linux-kernel@vger.kernel.org Cc: Javier Martinez Canillas , Lee Jones , Samuel Ortiz Subject: [PATCH 09/18] mfd: cros_ec: spi: Add OF match table Date: Thu, 20 Aug 2015 09:07:22 +0200 Message-Id: <1440054451-1223-10-git-send-email-javier@osg.samsung.com> X-Mailer: git-send-email 2.4.3 In-Reply-To: <1440054451-1223-1-git-send-email-javier@osg.samsung.com> References: <1440054451-1223-1-git-send-email-javier@osg.samsung.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The Documentation/devicetree/bindings/mfd/cros-ec.txt DT binding doc lists "google,cros-ec-spi" as a compatible string but the corresponding driver does not have an OF match table. Add the table to the driver so the SPI core can do an OF style match. Signed-off-by: Javier Martinez Canillas --- drivers/mfd/cros_ec_spi.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/drivers/mfd/cros_ec_spi.c b/drivers/mfd/cros_ec_spi.c index 16f228dc243f..30a296b4e748 100644 --- a/drivers/mfd/cros_ec_spi.c +++ b/drivers/mfd/cros_ec_spi.c @@ -701,6 +701,12 @@ static int cros_ec_spi_resume(struct device *dev) static SIMPLE_DEV_PM_OPS(cros_ec_spi_pm_ops, cros_ec_spi_suspend, cros_ec_spi_resume); +static const struct of_device_id cros_ec_spi_of_match[] = { + { .compatible = "google,cros-ec-spi", }, + { /* sentinel */ }, +}; +MODULE_DEVICE_TABLE(of, cros_ec_spi_of_match); + static const struct spi_device_id cros_ec_spi_id[] = { { "cros-ec-spi", 0 }, { } @@ -710,6 +716,7 @@ MODULE_DEVICE_TABLE(spi, cros_ec_spi_id); static struct spi_driver cros_ec_driver_spi = { .driver = { .name = "cros-ec-spi", + .of_match_table = of_match_ptr(cros_ec_spi_of_match), .owner = THIS_MODULE, .pm = &cros_ec_spi_pm_ops, }, -- 2.4.3