From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751716AbbBMBs0 (ORCPT ); Thu, 12 Feb 2015 20:48:26 -0500 Received: from v094114.home.net.pl ([79.96.170.134]:59622 "HELO v094114.home.net.pl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1751280AbbBMBsZ (ORCPT ); Thu, 12 Feb 2015 20:48:25 -0500 From: "Rafael J. Wysocki" To: Viresh Kumar Cc: Thomas Gleixner , linaro-kernel@lists.linaro.org, linux-kernel@vger.kernel.org, Kevin Hilman , Frederic Weisbecker , Preeti U Murthy , Daniel Lezcano , linaro-networking@linaro.org, peterz@infradead.org Subject: Re: [PATCH v2] clockevents: Introduce mode specific callbacks Date: Fri, 13 Feb 2015 03:11:32 +0100 Message-ID: <1911031.mQ9ZbsnC1C@vostro.rjw.lan> User-Agent: KMail/4.11.5 (Linux/3.19.0+; KDE/4.11.5; x86_64; ; ) In-Reply-To: <792d59a40423f0acffc9bb0bec9de1341a06fa02.1423788565.git.viresh.kumar@linaro.org> References: <792d59a40423f0acffc9bb0bec9de1341a06fa02.1423788565.git.viresh.kumar@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="utf-8" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Friday, February 13, 2015 08:54:56 AM Viresh Kumar wrote: > It is not possible for the clockevents core to know which modes (other than > those with a corresponding feature flag) are supported by a particular > implementation. And drivers are expected to handle transition to all modes > elegantly, as ->set_mode() would be issued for them unconditionally. > > Now, adding support for a new mode complicates things a bit if we want to use > the legacy ->set_mode() callback. We need to closely review all clockevents > drivers to see if they would break on addition of a new mode. And after such > reviews, it is found that we have to do non-trivial changes to most of the > drivers [1]. > > Introduce mode-specific set_mode_*() callbacks, some of which the drivers may or > may not implement. A missing callback would clearly convey the message that the > corresponding mode isn't supported. This is not going to fly AFAICS if you don't say what exacly you need it for. Rafael