From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thierry Reding Subject: Re: [PATCH v5 32/46] pwm: deprecate pwm_config(), pwm_enable() and pwm_disable() Date: Mon, 4 Apr 2016 17:22:54 +0200 Message-ID: <20160404152254.GB17856@ulmo> References: <1459368249-13241-1-git-send-email-boris.brezillon@free-electrons.com> <1459368249-13241-33-git-send-email-boris.brezillon@free-electrons.com> <20160331173858.GB39098@dtor-ws> <20160331205454.630734ab@bbrezillon> Reply-To: thierry.reding-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="kORqDWCi7qDJ0mEj" Return-path: Sender: linux-sunxi-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Content-Disposition: inline In-Reply-To: <20160331205454.630734ab@bbrezillon> List-Post: , List-Help: , List-Archive: , List-Unsubscribe: , To: Boris Brezillon Cc: Dmitry Torokhov , linux-pwm-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Mike Turquette , Stephen Boyd , linux-clk-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Mark Brown , Liam Girdwood , Kamil Debski , lm-sensors-GZX6beZjE8VD60Wz+7aTrA@public.gmane.org, Jean Delvare , Guenter Roeck , linux-input-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Bryan Wu , Richard Purdie , Jacek Anaszewski , linux-leds-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Maxime Ripard , Chen-Yu Tsai , linux-sunxi-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org, Joachim Eastwood , Thomas Petazzoni , Heiko Stuebner , linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org, Jingoo Han , Lee Jones List-Id: linux-input@vger.kernel.org --kORqDWCi7qDJ0mEj Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline On Thu, Mar 31, 2016 at 08:54:54PM +0200, Boris Brezillon wrote: > Hi Dmitry, > > On Thu, 31 Mar 2016 10:38:58 -0700 > Dmitry Torokhov wrote: > > > Hi Boris, > > > > On Wed, Mar 30, 2016 at 10:03:55PM +0200, Boris Brezillon wrote: > > > Prefix those function as deprecated to encourage all existing users to > > > switch to pwm_apply_state(). > > > > Why not keep at least some of them as wrappers where we do not need to > > chnage several parameters at once? It is much easier to have a driver > > do: > > > > error = pwm_enable(pwm); > > if (error) > > ... > > > > rather than declaring the state variable, fectch it, adjust and then > > apply. > > True. Actually deprecating the non-atomic API was not my primary goal. > Thierry would you mind if we keep both APIs around? I'm fine with keeping these around, though purely as shortcuts. If users need to modify two parameters at once (e.g. duty cycle and enable) then they should be converted to use the atomic API, otherwise there'd be little point in introduce it. Thierry --kORqDWCi7qDJ0mEj--