The patch titled Subject: drivers/misc/lis3lv02d/lis3lv02d_spi.c: add DT matching table passthru code has been added to the -mm tree. Its filename is drivers-misc-lis3lv02d-lis3lv02d_spic-add-dt-matching-table-passthru-code.patch Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/SubmitChecklist when testing your code *** The -mm tree is included into linux-next and is updated there every 3-4 working days ------------------------------------------------------ From: Daniel Mack <zonque@xxxxxxxxx> Subject: drivers/misc/lis3lv02d/lis3lv02d_spi.c: add DT matching table passthru code If probed from a device tree, this driver now passes the node information to the generic part, so the runtime information can be derived. Successfully tested on a PXA3xx board. Signed-off-by: Daniel Mack <zonque@xxxxxxxxx> Cc: Rob Herring <robherring2@xxxxxxxxx> Cc: "AnilKumar, Chimata" <anilkumar@xxxxxx> Reviewed-by: Éric Piel <eric.piel@xxxxxxxxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- drivers/misc/lis3lv02d/lis3lv02d_spi.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff -puN drivers/misc/lis3lv02d/lis3lv02d_spi.c~drivers-misc-lis3lv02d-lis3lv02d_spic-add-dt-matching-table-passthru-code drivers/misc/lis3lv02d/lis3lv02d_spi.c --- a/drivers/misc/lis3lv02d/lis3lv02d_spi.c~drivers-misc-lis3lv02d-lis3lv02d_spic-add-dt-matching-table-passthru-code +++ a/drivers/misc/lis3lv02d/lis3lv02d_spi.c @@ -17,6 +17,7 @@ #include <linux/workqueue.h> #include <linux/spi/spi.h> #include <linux/pm.h> +#include <linux/of_platform.h> #include "lis3lv02d.h" @@ -58,6 +59,12 @@ static int lis3_spi_init(struct lis3lv02 static union axis_conversion lis3lv02d_axis_normal = { .as_array = { 1, 2, 3 } }; +static struct of_device_id lis302dl_spi_dt_ids[] = { + { .compatible = "st,lis302dl-spi" }, + {} +}; +MODULE_DEVICE_TABLE(of, lis302dl_spi_dt_ids); + static int __devinit lis302dl_spi_probe(struct spi_device *spi) { int ret; @@ -75,6 +82,12 @@ static int __devinit lis302dl_spi_probe( lis3_dev.irq = spi->irq; lis3_dev.ac = lis3lv02d_axis_normal; lis3_dev.pdata = spi->dev.platform_data; + +#ifdef CONFIG_OF + if (of_match_device(lis302dl_spi_dt_ids, &spi->dev)) + lis3_dev.of_node = spi->dev.of_node; +#endif + spi_set_drvdata(spi, &lis3_dev); return lis3lv02d_init_device(&lis3_dev); @@ -121,6 +134,7 @@ static struct spi_driver lis302dl_spi_dr .name = DRV_NAME, .owner = THIS_MODULE, .pm = &lis3lv02d_spi_pm, + .of_match_table = of_match_ptr(lis302dl_spi_dt_ids), }, .probe = lis302dl_spi_probe, .remove = __devexit_p(lis302dl_spi_remove), _ Patches currently in -mm which might be from zonque@xxxxxxxxx are origin.patch linux-next.patch drivers-misc-lis3lv02d-add-generic-dt-matching-code.patch drivers-misc-lis3lv02d-lis3lv02d_spic-add-dt-matching-table-passthru-code.patch drivers-w1-masters-w1-gpioc-add-ext_pullup_enable-pin-in-platform-data.patch drivers-w1-masters-w1-gpioc-add-dt-bindings.patch -- To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html