Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp6873764iob; Wed, 11 May 2022 07:11:03 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwNdn2GN+Akjy6Dyp+A+nwqYxt2sT37O9E57WS2iLTj23qGigKT3iJa6pcywBn+tqX0EzSa X-Received: by 2002:a05:6402:e99:b0:41d:11f2:85e0 with SMTP id h25-20020a0564020e9900b0041d11f285e0mr28830852eda.339.1652278263076; Wed, 11 May 2022 07:11:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652278263; cv=none; d=google.com; s=arc-20160816; b=Gm8n0GGRP2GonUceqCs6A2neCoGa+lS7JPU7TfELnZvPouTgM2CvGJLWmhXv0VsOQb bcViDM7q/JGnuFYu7UCTyOvsgCOtXuyz+ii3iE1SYT9hoyIpMt0uCI/yD83BGUmOyLrd +KDQ6DWt4KRj0jv5jN1hM3AF3SWNlIxCqvYplTHnDmdc9TE9PY9IW/b05LkHQ9BlaiqB hPYZRTI3dsgofPKQNSg01h7jCn1Ol3rGZVbyOEiHAsUsItC+hIyDJydvUs5wglGzQUwk /RFRfRAj0g45HX8XXR5zt1U9KbgUvuv9R4iR8MOutfs75nGj6kM/S6K9VSCHxX6zkL+C pVig== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=Q1H3ona0oTbz59kwRqd1lHBTp5NjIu/8z9f9BOfETVU=; b=N3Y2MlslNbyppEqXuyayi0pmJNFNbqWEyw0rCr08FLOKgXQ9lrmyOxoOzcQz6BA7jN XUBqZn6w2hj8FvcaAJ5+AzOd0FlgZBC/K/y7k04eEvMqMG0yHrRAkxLF62KoS2/fP59t b4qj/mnt6/nlfMKJ0GWvqQm5GFnFDR03YKqXkIZCsupL1AjKMO4GjN4L27h4e3thfHAT a7CGT7Kv8gdqjIE/JT/wy0wjboZ72xxtdD2RA6ag3sFBJJVkhaEeONB76khG6Dl2AG1u kp/47/hXps3YwavtdcO5CvdP6T8NOrQlpefl2S7shOlL9MzXlai33ultw5f6TwNRRd98 rPXQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=DXOECGjz; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id sc39-20020a1709078a2700b006e86bb4999esi2703176ejc.976.2022.05.11.07.10.35; Wed, 11 May 2022 07:11:03 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=DXOECGjz; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243663AbiEKNct (ORCPT + 99 others); Wed, 11 May 2022 09:32:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35558 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233423AbiEKNcs (ORCPT ); Wed, 11 May 2022 09:32:48 -0400 Received: from mail-lj1-x22e.google.com (mail-lj1-x22e.google.com [IPv6:2a00:1450:4864:20::22e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5C8EDAFAED; Wed, 11 May 2022 06:32:46 -0700 (PDT) Received: by mail-lj1-x22e.google.com with SMTP id 16so2581837lju.13; Wed, 11 May 2022 06:32:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=Q1H3ona0oTbz59kwRqd1lHBTp5NjIu/8z9f9BOfETVU=; b=DXOECGjzG3bszrjtO/ceGDZrjGl18l8sUxJKu8RYByebsRn/x60DklA5x0HzSBI0/D zywozP4Jmgx3fSCY00Oyz0t48qLY+nAHBzT8nX8drKQsoBDNbn16l2HHRueHPNmzzWfD zu7mLaiu8p6J/ppEl+rKcYp/5E9E83E3Cidh9nWYhhz5JpzEpoM91BBuiYgkscLIr2W1 GRPm3RtIWeoVjkj9RlLLrwonPMVC8Dadhr6P8WUsgCLz7bf+L58USaw0uWOqvfFQyevG jia6wei/wDVmVI5JbK6GvfgsA7mDrXhNHnpz29uw9aKOphbBEB78nolexhEyciWukAx3 DA6g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=Q1H3ona0oTbz59kwRqd1lHBTp5NjIu/8z9f9BOfETVU=; b=Oa/f6nR4ryIToQ6KAQM/LLmxTJUoG8vOvGQxyhGcef5UaVKfG7dxMxTX5WD816m2S2 nSZs43ZNDYO75dIgqSAPGyQQn5bIQwdDk6C8C1RloIQSyhhIFnbRpQuAeYSVmjZLqFSL uHzyzNuhsixKTzqOaqZXrLnXQP3s2BNpSv6u/3RXwLDy90aXxrRLBO3K/H2PKVvr+C5T YoGLqXhxQIhCQko+EniL2ChBAOLx2tFrNz+Ht0NoBuhkKwBcFk4ley7gZsAE7uUMlSAo jazsMsLuthODP99wtwAKKME5lVAXnICeAfx2OyqfMyITZ8Gk8T/N47bq4m8gBMwfWRVr Seaw== X-Gm-Message-State: AOAM533Ib1p/HjBElktJtcyeFlEkIghsfGf1+GZxTPr9ZZLgULRiftyl Aai+aNgGGl8DGEW23W0yycxWJJ2/lgmWxTMeWkTryUVxSbU= X-Received: by 2002:a2e:a889:0:b0:24f:19df:46ef with SMTP id m9-20020a2ea889000000b0024f19df46efmr17332743ljq.110.1652275964464; Wed, 11 May 2022 06:32:44 -0700 (PDT) MIME-Version: 1.0 References: <20220511115911.54960-1-max.oss.09@gmail.com> <20220511115911.54960-4-max.oss.09@gmail.com> In-Reply-To: From: Max Krummenacher Date: Wed, 11 May 2022 15:32:33 +0200 Message-ID: Subject: Re: [PATCH v2 3/4] ARM: dts: imx6qdl-colibri: backlight pwm: Simplify inverted backlight To: Fabio Estevam Cc: Max Krummenacher , Krzysztof Kozlowski , NXP Linux Team , Pengutronix Kernel Team , Rob Herring , Sascha Hauer , Shawn Guo , "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , "moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE" , linux-kernel Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Fabio On Wed, May 11, 2022 at 2:07 PM Fabio Estevam wrote: > > On Wed, May 11, 2022 at 8:59 AM Max Krummenacher wrote: > > > backlight: backlight { > > compatible = "pwm-backlight"; > > - brightness-levels = <0 127 191 223 239 247 251 255>; > > - default-brightness-level = <1>; > > + brightness-levels = <0 4 8 16 32 64 128 255>; > > + default-brightness-level = <6>; > > In this patch, you are still changing the brightness levels + passing > the polarity. > > I would suggest that this patch only touches the PWM polarity. I disagree. Just setting the invert without at the same changing the brightness-levels does change the user experience way more than when one adapts the available duty cycles at the same time. With the change to use the PWM with inverted polarity the PWM signals is inverted to how it was before this patch. Keeping the brightness-levels will then have a big brightness jump from 0 to 127 duty cycle, the other 6 steps will then be barely noticable. I.e. before the change the brightness for level [0..7] was ['off', 128/255, 64/255, 32/255, 16/255, 8/255, 4/255, 'off'], if one only inverts the polarity it will be ['off', 128/255, 191/255, 223/255, 239/255, 247/255, 255/255]. With the proposed patch it will be ['off', 4/255, 8/255, 16/255, 32/255, 64/255, 128/255, 255/255]. Max > The next patch could fix the brightness levels.