From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.0 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_PASS,USER_AGENT_NEOMUTT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 34FF3C32789 for ; Tue, 6 Nov 2018 20:53:18 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id B248A2086C for ; Tue, 6 Nov 2018 20:53:17 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B248A2086C Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=pengutronix.de Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730827AbeKGGUU (ORCPT ); Wed, 7 Nov 2018 01:20:20 -0500 Received: from metis.ext.pengutronix.de ([85.220.165.71]:53007 "EHLO metis.ext.pengutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726739AbeKGGUT (ORCPT ); Wed, 7 Nov 2018 01:20:19 -0500 Received: from ptx.hi.pengutronix.de ([2001:67c:670:100:1d::c0]) by metis.ext.pengutronix.de with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1gK8LY-0001kq-4l; Tue, 06 Nov 2018 21:53:12 +0100 Received: from ukl by ptx.hi.pengutronix.de with local (Exim 4.89) (envelope-from ) id 1gK8LW-00064r-1R; Tue, 06 Nov 2018 21:53:10 +0100 Date: Tue, 6 Nov 2018 21:53:09 +0100 From: Uwe =?iso-8859-1?Q?Kleine-K=F6nig?= To: Enric Balletbo i Serra Cc: linux-kernel@vger.kernel.org, robert.jarzmik@free.fr, daniel.thompson@linaro.org, lee.jones@linaro.org, kernel@collabora.com, heiko@sntech.de, stable@vger.kernel.org, linux-pwm@vger.kernel.org, linux-fbdev@vger.kernel.org, Thierry Reding , Bartlomiej Zolnierkiewicz , dri-devel@lists.freedesktop.org, Jingoo Han Subject: Re: [PATCH v2] backlight: pwm_bl: Fix brightness levels for non-DT case. Message-ID: <20181106205309.cyiar3rejr6ycunq@pengutronix.de> References: <20181030103441.29145-1-enric.balletbo@collabora.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20181030103441.29145-1-enric.balletbo@collabora.com> User-Agent: NeoMutt/20170113 (1.7.2) X-SA-Exim-Connect-IP: 2001:67c:670:100:1d::c0 X-SA-Exim-Mail-From: ukl@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Oct 30, 2018 at 11:34:41AM +0100, Enric Balletbo i Serra wrote: > Commit '88ba95bedb79 ("backlight: pwm_bl: Compute brightness of LED > linearly to human eye")' allows the possibility to compute a default > brightness table when there isn't the brightness-levels property in the > DT. Unfortunately the changes made broke the pwm backlight for the > non-DT boards. > > Usually, the non-DT boards don't pass the brightness levels via platform > data, instead, it sets the max_brightness in their platform data and the > driver calculates the level without a table. The ofending patch assumed s/ofending/offending/ > hat when there is no brightness levels table we should create one, but this s/hat/that/ > is clearly wrong for the non-DT case. > > After this patch the code handles the DT and the non-DT case taking in > consideration also if max_brightness is set or not. > > Fixes: '88ba95bedb79 ("backlight: pwm_bl: Compute brightness of LED linearly to human eye")' These ' are unusual. Best regards Uwe -- Pengutronix e.K. | Uwe Kleine-König | Industrial Linux Solutions | http://www.pengutronix.de/ |