From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alexandre Belloni Subject: Re: [PATCH v3 01/12] pwm: introduce default period and polarity concepts Date: Sat, 7 Nov 2015 03:35:16 +0100 Message-ID: <20151107023516.GB3849@piout.net> References: <1442828009-6241-1-git-send-email-boris.brezillon@free-electrons.com> <1442828009-6241-2-git-send-email-boris.brezillon@free-electrons.com> Reply-To: alexandre.belloni-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Return-path: Content-Disposition: inline In-Reply-To: <1442828009-6241-2-git-send-email-boris.brezillon-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org> List-Post: , List-Help: , List-Archive: , List-Unsubscribe: , To: Boris Brezillon Cc: Thierry Reding , linux-pwm-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Mark Brown , Liam Girdwood , Jingoo Han , Lee Jones , linux-fbdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Bryan Wu , Richard Purdie , Jacek Anaszewski , linux-leds-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Maxime Ripard , linux-sunxi-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org, Heiko Stuebner , linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org, Jean-Christophe Plagniol-Villard , Tomi Valkeinen , Daniel Mack , Haojian Zhuang , Robert Jarzmik , Uwe =?iso-8859-1?Q?Kleine-K=F6nig?= , linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org List-Id: linux-rockchip.vger.kernel.org On 21/09/2015 at 11:33:18 +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 For pwm-sun4i: Reviewed-by: Alexandre Belloni -- Alexandre Belloni, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com