From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1422666AbcFCUl3 (ORCPT ); Fri, 3 Jun 2016 16:41:29 -0400 Received: from mail-pf0-f170.google.com ([209.85.192.170]:35092 "EHLO mail-pf0-f170.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S964790AbcFCUlH (ORCPT ); Fri, 3 Jun 2016 16:41:07 -0400 Date: Fri, 3 Jun 2016 13:41:04 -0700 From: Brian Norris To: Boris Brezillon Cc: Thierry Reding , linux-pwm@vger.kernel.org, Mark Brown , Liam Girdwood , Heiko Stuebner , linux-rockchip@lists.infradead.org, Rob Herring , Pawel Moll , Mark Rutland , Ian Campbell , Kumar Gala , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Milo Kim , Doug Anderson , Caesar Wang , Stephen Barber , Ajit Pal Singh , Srinivas Kandagatla , Maxime Coquelin , Patrice Chotard , kernel@stlinux.com Subject: Re: [PATCH 09/14] regulator: pwm: Adjust PWM config at probe time Message-ID: <20160603204104.GG124478@google.com> References: <1464942192-25967-1-git-send-email-boris.brezillon@free-electrons.com> <1464942192-25967-10-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: <1464942192-25967-10-git-send-email-boris.brezillon@free-electrons.com> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jun 03, 2016 at 10:23:07AM +0200, Boris Brezillon wrote: > The PWM attached to a PWM regulator device might have been previously > configured by the bootloader. > Make sure the bootloader and linux config are in sync, and adjust the PWM > config if that's not the case. > > Signed-off-by: Boris Brezillon > Acked-by: Mark Brown > --- > drivers/regulator/pwm-regulator.c | 8 +++----- > 1 file changed, 3 insertions(+), 5 deletions(-) > > diff --git a/drivers/regulator/pwm-regulator.c b/drivers/regulator/pwm-regulator.c > index ab3cc02..524b43f 100644 > --- a/drivers/regulator/pwm-regulator.c > +++ b/drivers/regulator/pwm-regulator.c > @@ -285,11 +285,9 @@ static int pwm_regulator_probe(struct platform_device *pdev) > return ret; > } > > - /* > - * FIXME: pwm_apply_args() should be removed when switching to the > - * atomic PWM API. > - */ > - pwm_apply_args(drvdata->pwm); > + ret = pwm_adjust_config(drvdata->pwm); > + if (ret) > + return ret; > > regulator = devm_regulator_register(&pdev->dev, > &drvdata->desc, &config); Acked-by: Brian Norris Tested-by: Brian Norris