Message ID | 20231121202835.28152-2-ddrokosov@salutedevices.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:2b07:b0:403:3b70:6f57 with SMTP id io7csp896985vqb; Tue, 21 Nov 2023 12:29:17 -0800 (PST) X-Google-Smtp-Source: AGHT+IHII8LVBnIyejXA4VDEzSnWabcm11yZIKSzG5GYdEMh6iPxGpykO2IJiXNHQLYEXpePc8xW X-Received: by 2002:a17:902:a510:b0:1cf:6900:6714 with SMTP id s16-20020a170902a51000b001cf69006714mr528915plq.9.1700598557128; Tue, 21 Nov 2023 12:29:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700598557; cv=none; d=google.com; s=arc-20160816; b=U+Gjzg69A1z0+mqFMiHLXIsJA9LdHD357d8s9Cj/DjYAq+959G4VXdgBLy0OSj2oLC 94MovXY58RrveFdu1fFqReSLQ5i5geQdpOZW0ufl6YuVxoc4EzEzc+oIF9+cGrRBS4IR 17u1mZLOxYv7YLtXdR64n2gBL/pP03LZ1/14cXIPpYWdzCgFFTZgIJmGdztnRI5Nu0hL nHAROjLc6k7Hen5hoFGWNS/itrh5ezOsg9nMMor8nK/I2+4nxuaocSR1mveT4f6Vkg/Q YiWe6HhQKun5MpBx52YpjKlhYfr2cPp5JLKrxfI9taZmt81joSRT1+WLwrw5Uz46n5E6 30TQ== 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=TsSFYNyr+qoUBw7DRIDgw/BslXmhZ5hoKWIiFL3fwXAr8fCQ6mSW8Toom3rzczWuqY 0x5rY4Fk9h0RVtDpfokoHvlHPpJHLaFbMrrjwC3jf9TdLaNideQXXFa6kzJbw+lRG/xf WLdaJpTIZT61CKaxHAtQkvjxqP8V5Y9/lRyTIJsz1lqr2o0KFCP3PSkaRzsAaPeTTL55 YAzXNUEIyDVUo+d05zNeZZKePKZgjWtGhnW3tXAzWFO8ByuduYb6cU/bwu2ZHxK1erru aAaD9YHBbIj9ckGv4wXFp1WAWfuLzUy9wBFSuXvjfg0LY7/yf1yP3Ni9G0p0i2L5Me97 EGsQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@salutedevices.com header.s=mail header.b=k8JIheH9; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 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. [2620:137:e000::3:2]) by mx.google.com with ESMTPS id j9-20020a17090276c900b001c35864fdbbsi10637131plt.406.2023.11.21.12.29.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 Nov 2023 12:29:17 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) client-ip=2620:137:e000::3:2; Authentication-Results: mx.google.com; dkim=pass header.i=@salutedevices.com header.s=mail header.b=k8JIheH9; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 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 7630C8023187; Tue, 21 Nov 2023 12:29:05 -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 S234023AbjKUU3C (ORCPT <rfc822;ouuuleilei@gmail.com> + 99 others); Tue, 21 Nov 2023 15:29:02 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60510 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229524AbjKUU3A (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Tue, 21 Nov 2023 15:29:00 -0500 Received: from mx1.sberdevices.ru (mx1.sberdevices.ru [37.18.73.165]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A2A8C1A1; Tue, 21 Nov 2023 12:28:51 -0800 (PST) Received: from p-infra-ksmg-sc-msk01 (localhost [127.0.0.1]) by mx1.sberdevices.ru (Postfix) with ESMTP id 37CDB100062; Tue, 21 Nov 2023 23:28:49 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.sberdevices.ru 37CDB100062 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=salutedevices.com; s=mail; t=1700598529; bh=zn+S/RI+VLG0sC38068gPmLqXKUSbREudqkWjxnsPFY=; h=From:To:Subject:Date:Message-ID:MIME-Version:Content-Type:From; b=k8JIheH9zf/SSZQmKEjs4sIgztOQsz3BmVHgXMMkicVFPVHcACknikwohxJ3gdDYf SytqKWOvJumo5gg3ZP8+Om4L+NHEcyNdraybFBTSJQD4HUWPPq78aIh3LQieUEAU0K X1oORlrRVwTgXLNALk1KZS2lbrxuV9ffhxf+Cwukn5n2UG0JNJLJCleSQ3kUduV8xV YIKdZAMXsWHF5G75zVfVDvWFtkvvqLIGAfKr2b0IiCHDHPzh7XjURBd6PcqZVU7ueY 1T11bu/kXJY5xYasHndZchryDRv08+jBxQ/B8Z0L1GUfKPROL+wmToJ+a8vDAOL5qC KEeXL5mf/ZL3Q== 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; Tue, 21 Nov 2023 23:28:49 +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; Tue, 21 Nov 2023 23:28:48 +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 v4 01/11] leds: aw200xx: fix write to DIM parameter Date: Tue, 21 Nov 2023 23:28:25 +0300 Message-ID: <20231121202835.28152-2-ddrokosov@salutedevices.com> X-Mailer: git-send-email 2.36.0 In-Reply-To: <20231121202835.28152-1-ddrokosov@salutedevices.com> References: <20231121202835.28152-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-m01.sberdevices.ru (172.16.192.107) 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: 181514 [Nov 21 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: 3 0.3.3 e5c6a18a9a9bff0226d530c5b790210c0bd117c8, {Tracking_from_domain_doesnt_match_to}, p-i-exch-sc-m01.sberdevices.ru:5.0.1,7.1.1;salutedevices.com:7.1.1;d41d8cd98f00b204e9800998ecf8427e.com:7.1.1;127.0.0.199:7.1.2;100.64.160.123:7.1.2, 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/21 17:47:00 #22495004 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]); Tue, 21 Nov 2023 12:29:06 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1783206832363081443 X-GMAIL-MSGID: 1783206832363081443 |
Series |
leds: aw200xx: several driver updates
|
|
Commit Message
Dmitry Rokosov
Nov. 21, 2023, 8:28 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; }