Received: by 10.223.185.116 with SMTP id b49csp1634744wrg; Wed, 14 Feb 2018 22:06:41 -0800 (PST) X-Google-Smtp-Source: AH8x227CwVBKVxYoNXHnRCs4TXISo5q8G8QnOo9pg3nB2oV/K/ej0PDpIJ0Ey2OW4ABA+vkZraGk X-Received: by 2002:a17:902:6908:: with SMTP id j8-v6mr1462569plk.211.1518674801603; Wed, 14 Feb 2018 22:06:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1518674801; cv=none; d=google.com; s=arc-20160816; b=PtQ/FFOaLYpubg8D+AnpQXOV8a5o6i6/ucgh7U8yrAP+Sdh16zawGXOIGRkMXsgWRv H5W1Tx8+3tlgVvQK2CF39Po2bYPCW/z0KfM6YOKMaela+zMq29ZF+7Xrv7OjtgcckhE/ DtoUsS255vBUA6CW5OHA1Pn9+mo8EHyVsXPezf7kRxd/9TMQiyZlwrkvMSUnJv0QzJ0m jpLRssbOcxVpdPyWtNhFQY0DA7g/riaXhZSnJ3gp7q3TXaMQniFTOYMPL0/Mk6SRZyn9 bDCha6Jzckx9w++oR0YfXYBn7sb9aBW3W0RP4JRqY1aNGHDz2I/HEb2evyED6yWBdEDn CL3w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature :arc-authentication-results; bh=gODrinrH/xfrkcFFsxBUkUKonX+S6qZk3USBoXcbuis=; b=yaHmlwhozQeds9Tl8Zsy8KJxvrKvQAMjYrxbmIGxbS4CDknGZHULa6uBsESHJSSnKf KRiUE+qW0vDvNIcSPo+vORQnv9xzduti2kd6Ic/Uhgx7o82nzelijTUpASZWPctkbXJZ xzgtEGwcd1MrPl4ZFjfkDSfOFEiTUeOjrJ4hoOxsR6IsIOeT3qPcIQuHkpr2sPJ1x5ao nGT4XSuTKw/jRlEX6kP7fadImBA66l1IvPjBZhe2x3Ds7deUHsRv1wipNsMbrhXIxKLN PZgDny4u9SIwQoexDzhQZOCr8/R9jlp9zK2wJsVh7DAURRx5/tqyhBzr04qBpQzigYkj gN5g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=lNEpfDUK; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s70si991508pgc.244.2018.02.14.22.06.27; Wed, 14 Feb 2018 22:06:41 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=lNEpfDUK; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754914AbeBOGEk (ORCPT + 99 others); Thu, 15 Feb 2018 01:04:40 -0500 Received: from fllnx210.ext.ti.com ([198.47.19.17]:63836 "EHLO fllnx210.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754885AbeBOGEf (ORCPT ); Thu, 15 Feb 2018 01:04:35 -0500 Received: from dflxv15.itg.ti.com ([128.247.5.124]) by fllnx210.ext.ti.com (8.15.1/8.15.1) with ESMTP id w1F63WX0025435; Thu, 15 Feb 2018 00:03:32 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ti.com; s=ti-com-17Q1; t=1518674612; bh=XAA7/xTQ2p1dDRJXL9slGTfEppuA+FqxcXQN9paj4TY=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=lNEpfDUKQNDWEONsSv1qU7u9tBiViwJ5rHggZgpl0Y1xulaLj8wNvPugVo3Bx45qv NWLZotMEFj3Kfr42kcbmLF0n+aonPlhAm76sBiVay+QzPV3GqjhBKVQr5c0SnOq7NC vSOd6e0qfE4UhXupaig6qouw8MLr5AvBU+oHd+us= Received: from DFLE115.ent.ti.com (dfle115.ent.ti.com [10.64.6.36]) by dflxv15.itg.ti.com (8.14.3/8.13.8) with ESMTP id w1F63W9A030908; Thu, 15 Feb 2018 00:03:32 -0600 Received: from DFLE107.ent.ti.com (10.64.6.28) by DFLE115.ent.ti.com (10.64.6.36) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1261.35; Thu, 15 Feb 2018 00:03:31 -0600 Received: from dlep32.itg.ti.com (157.170.170.100) by DFLE107.ent.ti.com (10.64.6.28) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.1261.35 via Frontend Transport; Thu, 15 Feb 2018 00:03:32 -0600 Received: from ula0393675.india.ti.com (ileax41-snat.itg.ti.com [10.172.224.153]) by dlep32.itg.ti.com (8.14.3/8.13.8) with ESMTP id w1F62uf6020364; Thu, 15 Feb 2018 00:03:27 -0600 From: Keerthy To: , , , CC: , , , , , , , , , , , , Subject: [PATCH v11 06/10] timer-ti-dm: Add timer ops to the platform data structure Date: Thu, 15 Feb 2018 11:31:47 +0530 Message-ID: <1518674511-26421-7-git-send-email-j-keerthy@ti.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1518674511-26421-1-git-send-email-j-keerthy@ti.com> References: <1518674511-26421-1-git-send-email-j-keerthy@ti.com> MIME-Version: 1.0 Content-Type: text/plain X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Add timer ops to the platform data structure Signed-off-by: Keerthy Reviewed-by: Sebastian Reichel Tested-by: Ladislav Michl --- include/linux/platform_data/dmtimer-omap.h | 38 ++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/include/linux/platform_data/dmtimer-omap.h b/include/linux/platform_data/dmtimer-omap.h index a19b78d..757a0f9 100644 --- a/include/linux/platform_data/dmtimer-omap.h +++ b/include/linux/platform_data/dmtimer-omap.h @@ -20,12 +20,50 @@ #ifndef __PLATFORM_DATA_DMTIMER_OMAP_H__ #define __PLATFORM_DATA_DMTIMER_OMAP_H__ +struct omap_dm_timer_ops { + struct omap_dm_timer *(*request_by_node)(struct device_node *np); + struct omap_dm_timer *(*request_specific)(int timer_id); + struct omap_dm_timer *(*request)(void); + + int (*free)(struct omap_dm_timer *timer); + + void (*enable)(struct omap_dm_timer *timer); + void (*disable)(struct omap_dm_timer *timer); + + int (*get_irq)(struct omap_dm_timer *timer); + int (*set_int_enable)(struct omap_dm_timer *timer, + unsigned int value); + int (*set_int_disable)(struct omap_dm_timer *timer, u32 mask); + + struct clk *(*get_fclk)(struct omap_dm_timer *timer); + + int (*start)(struct omap_dm_timer *timer); + int (*stop)(struct omap_dm_timer *timer); + int (*set_source)(struct omap_dm_timer *timer, int source); + + int (*set_load)(struct omap_dm_timer *timer, int autoreload, + unsigned int value); + int (*set_match)(struct omap_dm_timer *timer, int enable, + unsigned int match); + int (*set_pwm)(struct omap_dm_timer *timer, int def_on, + int toggle, int trigger); + int (*set_prescaler)(struct omap_dm_timer *timer, int prescaler); + + unsigned int (*read_counter)(struct omap_dm_timer *timer); + int (*write_counter)(struct omap_dm_timer *timer, + unsigned int value); + unsigned int (*read_status)(struct omap_dm_timer *timer); + int (*write_status)(struct omap_dm_timer *timer, + unsigned int value); +}; + struct dmtimer_platform_data { /* set_timer_src - Only used for OMAP1 devices */ int (*set_timer_src)(struct platform_device *pdev, int source); u32 timer_capability; u32 timer_errata; int (*get_context_loss_count)(struct device *); + const struct omap_dm_timer_ops *timer_ops; }; #endif /* __PLATFORM_DATA_DMTIMER_OMAP_H__ */ -- 1.9.1