Received: by 10.223.185.116 with SMTP id b49csp264119wrg; Tue, 13 Feb 2018 21:24:06 -0800 (PST) X-Google-Smtp-Source: AH8x2244BLA9YzESgdy7DYIZlr1S3i6Gdj7NAb+gzHO7sxoZsaoB82FLNBoX2HdPSHorom+8k7MW X-Received: by 10.101.80.69 with SMTP id k5mr2976156pgo.431.1518585846377; Tue, 13 Feb 2018 21:24:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1518585846; cv=none; d=google.com; s=arc-20160816; b=w63gGgAVW/K/l+aFsDXPLlvc6IMkwNKAEMOyPWkpJ0L8mXDBdScHexg6ZoZlW9s2Hb JMq6+7OIBhC/lszMGEYtW1dIUcZjK8gdwEOE/oroRVsAgo7CMGyhfkIMrcqbMUF9Ds+a bzwWAVv8Z2FDwtSWB5rZaxCmXGZn5mKkEIpDxHMQVYradfY8xVa9zS8jlpPi6pYPItrG fqYkaY2lp7TYflnD9UAC2eEvZKNCr4uibNucQ10rptNeKPzP5JA2IlySOkx3Rsf3/DcS /GM/Mm1fon3+/1ahLjh6pNHfkMtSMV6Y3vEr+Wt8wHZRXjhSy88g3DnHmplymIR9X4sf gzYQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature :arc-authentication-results; bh=EMFZL/6/fwxifJz+1pKmf/aWKo2BIl61SRS9T+JVqvg=; b=GqsINchPEgZphUW+PjKBYj/AQC7iH7VOi5ulNIIopPvRl5b830W+9MG2zpCUVK9k4K QP8jjO8OfISwn0o9lXQPV5+okX3TjNXTuvjuKhmA0vCSyZbGjYOSYbhDLluLqr4D5AIv EuZjhtM+YOu66f5m43Xh0Khq0J0oDaEOBv0G9SAYRa0fMb6mH37Eaxwd9L02n69S3rjt /onNsKqGCycGU009/QCQlhOijZFK83o5Irav80yn4IEqqHEudvPUfEuVlDZdl/+HwZ0z UCWF3auA8MJIotLyxNkShBr4nAKhjJMI4H7WHsbk+dmQPEFPd+YNj4muVM5XBcI5pu9Z +kSw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=Tm76n4Rm; 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 e6-v6si793311plt.123.2018.02.13.21.23.39; Tue, 13 Feb 2018 21:24:06 -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=Tm76n4Rm; 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 S1751533AbeBNFVo (ORCPT + 99 others); Wed, 14 Feb 2018 00:21:44 -0500 Received: from lelnx194.ext.ti.com ([198.47.27.80]:56802 "EHLO lelnx194.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751198AbeBNFVm (ORCPT ); Wed, 14 Feb 2018 00:21:42 -0500 Received: from dflxv15.itg.ti.com ([128.247.5.124]) by lelnx194.ext.ti.com (8.15.1/8.15.1) with ESMTP id w1E5L7TA013673; Tue, 13 Feb 2018 23:21:07 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ti.com; s=ti-com-17Q1; t=1518585667; bh=EINdLrqKhqVf2usiKxVlUjHtjALCG0jb0MsV6J4Uexk=; h=Subject:To:CC:References:From:Date:In-Reply-To; b=Tm76n4Rmj/w5gYl/2uIDwkjX/sVMPGjwb7yljX93aw3RWKpLVXsfEfQlD8rl+77H+ q9byFgbC+uNj1+SC3JSZ1wimq70t5VIOYLri9/kLb15ny1ldjQozTveFLJ2LmudqgX kUlBM6BlzDcIuPk/n44CG/fwGNxlYgUo8uucss7Y= Received: from DLEE109.ent.ti.com (dlee109.ent.ti.com [157.170.170.41]) by dflxv15.itg.ti.com (8.14.3/8.13.8) with ESMTP id w1E5L70h003112; Tue, 13 Feb 2018 23:21:07 -0600 Received: from DLEE106.ent.ti.com (157.170.170.36) by DLEE109.ent.ti.com (157.170.170.41) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1261.35; Tue, 13 Feb 2018 23:21:07 -0600 Received: from dflp33.itg.ti.com (10.64.6.16) by DLEE106.ent.ti.com (157.170.170.36) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.1261.35 via Frontend Transport; Tue, 13 Feb 2018 23:21:07 -0600 Received: from [172.24.191.45] (ileax41-snat.itg.ti.com [10.172.224.153]) by dflp33.itg.ti.com (8.14.3/8.13.8) with ESMTP id w1E5L1Mg006919; Tue, 13 Feb 2018 23:21:02 -0600 Subject: Re: [PATCH v7 5/9] dmtimer: Add timer ops to the platform data structure To: Suman Anna , "daniel.lezcano@linaro.org" , "thierry.reding@gmail.com" , "tony@atomide.com" , "aaro.koskinen@iki.fi" CC: "linux-pwm@vger.kernel.org" , "ladis@linux-mips.org" , "narmstrong@baylibre.com" , "linux-kernel@vger.kernel.org" , "Kristo, Tero" , "robh+dt@kernel.org" , "sebastian.reichel@collabora.co.uk" , "Strashko, Grygorii" , "linux-omap@vger.kernel.org" , "Claudiu.Beznea@microchip.com" , "linux-arm-kernel@lists.infradead.org" References: <1515478987-5786-1-git-send-email-j-keerthy@ti.com> <1515478987-5786-6-git-send-email-j-keerthy@ti.com> From: Keerthy Message-ID: <23a83979-e0d9-85b6-5a34-1c293362420e@ti.com> Date: Wed, 14 Feb 2018 10:51:01 +0530 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset="utf-8" Content-Language: en-US Content-Transfer-Encoding: 7bit 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 On Tuesday 13 February 2018 08:16 AM, Suman Anna wrote: > On 01/09/2018 12:23 AM, J, KEERTHY wrote: >> 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..a3e1794 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); > Have you looked into collapsing this into the set_source() option above > for OMAP1? Looks like the only reason the pdev is needed is for > retrieving the pdev id, which is also stored in the omap_dm_timer structure? I would prefer not to touch the mach-omap1 part as part of this migration series. I will revisit this once the migration is done. > >> u32 timer_capability; >> u32 timer_errata; >> int (*get_context_loss_count)(struct device *); >> + struct omap_dm_timer_ops *timer_ops; > > Any reason why this is not a const? We don't expect this to change right. Yes this can be. > > regards > Suman > >> }; >> >> #endif /* __PLATFORM_DATA_DMTIMER_OMAP_H__ */ >> -- >> 1.9.1 >> >> >> _______________________________________________ >> linux-arm-kernel mailing list >> linux-arm-kernel@lists.infradead.org >> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel >> >