From: Ben Dooks <ben.dooks@codethink.co.uk> To: linux-kernel@lists.codethink.co.uk, linux-sh@vger.kernel.org, linux-media@vger.kernel.org Cc: robert.jarzmik@free.fr, g.liakhovetski@gmx.de, magnus.damm@opensource.se, horms@verge.net.au, ian.molton@codethink.co.uk, william.towle@codethink.co.uk, Ben Dooks <ben.dooks@codethink.co.uk> Subject: [PATCH 4/9] adv7180: add of match table Date: Sun, 15 Jun 2014 19:56:29 +0000 [thread overview] Message-ID: <1402862194-17743-5-git-send-email-ben.dooks@codethink.co.uk> (raw) In-Reply-To: <1402862194-17743-1-git-send-email-ben.dooks@codethink.co.uk> Add a proper of match id for use when the device is being bound via device tree, to avoid having to use the i2c old-style binding of the device. Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk> --- Since original submission: - Fixed of_match_table typo --- drivers/media/i2c/adv7180.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/drivers/media/i2c/adv7180.c b/drivers/media/i2c/adv7180.c index 821178d..46e47a0 100644 --- a/drivers/media/i2c/adv7180.c +++ b/drivers/media/i2c/adv7180.c @@ -25,6 +25,7 @@ #include <linux/interrupt.h> #include <linux/i2c.h> #include <linux/slab.h> +#include <linux/of.h> #include <media/v4l2-ioctl.h> #include <linux/videodev2.h> #include <media/v4l2-device.h> @@ -710,11 +711,21 @@ static SIMPLE_DEV_PM_OPS(adv7180_pm_ops, adv7180_suspend, adv7180_resume); MODULE_DEVICE_TABLE(i2c, adv7180_id); +#ifdef CONFIG_OF +static const struct of_device_id adv7180_of_id[] = { + { .compatible = "adi,adv7180", }, + { }, +}; + +MODULE_DEVICE_TABLE(of, adv7180_of_id) +#endif + static struct i2c_driver adv7180_driver = { .driver = { .owner = THIS_MODULE, .name = KBUILD_MODNAME, .pm = ADV7180_PM_OPS, + .of_match_table = of_match_ptr(adv7180_of_id), }, .probe = adv7180_probe, .remove = adv7180_remove, -- 2.0.0
WARNING: multiple messages have this Message-ID (diff)
From: Ben Dooks <ben.dooks@codethink.co.uk> To: linux-kernel@lists.codethink.co.uk, linux-sh@vger.kernel.org, linux-media@vger.kernel.org Cc: robert.jarzmik@free.fr, g.liakhovetski@gmx.de, magnus.damm@opensource.se, horms@verge.net.au, ian.molton@codethink.co.uk, william.towle@codethink.co.uk, Ben Dooks <ben.dooks@codethink.co.uk> Subject: [PATCH 4/9] adv7180: add of match table Date: Sun, 15 Jun 2014 20:56:29 +0100 [thread overview] Message-ID: <1402862194-17743-5-git-send-email-ben.dooks@codethink.co.uk> (raw) In-Reply-To: <1402862194-17743-1-git-send-email-ben.dooks@codethink.co.uk> Add a proper of match id for use when the device is being bound via device tree, to avoid having to use the i2c old-style binding of the device. Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk> --- Since original submission: - Fixed of_match_table typo --- drivers/media/i2c/adv7180.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/drivers/media/i2c/adv7180.c b/drivers/media/i2c/adv7180.c index 821178d..46e47a0 100644 --- a/drivers/media/i2c/adv7180.c +++ b/drivers/media/i2c/adv7180.c @@ -25,6 +25,7 @@ #include <linux/interrupt.h> #include <linux/i2c.h> #include <linux/slab.h> +#include <linux/of.h> #include <media/v4l2-ioctl.h> #include <linux/videodev2.h> #include <media/v4l2-device.h> @@ -710,11 +711,21 @@ static SIMPLE_DEV_PM_OPS(adv7180_pm_ops, adv7180_suspend, adv7180_resume); MODULE_DEVICE_TABLE(i2c, adv7180_id); +#ifdef CONFIG_OF +static const struct of_device_id adv7180_of_id[] = { + { .compatible = "adi,adv7180", }, + { }, +}; + +MODULE_DEVICE_TABLE(of, adv7180_of_id) +#endif + static struct i2c_driver adv7180_driver = { .driver = { .owner = THIS_MODULE, .name = KBUILD_MODNAME, .pm = ADV7180_PM_OPS, + .of_match_table = of_match_ptr(adv7180_of_id), }, .probe = adv7180_probe, .remove = adv7180_remove, -- 2.0.0
next prev parent reply other threads:[~2014-06-15 19:56 UTC|newest] Thread overview: 36+ messages / expand[flat|nested] mbox.gz Atom feed top 2014-06-15 19:56 RFC: new soc_camera/rcar_vin patch series Ben Dooks 2014-06-15 19:56 ` Ben Dooks 2014-06-15 19:56 ` [PATCH 1/9] ARM: lager: enable i2c devices Ben Dooks 2014-06-15 19:56 ` Ben Dooks 2014-06-16 12:29 ` Sergei Shtylyov 2014-06-16 12:29 ` Sergei Shtylyov 2014-06-15 19:56 ` [PATCH 2/9] ARM: lager: add i2c1, i2c2 pins Ben Dooks 2014-06-15 19:56 ` Ben Dooks 2014-06-16 12:33 ` Sergei Shtylyov 2014-06-16 12:33 ` Sergei Shtylyov 2014-06-18 7:27 ` Ben Dooks 2014-06-18 7:27 ` Ben Dooks 2014-06-18 7:31 ` Simon Horman 2014-06-18 7:31 ` Simon Horman 2014-06-15 19:56 ` [PATCH 3/9] adv7180: Remove duplicate unregister call Ben Dooks 2014-06-15 19:56 ` Ben Dooks 2014-06-15 19:56 ` Ben Dooks [this message] 2014-06-15 19:56 ` [PATCH 4/9] adv7180: add of match table Ben Dooks 2014-06-15 19:56 ` [PATCH 5/9] rcar_vin: copy flags from pdata Ben Dooks 2014-06-15 19:56 ` Ben Dooks 2014-06-15 19:56 ` [PATCH 6/9] rcar_vin: add devicetree support Ben Dooks 2014-06-15 19:56 ` Ben Dooks 2014-06-15 19:56 ` [PATCH 7/9] soc_camera: add support for dt binding soc_camera drivers Ben Dooks 2014-06-15 19:56 ` Ben Dooks 2014-06-19 7:28 ` Guennadi Liakhovetski 2014-06-19 7:28 ` Guennadi Liakhovetski 2014-06-23 21:05 ` Ben Dooks 2014-06-23 21:05 ` Ben Dooks 2014-06-15 19:56 ` [PATCH 8/9] r8a7790.dtsi: add vin[0-3] nodes Ben Dooks 2014-06-15 19:56 ` Ben Dooks 2014-06-15 19:56 ` [PATCH 9/9] ARM: lager: add vin1 node Ben Dooks 2014-06-15 19:56 ` Ben Dooks 2014-06-17 19:02 ` Sergei Shtylyov 2014-06-17 19:02 ` Sergei Shtylyov 2014-06-15 19:59 ` [Linux-kernel] RFC: new soc_camera/rcar_vin patch series Ben Dooks 2014-06-15 19:59 ` Ben Dooks
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=1402862194-17743-5-git-send-email-ben.dooks@codethink.co.uk \ --to=ben.dooks@codethink.co.uk \ --cc=g.liakhovetski@gmx.de \ --cc=horms@verge.net.au \ --cc=ian.molton@codethink.co.uk \ --cc=linux-kernel@lists.codethink.co.uk \ --cc=linux-media@vger.kernel.org \ --cc=linux-sh@vger.kernel.org \ --cc=magnus.damm@opensource.se \ --cc=robert.jarzmik@free.fr \ --cc=william.towle@codethink.co.uk \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.