From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752008AbbJFKJl (ORCPT ); Tue, 6 Oct 2015 06:09:41 -0400 Received: from down.free-electrons.com ([37.187.137.238]:48502 "EHLO mail.free-electrons.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751112AbbJFKJi (ORCPT ); Tue, 6 Oct 2015 06:09:38 -0400 Date: Tue, 6 Oct 2015 12:09:35 +0200 From: Alexandre Belloni To: Boris Brezillon Cc: Thierry Reding , linux-pwm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Bryan Wu , Richard Purdie , Jacek Anaszewski , linux-leds@vger.kernel.org, Heiko Stuebner , linux-rockchip@lists.infradead.org, Jingoo Han , Lee Jones , linux-fbdev@vger.kernel.org, Mark Brown , Liam Girdwood , Jean-Christophe Plagniol-Villard , Tomi Valkeinen , Doug Anderson , Uwe =?iso-8859-1?Q?Kleine-K=F6nig?= , Maxime Ripard Subject: Re: [PATCH v2 01/10] pwm: introduce default period and polarity concepts Message-ID: <20151006100935.GK2694@piout.net> References: <1437406327-6207-1-git-send-email-boris.brezillon@free-electrons.com> <1437406327-6207-2-git-send-email-boris.brezillon@free-electrons.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1437406327-6207-2-git-send-email-boris.brezillon@free-electrons.com> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 20/07/2015 at 17:31:58 +0200, Boris Brezillon wrote : > When requested by a user, the PWM is assigned a default period and polarity > extracted from the DT, the platform data or statically set by the driver. > Those default values are currently stored in the period and polarity > fields of the pwm_device struct, but they will be stored somewhere else > once we have introduced the architecture allowing for hardware state > retrieval. > > The pwm_set_default_polarity and pwm_set_default_period should only be > used by PWM drivers or the PWM core infrastructure to specify the > default period and polarity values. > > PWM users might call the pwm_get_default_period to query the default > period value. There is currently no helper to query the default > polarity, but it might be added later on if there is a need for it. > > This patch also modifies all the places where the default helpers should > be used in place of the standard ones. > > Signed-off-by: Boris Brezillon Acked-by: Alexandre Belloni -- Alexandre Belloni, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com