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 gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 0A698C5AD7B for ; Mon, 10 Aug 2026 12:39:58 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 010EA10E800; Mon, 10 Aug 2026 12:39:57 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=kemnade.info header.i=@kemnade.info header.b="ZxFDaqfH"; dkim-atps=neutral Received: from mail.andi.de1.cc (mail.andi.de1.cc [178.238.236.174]) by gabe.freedesktop.org (Postfix) with ESMTPS id B706510E800 for ; Mon, 10 Aug 2026 12:39:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=kemnade.info; s=20220719; h=References:In-Reply-To:Subject:Cc:To:From: Reply-To:Content-ID:Content-Description; bh=RY/1wmCxCIFM0LLRBnTLXmBpxbfVg0FeVcj6W7X9LH0=; t=1786365595; x=1787575195; b=ZxFDaqfHUWso+x87bZKPCkNiinXFySvHQx8T6+I6Hoy5DOWeGMHoAzReaZJOFzK/NgikUPkK1/f eNVI36CIvCqrnvX5mwMq2Dn54QlQu9CsEgJOrgM++3KQ0WFjkUHhVY4ofqbzcLc+SL+WvHFuG6yv/ 3BqszX+lKmgTa2qx/CkSI4h4o58G1uZ8FJFwYb3uvzn56ayLGRHnD09hHXYvHGBM5QDYEzv4tuQEO FfYRRK5iFY6zYGpMUFwXE+2JaWY4RS6ZQBqNVvum3fhp5/mkB4n+uovU1ikjq8l0rOjtP/O9Iw+wv yM3Et0arJlz0lDoeN7RTk4ZgOJD+Io/cfVGA==; Date: Mon, 10 Aug 2026 14:39:14 +0200 From: Andreas Kemnade To: "H. Nikolaus Schaller" Cc: Daniel Thompson , Grond , Stefan Leichter , Grazvydas Ignotas , Tony Lindgren , Ethan Nelson-Moore , Jarkko Nikula , Sascha Hauer , Lee Jones , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Liam Girdwood , Mark Brown , Aaro Koskinen , Kevin Hilman , Roger Quadros , Russell King , Jingoo Han , Helge Deller , Jaroslav Kysela , Takashi Iwai , Sen Wang , Richard Fitzgerald , Arnd Bergmann , Srinivas Kandagatla , Kuninori Morimoto , Charles Keepax , Niranjan H Y , letux-kernel@openphoenux.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-sound@vger.kernel.org, linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org, dri-devel@lists.freedesktop.org, linux-fbdev@vger.kernel.org, kernel@pyra-handheld.com, mfd@lists.linux.dev Subject: Re: [PATCH 15/16] backlight: remove pandora_bl Message-ID: <20260810143914.64d29a5c@kemnade.info> In-Reply-To: References: X-Mailer: Claws Mail 4.3.1 (GTK 3.24.49; aarch64-unknown-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" On Mon, 10 Aug 2026 12:45:16 +0200 "H. Nikolaus Schaller" wrote: > Hi Daniel, > > > Am 10.08.2026 um 12:35 schrieb Daniel Thompson : > > > > On Sat, Jul 11, 2026 at 08:02:02AM +0200, H. Nikolaus Schaller wrote: > >> Retire the platform specific pandora backlight driver since > >> it can now be replaced by twl_pm and device tree. > >> > >> Signed-off-by: H. Nikolaus Schaller > > > > Yay! > > > > Reviewed-by: Daniel Thompson (RISCstar) > > Well, there were some good comments by Sahiko to the prerequisites of this patch, > because it has one speciality the PWM BL driver does not handle (avoid > interpretation of PWM signals as W1 protocol). > > I haven't found time to work on this, so we can't remove this yet. > > In the end it may either remain a pandora_bl driver (converted to DT) > or become a patch for something else. > But then it is a TPS61161 on top of PWM, not a pandora driver. And then there might be just a quirk for that chip in the pwm_bl using triggered by a compatible. I guess the quirk is this: if (priv->old_state == PANDORABL_WAS_OFF) { - /* - * set PWM duty cycle to max. TPS61161 seems to use this - * to calibrate it's PWM sensitivity when it starts. - */ - twl_i2c_write_u8(TWL_MODULE_PWM, MAX_VALUE, TWL_PWM0_OFF); - - /* first enable clock, then PWM0 out */ - twl_i2c_read_u8(TWL4030_MODULE_INTBR, &r, TWL_INTBR_GPBR1); - r &= ~PWM0_ENABLE; - r |= PWM0_CLK_ENABLE; - twl_i2c_write_u8(TWL4030_MODULE_INTBR, r, TWL_INTBR_GPBR1); - r |= PWM0_ENABLE; - twl_i2c_write_u8(TWL4030_MODULE_INTBR, r, TWL_INTBR_GPBR1); - - /* - * TI made it very easy to enable digital control, so easy that - * it often triggers unintentionally and disabes PWM control, - * so wait until 1 wire mode detection window ends. - */ - usleep_range(2000, 10000); - } Regards, Andreas