Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 13749C433EF for ; Fri, 22 Oct 2021 12:34:24 +0000 (UTC) Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 1AE866108D for ; Fri, 22 Oct 2021 12:34:23 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 1AE866108D Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=free.fr Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=lists.denx.de Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 0670C83311; Fri, 22 Oct 2021 14:34:21 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=free.fr Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=free.fr header.i=@free.fr header.b="UmQJuBAD"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 7C908833B1; Fri, 22 Oct 2021 14:34:19 +0200 (CEST) Received: from smtp4-g21.free.fr (smtp4-g21.free.fr [212.27.42.4]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 4031D8326F for ; Fri, 22 Oct 2021 14:34:16 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=free.fr Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=guillaume.gardet@free.fr Received: from zimbra71-e12.priv.proxad.net (unknown [172.20.243.221]) by smtp4-g21.free.fr (Postfix) with ESMTP id 798D419F5B5; Fri, 22 Oct 2021 14:34:15 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=free.fr; s=smtp-20201208; t=1634906055; bh=+zwFyGxgWv+87FE1KPRuLg5ftOXkFBj1uSncY1uTtgc=; h=Date:From:To:Cc:In-Reply-To:Subject:From; b=UmQJuBAD3coU5F57EWAyEJ0QfMhuORQ5YgDjTFFAWgwNW7EDdAAH1kcxD+0CoC3SH 0P3t9AuYWqOkcAi/Wkk+5T5DXYL9GbReGkaflzGz32371GNDA5SPJABk+K51Qzq77V mOTjBVFzKGUANZjnQF1gBDeX/rcL7rGtSod86Sn/Y1q1LxKEARnjEVJC/06bYvoLCd Yx2DYzvY4ZYB13WtiUb/8BzPC60nzhl3UzNq2024HKKjFOmxnSItyKBC+bFZBVEjKN qo6tbAoXlJnMTuwLiLUsYgKG30rRgFb3RL+YUDg4c9B6egTTJkf+MdLD/2WIAugUn1 6D6YYCQl/7foA== Date: Fri, 22 Oct 2021 14:34:15 +0200 (CEST) From: Guillaume GARDET To: Dario Binacchi Cc: Simon Glass , Matthias Brugger , u-boot@lists.denx.de, Akshay Saraswat Message-ID: <692060922.756589396.1634906055430.JavaMail.root@zimbra71-e12.priv.proxad.net> In-Reply-To: <1932683582.85108.1634902680901@mail1.libero.it> Subject: =?utf-8?Q?Re=C2=A0:_Re:_Commit_76c2ff3e_brok?= =?utf-8?Q?e_backlight_on_Chromebook_snow?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Originating-IP: [2a01:e0a:d7:1620:193:f309:92f9:9d16] X-Mailer: Zimbra 7.2.0-GA2598 (zclient/7.2.0-GA2598) X-Authenticated-User: guillaume.gardet@free.fr X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.2 at phobos.denx.de X-Virus-Status: Clean Hi Dario, ----- Dario Binacchi a =C3=A9crit=C2=A0: > Hi Guillaume, >=20 > > Il 21/10/2021 16:47 Guillaume GARDET ha scri= tto: > >=20 > > =20 > > Hi, > >=20 > > Commit 76c2ff3e [0] broke backlight on Chromebook snow. > > A revert on top of 2021.10 restores the backlight. > > Not sure why it breaks on Chromebook snow yet. Dario, any idea how to f= ix this? >=20 > Is it possible that max_level is equal to min_level and therefore divisio= n=20 > by zero is done? I do not think so, because u-boot does not crash and the DTS file has multi= ple levels: https://source.denx.de/u-boot/u-boot/-/blob/master/arch/arm/dts/exynos5250-= snow.dts#L243 I think the problem occurs when 'cur_level =3D=3D max_level', which is also= the default value in the DTS. If I change the default-brightness-level to 6 (instead of 7), then the back= light works again, which would confirm the assumption above. pwm_backlight_set_brightness seems to set cur_level to max value by default= . Maybe the driver thinks there is nothing to do, since current level is al= so the desired level? Cheers, Guillaume >=20 > Thanks and regards, > Dario > >=20 > > Cheers, > > Guillaume