From patchwork Thu May 8 06:00:05 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Poddar, Sourav" X-Patchwork-Id: 4133171 Return-Path: X-Original-To: patchwork-linux-omap@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 60CAB9F467 for ; Thu, 8 May 2014 06:00:57 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 99CFD201F9 for ; Thu, 8 May 2014 06:00:56 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id A54932017E for ; Thu, 8 May 2014 06:00:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751549AbaEHGAz (ORCPT ); Thu, 8 May 2014 02:00:55 -0400 Received: from arroyo.ext.ti.com ([192.94.94.40]:44915 "EHLO arroyo.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751103AbaEHGAy (ORCPT ); Thu, 8 May 2014 02:00:54 -0400 Received: from dflxv15.itg.ti.com ([128.247.5.124]) by arroyo.ext.ti.com (8.13.7/8.13.7) with ESMTP id s4860REw029901; Thu, 8 May 2014 01:00:28 -0500 Received: from DFLE72.ent.ti.com (dfle72.ent.ti.com [128.247.5.109]) by dflxv15.itg.ti.com (8.14.3/8.13.8) with ESMTP id s4860R4h027004; Thu, 8 May 2014 01:00: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; Thu, 8 May 2014 01:00:26 -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 s4860Bb7017446; Thu, 8 May 2014 01:00:23 -0500 From: Sourav Poddar To: , , , , , CC: , , , , Sourav Poddar Subject: [PATCHv2 2/5] w1: omap_hdq: Add compatible property for omap hdq driver. Date: Thu, 8 May 2014 11:30:05 +0530 Message-ID: <1399528808-6920-3-git-send-email-sourav.poddar@ti.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1399528808-6920-1-git-send-email-sourav.poddar@ti.com> References: <1399528808-6920-1-git-send-email-sourav.poddar@ti.com> MIME-Version: 1.0 Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Spam-Status: No, score=-7.5 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, 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 ca3623c..97a8412 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), }, };