From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932985AbbHXN76 (ORCPT ); Mon, 24 Aug 2015 09:59:58 -0400 Received: from mail-wi0-f169.google.com ([209.85.212.169]:38575 "EHLO mail-wi0-f169.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754530AbbHXN74 (ORCPT ); Mon, 24 Aug 2015 09:59:56 -0400 Date: Mon, 24 Aug 2015 14:59:53 +0100 From: Lee Jones To: Javier Martinez Canillas Cc: linux-kernel@vger.kernel.org, Samuel Ortiz Subject: Re: [PATCH 12/18] mfd: stmpe: Add OF match table Message-ID: <20150824135953.GK3237@x1> References: <1440054451-1223-1-git-send-email-javier@osg.samsung.com> <1440054451-1223-13-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: <1440054451-1223-13-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 Thu, 20 Aug 2015, Javier Martinez Canillas wrote: > The Documentation/devicetree/bindings/mfd/stmpe.txt DT binding doc lists > "st,stmpe[610|801|811|1601|2401|2403]" as valid compatible strings 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/stmpe-spi.c | 13 +++++++++++++ > 1 file changed, 13 insertions(+) Applied, thanks. > diff --git a/drivers/mfd/stmpe-spi.c b/drivers/mfd/stmpe-spi.c > index 6fdb30e84a2b..618ba244d98a 100644 > --- a/drivers/mfd/stmpe-spi.c > +++ b/drivers/mfd/stmpe-spi.c > @@ -11,6 +11,7 @@ > #include > #include > #include > +#include > #include > #include "stmpe.h" > > @@ -108,6 +109,17 @@ static int stmpe_spi_remove(struct spi_device *spi) > return stmpe_remove(stmpe); > } > > +static const struct of_device_id stmpe_spi_of_match[] = { > + { .compatible = "st,stmpe610", }, > + { .compatible = "st,stmpe801", }, > + { .compatible = "st,stmpe811", }, > + { .compatible = "st,stmpe1601", }, > + { .compatible = "st,stmpe2401", }, > + { .compatible = "st,stmpe2403", }, > + { /* sentinel */ }, > +}; > +MODULE_DEVICE_TABLE(of, stmpe_spi_of_match); > + > static const struct spi_device_id stmpe_spi_id[] = { > { "stmpe610", STMPE610 }, > { "stmpe801", STMPE801 }, > @@ -122,6 +134,7 @@ MODULE_DEVICE_TABLE(spi, stmpe_id); > static struct spi_driver stmpe_spi_driver = { > .driver = { > .name = "stmpe-spi", > + .of_match_table = of_match_ptr(stmpe_spi_of_match), > .owner = THIS_MODULE, > #ifdef CONFIG_PM > .pm = &stmpe_dev_pm_ops, -- Lee Jones Linaro STMicroelectronics Landing Team Lead Linaro.org │ Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog