Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755822Ab3FVJrr (ORCPT ); Sat, 22 Jun 2013 05:47:47 -0400 Received: from mail-pb0-f47.google.com ([209.85.160.47]:52171 "EHLO mail-pb0-f47.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752775Ab3FVJrp (ORCPT ); Sat, 22 Jun 2013 05:47:45 -0400 From: Prabhakar Lad To: Mauro Carvalho Chehab , LMML , Hans Verkuil , Laurent Pinchart Cc: DLOS , LKML , Grant Likely , Rob Herring , Rob Landley , devicetree-discuss@lists.ozlabs.org, linux-doc@vger.kernel.org, "Lad, Prabhakar" Subject: [PATCH 2/2] media: i2c: ths8200: add OF support Date: Sat, 22 Jun 2013 15:16:35 +0530 Message-Id: <1371894395-14414-3-git-send-email-prabhakar.csengg@gmail.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1371894395-14414-1-git-send-email-prabhakar.csengg@gmail.com> References: <1371894395-14414-1-git-send-email-prabhakar.csengg@gmail.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1984 Lines: 68 From: "Lad, Prabhakar" add OF support for the ths8200 driver. Signed-off-by: Lad, Prabhakar --- .../devicetree/bindings/media/i2c/ths8200.txt | 19 +++++++++++++++++++ drivers/media/i2c/ths8200.c | 9 +++++++++ 2 files changed, 28 insertions(+) create mode 100644 Documentation/devicetree/bindings/media/i2c/ths8200.txt diff --git a/Documentation/devicetree/bindings/media/i2c/ths8200.txt b/Documentation/devicetree/bindings/media/i2c/ths8200.txt new file mode 100644 index 0000000..285f6ae --- /dev/null +++ b/Documentation/devicetree/bindings/media/i2c/ths8200.txt @@ -0,0 +1,19 @@ +* Texas Instruments THS8200 video encoder + +The ths8200 device is a digital to analog converter used in DVD players, video +recorders, set-top boxes. + +Required Properties : +- compatible : value must be "ti,ths8200" + +Example: + + i2c0@1c22000 { + ... + ... + ths8200@5c { + compatible = "ti,ths8200"; + reg = <0x5c>; + }; + ... + }; diff --git a/drivers/media/i2c/ths8200.c b/drivers/media/i2c/ths8200.c index cc1339a..8a29810 100644 --- a/drivers/media/i2c/ths8200.c +++ b/drivers/media/i2c/ths8200.c @@ -550,10 +550,19 @@ static struct i2c_device_id ths8200_id[] = { }; MODULE_DEVICE_TABLE(i2c, ths8200_id); +#if IS_ENABLED(CONFIG_OF) +static const struct of_device_id ths8200_of_match[] = { + { .compatible = "ti,ths8200", }, + { /* sentinel */ }, +}; +MODULE_DEVICE_TABLE(of, ths8200_of_match); +#endif + static struct i2c_driver ths8200_driver = { .driver = { .owner = THIS_MODULE, .name = "ths8200", + .of_match_table = of_match_ptr(ths8200_of_match), }, .probe = ths8200_probe, .remove = ths8200_remove, -- 1.7.9.5 -- 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/