Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp2888988imm; Mon, 10 Sep 2018 07:55:42 -0700 (PDT) X-Google-Smtp-Source: ANB0VdaqqMmk+x5nQCprCXV0UVvD8HAWiSytjHbl38xsGqTatFP1gXbQeVIIXmilmarJplPet7tW X-Received: by 2002:a62:b604:: with SMTP id j4-v6mr24195519pff.199.1536591341933; Mon, 10 Sep 2018 07:55:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536591341; cv=none; d=google.com; s=arc-20160816; b=FRe6Um57e84Tz43fch+S489ZWdiA8G4iIrsn3hIMcZrDe6V5nh8xLZaOeb/gvTGlde +glaSL5kPWrDA+BS/JUhx8dAXHSfKOn9IA4cOYkrGvgpL05cuwJaMYtPjDxZjWDAlSAa akCz4jmRc2k3nLm1nbY6DY8WvxuYnDstJgQnVBedNd23jfkEjQj1W47ScwYh2X0Z/y8m J2ug8eqAez1rZpZ7lgmdJdjz6ra/mazbLtwXXGN3hsYt4gnLcYlJqX4hU8e1VRRxywEv ORR7WJ5AdsB9uE+6LFLkrO5KjR2btJPYQO8sOsQYPBJpHKmXrUntBxqDABcj12et7ty7 lcwQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=Zg+Bc9D6pdjVcNUuxFbL72qXTYGy3Rcy/0hzdZFwqOQ=; b=oLILCw/RKpGmBUlNfJF2Vdn68U4D2nZhALKJ2TxQEDGQcvAATcznW5k5n+QbJbU5wd YxTFZqKGLtXEGBKyIMWUi2EvreOu4xUKAu4l4sT2D+AoP8wfsrwAqFNR+Ph3Hbe684z8 xxJHex7PwB4/BUFK8ul+VmKy7R656k2X907w2hHMFP2w0TOY4oshFOXXWbcUPlNpwPsf RXuRcZJnwBgu46cnK7/Y9tFtcbklI9tqPer4nvFko1trNpxoMVog799Y6yfdWtFYEX0d 95f72sYzH3Y4ZMgoVIlcAabtFlPFQBeK9Nvp4Ejauak5VHmEYEYHpSt+5mMjpFJBibCc N30Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=GCRwkVSl; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p6-v6si17261539pfh.266.2018.09.10.07.54.55; Mon, 10 Sep 2018 07:55:41 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=GCRwkVSl; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728825AbeIJToJ (ORCPT + 99 others); Mon, 10 Sep 2018 15:44:09 -0400 Received: from mail-wm0-f67.google.com ([74.125.82.67]:51163 "EHLO mail-wm0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728282AbeIJToI (ORCPT ); Mon, 10 Sep 2018 15:44:08 -0400 Received: by mail-wm0-f67.google.com with SMTP id s12-v6so21890259wmc.0 for ; Mon, 10 Sep 2018 07:49:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=Zg+Bc9D6pdjVcNUuxFbL72qXTYGy3Rcy/0hzdZFwqOQ=; b=GCRwkVSlSR3rBrramBnvlK/60GHkeJgMMkRbcvTUVlVtce0HlXhEwtLIfW385j91VO uBa5OfG1ZJL2JLWoRnEGCV+wCgSnO6TwCiToTLzsQKvNfa/IcDegO73Sdb5CkejooBnK lxofpxZK2oSe7Y/S2f32Nusf6+/FMOotuOHb8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to:user-agent; bh=Zg+Bc9D6pdjVcNUuxFbL72qXTYGy3Rcy/0hzdZFwqOQ=; b=VSmRP5RAnWESPChmU4TrcwU8+64TXlKTupVwBml+vnTfpMOLTcTqFT1pIt7uCMI/Rk Vm0q0RA0VLy+PhgA2hc9PiyQ5761tyOwYXurG/yurXrAMO3joDE7ndAGFLHdKzacUn7u gTvEHLMlH9KyUWCGzto5WACTOiCDsp8/iv5ivJdtj66mabsEmijUhuPIrRWDs10x/Vd0 XfN1/xT8Sogq+e1eF57NqnckzItEvv2VqCPP42R0Iq/tePgVBGRELQRmzE9xrVdEIFCt 6j1H1BMyoMd6p8G2rIjXbitMizGNfC+Ri2mvVte52Ltr1bdyPZKGFsURCHhJYmFD12pT yMQg== X-Gm-Message-State: APzg51ApvwKjzSuZZQQiOZR8ieh3xKZQBSOtTIpemb7tREBL8aY7DnzY jTVLuiAstRkRiNeIR7JM3mlA3g== X-Received: by 2002:a1c:4007:: with SMTP id n7-v6mr992223wma.108.1536590967381; Mon, 10 Sep 2018 07:49:27 -0700 (PDT) Received: from dell ([2.27.167.7]) by smtp.gmail.com with ESMTPSA id k63-v6sm19811089wmd.46.2018.09.10.07.49.25 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 10 Sep 2018 07:49:26 -0700 (PDT) Date: Mon, 10 Sep 2018 15:49:24 +0100 From: Lee Jones To: Enric Balletbo i Serra Cc: linux-kernel@vger.kernel.org, kernel@collabora.com, cl@rock-chips.com, linux-pwm@vger.kernel.org, linux-fbdev@vger.kernel.org, Daniel Thompson , Thierry Reding , Bartlomiej Zolnierkiewicz , dri-devel@lists.freedesktop.org, Jingoo Han Subject: Re: [PATCH v3] backlight: pwm_bl: switch to using "atomic" PWM API Message-ID: <20180910144924.GU28860@dell> References: <20180814165059.13219-1-enric.balletbo@collabora.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20180814165059.13219-1-enric.balletbo@collabora.com> User-Agent: Mutt/1.9.4 (2018-02-28) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 14 Aug 2018, Enric Balletbo i Serra wrote: > The "atomic" API allows us to configure PWM period and duty_cycle and > enable it in one call. > > The patch also moves the pwm_init_state just before any use of the > pwm_state struct, this fixes a potential bug where pwm_get_state > can be called before pwm_init_state. > > Signed-off-by: Enric Balletbo i Serra > --- > > Changes in v3: > - Get rid of duty_cycle variable from pwm_backlight_update_status. > - Get rid of pb->enabled and use only the status.enabled variable. > - Make power_on match power_off. > - Do not share status between ...update_status and ...power_on > > Changes in v2: > - Do not force the PWM be off in the first call to pwm_apply_state. > - Delayed applying the state until we know what the period is. > - Removed pb->period as after the conversion is not needed. > > drivers/video/backlight/pwm_bl.c | 81 +++++++++++++++++--------------- > 1 file changed, 42 insertions(+), 39 deletions(-) Applied, thanks. -- Lee Jones [李琼斯] Linaro Services Technical Lead Linaro.org │ Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog