From patchwork Thu Apr 28 09:32:42 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: ChiYuan Huang X-Patchwork-Id: 12830256 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 02CB6C433EF for ; Thu, 28 Apr 2022 09:34:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:List-Subscribe:List-Help: List-Post:List-Archive:List-Unsubscribe:List-Id:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=8kJX0ix/mGZk5uUso5yrOSBBmsSB4s3Gj9eOUUL7OuY=; b=HhGgwQ924NA7cO hi9KZqyHsEky8V+7JqP2QyyWmczjqqc5adGuFi27FpGNWkeqRj5v1CV2aqhnRevgL3J/zkVY4ESkP Mxyg6ZvJCKOeqsnrGxk5KT0h6BUL0LHgpbR3RBcpa5onBZo7J85EFf/wjLBtfZP02poYKl3fPhWjv SJ5FLCISKD3n2k2ljTWdkOeTmiuMbPHZCN2oDd5k3oOw5Rc+6aoXeaeCwIfc7BvTBTYCJU/pP0URb +UQwBC2t30OGLQVgLzXh9iu6MHvK0/+yuwPc0jmm3tN039p24p8xB8FHO9JZYSsF+d6nM7nKbIgk6 O8lY7AN7A2kY2b5/lbXg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nk0Wf-005k2l-Vp; Thu, 28 Apr 2022 09:33:30 +0000 Received: from mail-pf1-x435.google.com ([2607:f8b0:4864:20::435]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nk0WR-005jxx-St; Thu, 28 Apr 2022 09:33:17 +0000 Received: by mail-pf1-x435.google.com with SMTP id j6so3744366pfe.13; Thu, 28 Apr 2022 02:33:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=Jx2sI9U4OCn+w0obbX5GiL9CUWZWFJnR6/XlVL4TXok=; b=bFBvSiqIfUxsZ8Ums18LxH6niAvg0Lz5mTnbjPoz6e7cc3W40d5Td4P9r4NmpzYzlG pb2pvd/fXNxKbXjjuxJTRfqemXZc5KxQbMZ5Wuk+EUVJrFkJk3ha3u/vUTc8gcDH2ZH4 DYNBWeJ8rGROjMMEZ74Ps4VHWwPSQWgFFGQhUW73O+VsGZpTH8xrRumYjdv5aVujDovW zKdYJPsJ3gw/4mCZrUbNmmJy/mzwVjz8dWSQRaGHn6VmDpfh03IlvxgWESyWPR4FK9Lp 317ZFqDKgDGgi8ciEAnbSuQhGJ9IijVs0u6OI4FyqXw6w9ULSoYT0tsHNkCckiPlaBBO ED6Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=Jx2sI9U4OCn+w0obbX5GiL9CUWZWFJnR6/XlVL4TXok=; b=IRFKaQPINszb2srVQvrRZzMMPSHZXncQNu21mu+lJEoKiXuvZmVkZB+ZkVMiV4vxEQ gK1vMlFjKBE+3dIqrQ0XVwQybdDTbhC4j5bREmKtz7xdUN0SoIFrx0BtPpqDb4PUPpOe MB5VM1IboVcYpjw30Gf6PR8MWmlrZ5nmw/+/97IIT6ZJuYPzRZX1TuAVlYUdcZ2Yvxt1 MBfyJFUI/zRB9fHeUw3NuYGtSEY2TmYcjDnwkVRxL1e38kWzd5TJFL/eQFDqKK3fmxSd LHqqYMIUdrtW4SwR0QHfamz9lJ3fC3tftCUPCfeT94Laz6XnDAO8sKdmc0Tjoh3wM8fX 4tYw== X-Gm-Message-State: AOAM5316W66ntN3V/3iUFJrEnTPLIbqilvrG9W3gUOhVQ8Q0Yrc99ISt 6pmiZ597L5olMwYpYnEPkeM= X-Google-Smtp-Source: ABdhPJzT2s4BUbfVF0ibXJZuFaWAvgA8sAUtMX0axqPQQcd8lpcMQU7X+4fWs802ydw8Yj9CznwA5g== X-Received: by 2002:a63:8943:0:b0:3aa:f1ce:4f24 with SMTP id v64-20020a638943000000b003aaf1ce4f24mr22369940pgd.34.1651138393834; Thu, 28 Apr 2022 02:33:13 -0700 (PDT) Received: from localhost.localdomain ([2402:7500:569:2b1f:d169:337e:6359:8ff7]) by smtp.gmail.com with ESMTPSA id i66-20020a628745000000b0050d36a5fe70sm15457932pfe.127.2022.04.28.02.33.08 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 28 Apr 2022 02:33:12 -0700 (PDT) From: cy_huang To: pavel@ucw.cz, matthias.bgg@gmail.com Cc: cy_huang@richtek.com, jacek.anaszewski@gmail.com, gene_chen@richtek.com, linux-leds@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 1/4] leds: flash: mt6360: Fix the wrong enable_reg in multicolor brightness set Date: Thu, 28 Apr 2022 17:32:42 +0800 Message-Id: <1651138365-17362-2-git-send-email-u0084500@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1651138365-17362-1-git-send-email-u0084500@gmail.com> References: <1651138365-17362-1-git-send-email-u0084500@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220428_023315_970019_6E356E69 X-CRM114-Status: GOOD ( 11.61 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: ChiYuan Huang Fix the wrong enable_reg in multicolor brightness set. Signed-off-by: ChiYuan Huang --- drivers/leds/flash/leds-mt6360.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/leds/flash/leds-mt6360.c b/drivers/leds/flash/leds-mt6360.c index e1066a5..712cd46 100644 --- a/drivers/leds/flash/leds-mt6360.c +++ b/drivers/leds/flash/leds-mt6360.c @@ -115,7 +115,8 @@ static int mt6360_mc_brightness_set(struct led_classdev *lcdev, struct mc_subled *subled = mccdev->subled_info + i; real_bright = min(lcdev->max_brightness, subled->brightness); - ret = regmap_update_bits(priv->regmap, MT6360_REG_ISNK(i), + ret = regmap_update_bits(priv->regmap, + MT6360_REG_ISNK(subled->channel), MT6360_ISNK_MASK, real_bright); if (ret) goto out;