Message ID | 20231125200519.1750-2-ddrokosov@salutedevices.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:ce62:0:b0:403:3b70:6f57 with SMTP id o2csp2134495vqx; Sat, 25 Nov 2023 12:06:46 -0800 (PST) X-Google-Smtp-Source: AGHT+IGhSkO/nw9/1ZaYBuRyqX251tvXzvWkFuB5GpcUG+82/y9ZmfprhAEvxPqM/ymiIpu9Bt59 X-Received: by 2002:a17:90b:1e4b:b0:280:99f0:4234 with SMTP id pi11-20020a17090b1e4b00b0028099f04234mr6903354pjb.7.1700942805687; Sat, 25 Nov 2023 12:06:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700942805; cv=none; d=google.com; s=arc-20160816; b=mPdor8mgqr+051dqkR+vMYdpjCjFbEOpwmkW6U3Fdlu6j8acOsC5qVQLgHvUw+9Fjm FctuKnFQmv44kSVLssmKeFjGdEohPzsS7S8jezvBHNA67gM45RGaYGS9YVMRn5J30GrL 1nM7KuKRS+R2i4cZMWDyGuiTg9weS8TCCg0dJRuBGbNEW6dxsOm9YU6WcOydRwqVzioN uO1YVmkeRQmdse0O0wFqkgHYE1crXgioGNR5e1wTw6BapueMaTWEdu4oebCduk7bPk10 werDd/kDTaKMFF/BMqpbw9Q5L2OZrY2aX6xl7QF83kPneo/SNcjsfaA3Q5nHFHgDnnFc DRCA== 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 :dkim-signature:dkim-filter; bh=zn+S/RI+VLG0sC38068gPmLqXKUSbREudqkWjxnsPFY=; fh=kDlMvdXjJ67as7fXJwQpX4exlPqtmzTL4elpL9Zbjrk=; b=mkwWrSYE8iGwyM0nDydYiIJ33/1CJjkCCTxVGacOTqvHxvRhsjLs4IB671CSqvKhgp Te5pk9SGgzKEEzI0STlIKhUVI/4NxOkdFPPdLniNSUGzAD5DvH2dNbd1vmh+w/YUXOqv +t1klFO2CQdj5FmgXx/eX8gx2GMcVcDye3dC7n347IU8avb+vP6SvzgZDWj2swZT1Xx4 3IQiBmhDlgm+YKntbsS89z1jWgkr0dmLjrQ+QGkkBZ0L0sFapqxXyj+lo/BamcqeeKa8 uqP6O+j9mDy1SYVgV4X6V42NJSKQREGm5PJu3u1vOY+esfFJ7NOrAyZhb/jnu4VGZMKu DZog== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@salutedevices.com header.s=mail header.b=Vf3sumlO; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=salutedevices.com Received: from agentk.vger.email (agentk.vger.email. [23.128.96.32]) by mx.google.com with ESMTPS id jj14-20020a170903048e00b001cf688a2854si6223816plb.371.2023.11.25.12.06.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 25 Nov 2023 12:06:45 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) client-ip=23.128.96.32; Authentication-Results: mx.google.com; dkim=pass header.i=@salutedevices.com header.s=mail header.b=Vf3sumlO; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=salutedevices.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id 47AF8807C854; Sat, 25 Nov 2023 12:05:43 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231659AbjKYUF3 (ORCPT <rfc822;kernel.ruili@gmail.com> + 99 others); Sat, 25 Nov 2023 15:05:29 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54798 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229456AbjKYUFZ (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Sat, 25 Nov 2023 15:05:25 -0500 Received: from mx1.sberdevices.ru (mx1.sberdevices.ru [37.18.73.165]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4AC62133; Sat, 25 Nov 2023 12:05:30 -0800 (PST) Received: from p-infra-ksmg-sc-msk01 (localhost [127.0.0.1]) by mx1.sberdevices.ru (Postfix) with ESMTP id D24D510001F; Sat, 25 Nov 2023 23:05:27 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.sberdevices.ru D24D510001F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=salutedevices.com; s=mail; t=1700942727; bh=zn+S/RI+VLG0sC38068gPmLqXKUSbREudqkWjxnsPFY=; h=From:To:Subject:Date:Message-ID:MIME-Version:Content-Type:From; b=Vf3sumlOgZWhlZy1PHPNxhCcH7oNJzqTz0K9ICC5PboBhNpBJExGtrL7T5KzCyMdT QUoDPm6hSaEoNRciaq0dNp+OVPwjvZViGk8anpjq4RwfZCNAJC4WnOzc2DJ0njyvxF sdMrtEydHigjPwpDiNU2F/vZf4QauenuGxdOJKg+Y0GL7E+0vCjF00R+wMNrDi+mSz Mdxlyc6j4VEC4JNNCtX2QusgiEu1vwgz1e7+kw779jysPC/WqHW1QW4ckR7gK8P1Rv CSogETZkTxr9Y08f31BrauTrSA7a4vIYj2R1g0vZbSaAmKE5sE9j4aPWXP5/5evizj ZUz7eWpd0bFbA== Received: from p-i-exch-sc-m01.sberdevices.ru (p-i-exch-sc-m01.sberdevices.ru [172.16.192.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.sberdevices.ru (Postfix) with ESMTPS; Sat, 25 Nov 2023 23:05:27 +0300 (MSK) Received: from localhost.localdomain (100.64.160.123) by p-i-exch-sc-m01.sberdevices.ru (172.16.192.107) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.40; Sat, 25 Nov 2023 23:05:27 +0300 From: Dmitry Rokosov <ddrokosov@salutedevices.com> To: <lee@kernel.org>, <pavel@ucw.cz>, <robh+dt@kernel.org>, <krzysztof.kozlowski+dt@linaro.org>, <conor+dt@kernel.org>, <andy.shevchenko@gmail.com> CC: <kernel@sberdevices.ru>, <rockosov@gmail.com>, <devicetree@vger.kernel.org>, <linux-kernel@vger.kernel.org>, <linux-leds@vger.kernel.org>, Martin Kurbanov <mmkurbanov@salutedevices.com>, Dmitry Rokosov <ddrokosov@salutedevices.com> Subject: [PATCH v5 01/11] leds: aw200xx: fix write to DIM parameter Date: Sat, 25 Nov 2023 23:05:09 +0300 Message-ID: <20231125200519.1750-2-ddrokosov@salutedevices.com> X-Mailer: git-send-email 2.36.0 In-Reply-To: <20231125200519.1750-1-ddrokosov@salutedevices.com> References: <20231125200519.1750-1-ddrokosov@salutedevices.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [100.64.160.123] X-ClientProxiedBy: p-i-exch-sc-m02.sberdevices.ru (172.16.192.103) To p-i-exch-sc-m01.sberdevices.ru (172.16.192.107) X-KSMG-Rule-ID: 10 X-KSMG-Message-Action: clean X-KSMG-AntiSpam-Lua-Profiles: 181593 [Nov 25 2023] X-KSMG-AntiSpam-Version: 6.0.0.2 X-KSMG-AntiSpam-Envelope-From: ddrokosov@salutedevices.com X-KSMG-AntiSpam-Rate: 0 X-KSMG-AntiSpam-Status: not_detected X-KSMG-AntiSpam-Method: none X-KSMG-AntiSpam-Auth: dkim=none X-KSMG-AntiSpam-Info: LuaCore: 4 0.3.4 720d3c21819df9b72e78f051e300e232316d302a, {Tracking_from_domain_doesnt_match_to}, p-i-exch-sc-m01.sberdevices.ru:7.1.1,5.0.1;127.0.0.199:7.1.2;d41d8cd98f00b204e9800998ecf8427e.com:7.1.1;100.64.160.123:7.1.2;salutedevices.com:7.1.1, FromAlignment: s, ApMailHostAddress: 100.64.160.123 X-MS-Exchange-Organization-SCL: -1 X-KSMG-AntiSpam-Interceptor-Info: scan successful X-KSMG-AntiPhishing: Clean X-KSMG-LinksScanning: Clean X-KSMG-AntiVirus: Kaspersky Secure Mail Gateway, version 2.0.1.6960, bases: 2023/11/25 18:32:00 #22537065 X-KSMG-AntiVirus-Status: Clean, skipped X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.vger.email Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (agentk.vger.email [0.0.0.0]); Sat, 25 Nov 2023 12:05:43 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1783567803641430955 X-GMAIL-MSGID: 1783567803641430955 |
Series |
leds: aw200xx: several driver updates
|
|
Commit Message
Dmitry Rokosov
Nov. 25, 2023, 8:05 p.m. UTC
From: Martin Kurbanov <mmkurbanov@salutedevices.com> If write only DIM value to the page 4, LED brightness will not be updated, as both DIM and FADE need to be written to the page 4. Therefore, write DIM to the page 1. Fixes: 36a87f371b7a ("leds: Add AW20xx driver") Signed-off-by: Martin Kurbanov <mmkurbanov@salutedevices.com> Signed-off-by: Dmitry Rokosov <ddrokosov@salutedevices.com> Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com> --- drivers/leds/leds-aw200xx.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/drivers/leds/leds-aw200xx.c b/drivers/leds/leds-aw200xx.c index ef4eda6a09ee..842a22087b16 100644 --- a/drivers/leds/leds-aw200xx.c +++ b/drivers/leds/leds-aw200xx.c @@ -74,6 +74,10 @@ #define AW200XX_LED2REG(x, columns) \ ((x) + (((x) / (columns)) * (AW200XX_DSIZE_COLUMNS_MAX - (columns)))) +/* DIM current configuration register on page 1 */ +#define AW200XX_REG_DIM_PAGE1(x, columns) \ + AW200XX_REG(AW200XX_PAGE1, AW200XX_LED2REG(x, columns)) + /* * DIM current configuration register (page 4). * The even address for current DIM configuration. @@ -153,7 +157,8 @@ static ssize_t dim_store(struct device *dev, struct device_attribute *devattr, if (dim >= 0) { ret = regmap_write(chip->regmap, - AW200XX_REG_DIM(led->num, columns), dim); + AW200XX_REG_DIM_PAGE1(led->num, columns), + dim); if (ret) goto out_unlock; }