Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1243392

Re: [RESEND PATCH] NFC: trf7970a: Add OF match table

From Javier Martinez Canillas <javier@osg.samsung.com>
Newsgroups linux.kernel
Subject Re: [RESEND PATCH] NFC: trf7970a: Add OF match table
Date 2015-10-09 16:00 +0200
Message-ID <qhGng-3UO-19@gated-at.bofh.it> (permalink)
References <q9gT0-8o1-31@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


Hello,

On 09/16/2015 11:08 AM, Javier Martinez Canillas wrote:
> The Documentation/devicetree/bindings/net/nfc/trf7970a.txt DT binding doc
> lists "ti,trf7970a" 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 <javier@osg.samsung.com>
> 
> ---
> 
>  drivers/nfc/trf7970a.c | 7 +++++++
>  1 file changed, 7 insertions(+)
> 
> diff --git a/drivers/nfc/trf7970a.c b/drivers/nfc/trf7970a.c
> index 70b0707fd9a9..123aa981c9d8 100644
> --- a/drivers/nfc/trf7970a.c
> +++ b/drivers/nfc/trf7970a.c
> @@ -2211,6 +2211,12 @@ static const struct dev_pm_ops trf7970a_pm_ops = {
>  			trf7970a_pm_runtime_resume, NULL)
>  };
>  
> +static const struct of_device_id trf7970a_of_match[] = {
> +	{ .compatible = "ti,trf7970a", },
> +	{ /* sentinel */ },
> +};
> +MODULE_DEVICE_TABLE(of, trf7970a_of_match);
> +
>  static const struct spi_device_id trf7970a_id_table[] = {
>  	{ "trf7970a", 0 },
>  	{ }
> @@ -2223,6 +2229,7 @@ static struct spi_driver trf7970a_spi_driver = {
>  	.id_table	= trf7970a_id_table,
>  	.driver		= {
>  		.name	= "trf7970a",
> +		.of_match_table = of_match_ptr(trf7970a_of_match),
>  		.owner	= THIS_MODULE,
>  		.pm	= &trf7970a_pm_ops,
>  	},
> 

Any comments about this patch?

Best regards,
-- 
Javier Martinez Canillas
Open Source Group
Samsung Research America
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | Next | Find similar | Unroll thread


Thread

Re: [RESEND PATCH] NFC: trf7970a: Add OF match table Javier Martinez Canillas <javier@osg.samsung.com> - 2015-10-09 16:00 +0200

csiph-web