Received: by 2002:a05:6a10:d5a5:0:0:0:0 with SMTP id gn37csp3914050pxb; Mon, 4 Oct 2021 12:30:26 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxrOo34trF3Gp1i/IjGpofX3wgPsMmdBAzMSrLPfIjFO9nJF17ffWi4oK2P1ALLMsoEOKrV X-Received: by 2002:a17:902:e806:b0:13e:45b4:2a4 with SMTP id u6-20020a170902e80600b0013e45b402a4mr1295694plg.23.1633375826306; Mon, 04 Oct 2021 12:30:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1633375826; cv=none; d=google.com; s=arc-20160816; b=z6qqdTi6cyVeKctbkh0O9nxJSfKeJEcZn7aziTm69XCGybmrYIMIgANHajg6IB4qIk tYIprI3IlhqLf8qNPFY9NGWfm1mmjfxTX7SSmvHnObVFsxoljrdPoJAtQPzxuVOKi+WG V0m0761+KA19eGITIypOGTO1XadU1a3PWIbD1iC6FpEimSwS00YZhVyfezjdLhCB3kkC Qmn3ly/mGjUlJRdldmyaRd5jxTfkzrQy7kWX5cNggsUKQMuQp/R5rSuJ+pCllqZeu+Sz 3gxmE5ld5veEAjeHu6z7A4k751i3QCZaAVJ6uPxCg8uT7mk38jbyuE+xwPJ/7dJwXRH4 Apwg== 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 :references:in-reply-to:message-id:date:subject:cc:to:from; bh=7wDSU1oaf/+Yepug4gS4GFpmCxoomRD2hqBWikCWBRA=; b=w0EeRVQWRJc5ZP7WxQNzF31zkPfUy31Q8BGZ7gfo0vusqJtV9QHkTtfpgU+9lVIKZM PEq99ddOVSHl/H7krAe6bETbFsD8W4R+oLrRY7A6FlNgotJ4ZKZRd9kuH8nXPctFYzXQ bPHwkjMn3REDYGFUwErRzMSIFxDpLY3x2MiFS1TJ3edQU+ePnXUM8QrKIDSrusa/48Me oiQak3wyxGKX3VcbI01n7AV9m8zSVoeQkxFkqpqpq8/K14HzCpeCGsxBdN6nIK4ktRWz lfcGoIUBgl2U6DKYSoKKqH/8Hi4I+FItGcLvVHFDp4uUlDNQYX6bm9Mv+YhA+NcmaWze Vy/g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id qe14si21672829pjb.112.2021.10.04.12.30.13; Mon, 04 Oct 2021 12:30:26 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239069AbhJDT3q (ORCPT + 99 others); Mon, 4 Oct 2021 15:29:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36602 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238990AbhJDT3k (ORCPT ); Mon, 4 Oct 2021 15:29:40 -0400 Received: from relay01.th.seeweb.it (relay01.th.seeweb.it [IPv6:2001:4b7a:2000:18::162]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 48EEAC061745 for ; Mon, 4 Oct 2021 12:27:51 -0700 (PDT) Received: from Marijn-Arch-PC.localdomain (94-209-165-62.cable.dynamic.v4.ziggo.nl [94.209.165.62]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by m-r1.th.seeweb.it (Postfix) with ESMTPSA id 4EE141F6A8; Mon, 4 Oct 2021 21:27:49 +0200 (CEST) From: Marijn Suijten To: phone-devel@vger.kernel.org, Andy Gross , Bjorn Andersson , Lee Jones , Daniel Thompson , Jingoo Han Cc: ~postmarketos/upstreaming@lists.sr.ht, AngeloGioacchino Del Regno , Konrad Dybcio , Martin Botka , Jami Kettunen , Pavel Dubrova , Marijn Suijten , Kiran Gunda , Courtney Cavin , Bryan Wu , linux-arm-msm@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-fbdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 07/10] backlight: qcom-wled: Provide enabled_strings default for wled 4 and 5 Date: Mon, 4 Oct 2021 21:27:38 +0200 Message-Id: <20211004192741.621870-8-marijn.suijten@somainline.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20211004192741.621870-1-marijn.suijten@somainline.org> References: <20211004192741.621870-1-marijn.suijten@somainline.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Only wled 3 sets a sensible default that allows operating this driver with just qcom,num-strings in the DT; wled 4 and 5 require qcom,enabled-strings to be provided otherwise enabled_strings remains zero-initialized, resuling in every string-specific register write (currently only the setup and config functions, brightness follows in a future patch) to only configure the zero'th string multiple times. Signed-off-by: Marijn Suijten Reviewed-by: AngeloGioacchino Del Regno --- drivers/video/backlight/qcom-wled.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/video/backlight/qcom-wled.c b/drivers/video/backlight/qcom-wled.c index 9ec1bdd374d2..f143b2563bfe 100644 --- a/drivers/video/backlight/qcom-wled.c +++ b/drivers/video/backlight/qcom-wled.c @@ -1077,6 +1077,7 @@ static const struct wled_config wled4_config_defaults = { .cabc = false, .external_pfet = false, .auto_detection_enabled = false, + .enabled_strings = {0, 1, 2, 3}, }; static int wled5_setup(struct wled *wled) @@ -1190,6 +1191,7 @@ static const struct wled_config wled5_config_defaults = { .cabc = false, .external_pfet = false, .auto_detection_enabled = false, + .enabled_strings = {0, 1, 2, 3}, }; static const u32 wled3_boost_i_limit_values[] = { -- 2.33.0