From patchwork Mon Jan 23 16:06:13 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: AngeloGioacchino Del Regno X-Patchwork-Id: 4406 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp1696360wrn; Mon, 23 Jan 2023 08:23:29 -0800 (PST) X-Google-Smtp-Source: AMrXdXurqsuyMw479wTW0lx1XWi91UfmU/bZQ5+FXCi4eNLToHBj8YvEqgUNMe94TBWRdi28svHq X-Received: by 2002:a05:6402:18c:b0:48b:c8de:9d1a with SMTP id r12-20020a056402018c00b0048bc8de9d1amr25443709edv.37.1674491009620; Mon, 23 Jan 2023 08:23:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1674491009; cv=none; d=google.com; s=arc-20160816; b=J/WtcVPIQHBsY9MnUms6qR6zy9Bz9KJXSsQSLwR/8EO8mptgclqN4v/FmaNEJciL/Z vWME+Nd6DpFj/soSZUT3kSVTcwMLhYEpGdyOwpfxmQIx+rQ/56KD9fgnrWHJ/6rb22Za GDRzApGKDX5kISUkUzVKgd76dd1VYkuuYWEro/hK9wwGfDcqCtB2SjPFtSQ0w+V2zHB1 chlbq3JLnJHyRWuofZX4AoFrEDY8aitQK863w17roQrO7inqgMGytBUVZYHUJghwEJ6w bpyQk8of+OysAwu0bmxsrUHN7r099LAgY85SFITCEhml18M8xEj467rM7xIu6bxNPg36 sZ+A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=1d5ojnmia1Y4CLSFeMu2wE+MLDW3yZPfv1hdEIVgr0A=; b=hpXQ+D50YUkE/nmaBoSDZl8StSvZvQSxP+FTCZ5mKKnenDREHIqOd/Ig+zG1E05oo+ l/ojoaZuDlYI0zt8PJuRAlukB5nTZBeJbtBjbJZyUkGcK7sBFvT2YKVzj63uiehytaKf fR7Yytxsd3oPwmNl5TMmZuUB8ICMT+FZiS9KbjLpJezmb+Zwhrz/yWnHIwP0VANdRLaT SxpPw1a6H07QQofUnB+4XoPjhmrCFi0y3QfWkT5R5Tpo39DrHAn1hfx1Cpte7Z4JmMzV FRrS7VWvTXd3+rdYRFIKIOc2H9Z5+k34JMwLaoPG1WEprcBGxf9CKcm/UUTltvqFqYlB 3vEA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b="et/J8I8v"; 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=NONE dis=NONE) header.from=collabora.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id bb2-20020a1709070a0200b0085d2e6b7fdasi44459873ejc.935.2023.01.23.08.23.06; Mon, 23 Jan 2023 08:23:29 -0800 (PST) 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=@collabora.com header.s=mail header.b="et/J8I8v"; 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=NONE dis=NONE) header.from=collabora.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232525AbjAWQG1 (ORCPT + 99 others); Mon, 23 Jan 2023 11:06:27 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42316 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231615AbjAWQGY (ORCPT ); Mon, 23 Jan 2023 11:06:24 -0500 Received: from madras.collabora.co.uk (madras.collabora.co.uk [IPv6:2a00:1098:0:82:1000:25:2eeb:e5ab]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A58C87A80; Mon, 23 Jan 2023 08:06:22 -0800 (PST) Received: from IcarusMOD.eternityproject.eu (2-237-20-237.ip236.fastwebnet.it [2.237.20.237]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: kholk11) by madras.collabora.co.uk (Postfix) with ESMTPSA id 8B09B6602E19; Mon, 23 Jan 2023 16:06:20 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1674489981; bh=cQC3SstRN0i+rvAOG3ydA4+K6fOMQx+oZJ/RtdVRVpw=; h=From:To:Cc:Subject:Date:From; b=et/J8I8vWx34O+uyFxgCXVxZQYlkSJwYerq+782D+3/vyLydpK1LW4NJB/MnGYvja 7daHL7g9uGu7Au5vdVrI1rEt/2BxZQJftUU9huccAqA/zkuxNL3NaFB7U3t71m6+7X remb2zKawD6ZiKN9yHZ5OlyZMj89MPlgM0ie0eRUOFL+DSnkapAv5f/rKNptT4rSPU 9MI5H82KP3vuc0Cl1uGq9GsJLBs14ZQrKpo7uVlfSaFWdupWrEN0Bw3POWWfLScqS8 9UScJ4m1cKEEmJbXafsKxWZ+4tajbM6imq4Kf0eepjqT2tlFy2KR8tVD5AyF3SqIsY ec2HzgVzl99QQ== From: AngeloGioacchino Del Regno To: thierry.reding@gmail.com Cc: u.kleine-koenig@pengutronix.de, matthias.bgg@gmail.com, weiqing.kong@mediatek.com, jitao.shi@mediatek.com, linux-pwm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org, kernel@collabora.com, AngeloGioacchino Del Regno Subject: [PATCH 0/2] pwm: mtk-disp: Fix backlight configuration at boot Date: Mon, 23 Jan 2023 17:06:13 +0100 Message-Id: <20230123160615.375969-1-angelogioacchino.delregno@collabora.com> X-Mailer: git-send-email 2.39.0 MIME-Version: 1.0 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1755831085064936843?= X-GMAIL-MSGID: =?utf-8?q?1755831085064936843?= Since the pwm-mtk-disp driver was fixed to get PWM_EN state from the right register, an old two-wrongs-make-one-right issue emerged: as a result, MT8192 Asurada Spherion got no backlight at boot unless a suspend/resume cycle was performed. Also, the backlight would sometimes not get updated with the requested value, requiring the user to change it back and forth until it worked. This series fixes both of the aforementioned issues found on MT8192. AngeloGioacchino Del Regno (2): pwm: mtk-disp: Disable shadow registers before setting backlight values pwm: mtk-disp: Configure double buffering before reading in .get_state() drivers/pwm/pwm-mtk-disp.c | 34 +++++++++++++++++++++++----------- 1 file changed, 23 insertions(+), 11 deletions(-) Tested-by: Adrian Ratiu