From patchwork Wed Apr 16 12:32:09 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Poddar, Sourav" X-Patchwork-Id: 4000551 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 83E11BFF02 for ; Wed, 16 Apr 2014 12:35:29 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id B2A4920304 for ; Wed, 16 Apr 2014 12:35:28 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id E5621202FF for ; Wed, 16 Apr 2014 12:35:27 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1WaP1X-0003fa-Cz; Wed, 16 Apr 2014 12:33:07 +0000 Received: from devils.ext.ti.com ([198.47.26.153]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1WaP1K-0003X7-QG for linux-arm-kernel@lists.infradead.org; Wed, 16 Apr 2014 12:32:55 +0000 Received: from dlelxv90.itg.ti.com ([172.17.2.17]) by devils.ext.ti.com (8.13.7/8.13.7) with ESMTP id s3GCWRAA016271; Wed, 16 Apr 2014 07:32:27 -0500 Received: from DFLE72.ent.ti.com (dfle72.ent.ti.com [128.247.5.109]) by dlelxv90.itg.ti.com (8.14.3/8.13.8) with ESMTP id s3GCWRuG017191; Wed, 16 Apr 2014 07:32:27 -0500 Received: from dflp33.itg.ti.com (10.64.6.16) by DFLE72.ent.ti.com (128.247.5.109) with Microsoft SMTP Server id 14.3.174.1; Wed, 16 Apr 2014 07:32:27 -0500 Received: from ula0131647.india.ti.com (ileax41-snat.itg.ti.com [10.172.224.153]) by dflp33.itg.ti.com (8.14.3/8.13.8) with ESMTP id s3GCWEIS030225; Wed, 16 Apr 2014 07:32:24 -0500 From: Sourav Poddar To: , , , , , Subject: [PATCH 2/5] w1: omap_hdq: Add compatible property for omap hdq driver. Date: Wed, 16 Apr 2014 18:02:09 +0530 Message-ID: <1397651532-31456-3-git-send-email-sourav.poddar@ti.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1397651532-31456-1-git-send-email-sourav.poddar@ti.com> References: <1397651532-31456-1-git-send-email-sourav.poddar@ti.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140416_053254_947550_437E9301 X-CRM114-Status: UNSURE ( 9.49 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -5.7 (-----) Cc: Sourav Poddar , linux-omap@vger.kernel.org, balbi@ti.com, linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Add compatible property for omap hdq driver. Signed-off-by: Sourav Poddar --- .../devicetree/bindings/hdq1w/omap_hdq.txt | 20 ++++++++++++++++++++ drivers/w1/masters/omap_hdq.c | 8 ++++++++ 2 files changed, 28 insertions(+) create mode 100644 Documentation/devicetree/bindings/hdq1w/omap_hdq.txt diff --git a/Documentation/devicetree/bindings/hdq1w/omap_hdq.txt b/Documentation/devicetree/bindings/hdq1w/omap_hdq.txt new file mode 100644 index 0000000..a7e011e --- /dev/null +++ b/Documentation/devicetree/bindings/hdq1w/omap_hdq.txt @@ -0,0 +1,20 @@ +HDQ/1w for OMAP platforms + +Required properties : +- compatible : Must be "ti,am43xx-hdq". +- ti,hwmods : Must be "hdq1w". +- reg: Should contain register location and length. +- interrupts: Should contain interrupt. +- clock: Clock input to HDQ1w controller. + +Example: + + hdq: hdq@48347000 { + compatible = "ti,am43xx-hdq"; + reg = <0x48347000 0x1000>; + interrupts = ; + clocks = <&func_12m_clk>; + clock-names = "fck"; + ti,hwmods = "hdq1w"; + status = "disabled"; + }; diff --git a/drivers/w1/masters/omap_hdq.c b/drivers/w1/masters/omap_hdq.c index 0a7bf7f..ec36bee 100644 --- a/drivers/w1/masters/omap_hdq.c +++ b/drivers/w1/masters/omap_hdq.c @@ -17,6 +17,7 @@ #include #include #include +#include #include "../w1.h" #include "../w1_int.h" @@ -73,11 +74,18 @@ struct hdq_data { static int omap_hdq_probe(struct platform_device *pdev); static int omap_hdq_remove(struct platform_device *pdev); +static const struct of_device_id omap_hdq_dt_match[] = { + { .compatible = "ti,am43xx-hdq"}, + {}, +}; +MODULE_DEVICE_TABLE(of, omap_hdq_dt_match); + static struct platform_driver omap_hdq_driver = { .probe = omap_hdq_probe, .remove = omap_hdq_remove, .driver = { .name = "omap_hdq", + .of_match_table = of_match_ptr(omap_hdq_dt_match), }, };