Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1210221 > unrolled thread
| Started by | Javier Martinez Canillas <javier@osg.samsung.com> |
|---|---|
| First post | 2015-08-20 09:20 +0200 |
| Last post | 2015-08-24 16:10 +0200 |
| Articles | 2 — 2 participants |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
[PATCH 12/18] mfd: stmpe: Add OF match table Javier Martinez Canillas <javier@osg.samsung.com> - 2015-08-20 09:20 +0200
Re: [PATCH 12/18] mfd: stmpe: Add OF match table Lee Jones <lee.jones@linaro.org> - 2015-08-24 16:10 +0200
| From | Javier Martinez Canillas <javier@osg.samsung.com> |
|---|---|
| Date | 2015-08-20 09:20 +0200 |
| Subject | [PATCH 12/18] mfd: stmpe: Add OF match table |
| Message-ID | <pZsiK-6gT-9@gated-at.bofh.it> |
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 <javier@osg.samsung.com>
---
drivers/mfd/stmpe-spi.c | 13 +++++++++++++
1 file changed, 13 insertions(+)
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 <linux/interrupt.h>
#include <linux/kernel.h>
#include <linux/module.h>
+#include <linux/of.h>
#include <linux/types.h>
#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,
--
2.4.3
--
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/
[toc] | [next] | [standalone]
| From | Lee Jones <lee.jones@linaro.org> |
|---|---|
| Date | 2015-08-24 16:10 +0200 |
| Message-ID | <q10BJ-1vm-41@gated-at.bofh.it> |
| In reply to | #1210221 |
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 <javier@osg.samsung.com>
> ---
>
> 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 <linux/interrupt.h>
> #include <linux/kernel.h>
> #include <linux/module.h>
> +#include <linux/of.h>
> #include <linux/types.h>
> #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
--
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/
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web