Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp2483099pxj; Mon, 10 May 2021 04:11:01 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy3C0oDE8LXiEuely5nqVMtvSM0D9H6g5oO7m/q+N9bmTuYvRhm0/66APOF3PA1bWrRv+SR X-Received: by 2002:a05:6638:f11:: with SMTP id h17mr20547199jas.102.1620645061783; Mon, 10 May 2021 04:11:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1620645061; cv=none; d=google.com; s=arc-20160816; b=et+NpadUaZBGjWoXM6wObnr1xcc+OauJGC6lGNIEoCRbO1CA5L9cZ08E3vo9+AK0/w 6mljxFQal/bQTjllaHdyfYULhB26CsFvYs+OhM6TvikJP1hM6Z9NCYY9L51JdqgqO5T4 TpSQBcSutILUgqg/seJXaSqOg4gsDbDFOb9g/4r90hgBjxAE6Cd2ffa7bIdZcaNO9mOO bW8p4ksjI9elRPOp5+9s7+OVnGKVAkp6rfFR/ubgyry74TPGOLEWn7dAB/nBrPmPxGV0 BGrkGxokb4KvQL9KLhRdUMpkfCdnCM5qkC71KbwDtdLY4xZRh9uk9rjq4k1tIrNkK0h1 DjZw== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=AzIdwncCT0mnG/PZvKcES+c4WOdEPFkL3YFL5VnmdVE=; b=thcq8puqLWBL0U92x46mzPq8nlv19p828+7XN8c6sjyDY1A69Fe8zZN3nVisY6P5f4 Qpnu6vQm82mjXmuF9z1sdymvAGdcJ4l+ocJD6Vhc4ntzZK8G9Mqt2WYryI707n35sz3D Zeqa5Bfd0gmRhgWTHbqH9lAu7t+TH6t0jeNB0B9w6h2RlIi7wJY0iwknUEGui5y5YBkp EDNVC8e8WWcsmfYUERwZVzj58mML9NrHMuIsQaLq7kRl4WZQowBfS8BDd6vO+3b79Xha jve1iDoV1350Siv8/IZ+/5odr5d/Vli3nZM/jiqM/6YZeG5LMVG9Hjy8NA9xnCNo4y82 C74w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=wPZsqKGr; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id h10si16192206ioe.38.2021.05.10.04.10.49; Mon, 10 May 2021 04:11:01 -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; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=wPZsqKGr; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235647AbhEJLFt (ORCPT + 99 others); Mon, 10 May 2021 07:05:49 -0400 Received: from mail.kernel.org ([198.145.29.99]:59640 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232362AbhEJKp5 (ORCPT ); Mon, 10 May 2021 06:45:57 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id A6FF4616EA; Mon, 10 May 2021 10:36:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1620643006; bh=+8Ak/gQ7R3xd2xD7Jm1k0nim9o8CSWY+VD9ZmUUgU00=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=wPZsqKGrOFnLgPV79AHkZIC9VbhrYxz4xuIDFbbL3fD6GzhxMQ6nu3GH2lKDX6eBV SfLJGubaKYEBpDVgOreb1SvLnC3W9N556IWWgAsewcrzeEOp5D0VHCkkMesxWa52XO Nop5QP01rvJRFAvw/S7KrbwKVUBYPOgs5NQO7fIk= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Obeida Shamoun , Konrad Dybcio , Marijn Suijten , Daniel Thompson , Kiran Gunda , Lee Jones , Sasha Levin Subject: [PATCH 5.10 139/299] backlight: qcom-wled: Use sink_addr for sync toggle Date: Mon, 10 May 2021 12:18:56 +0200 Message-Id: <20210510102009.557708168@linuxfoundation.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210510102004.821838356@linuxfoundation.org> References: <20210510102004.821838356@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Obeida Shamoun [ Upstream commit cdfd4c689e2a52c313b35ddfc1852ff274f91acb ] WLED3_SINK_REG_SYNC is, as the name implies, a sink register offset. Therefore, use the sink address as base instead of the ctrl address. This fixes the sync toggle on wled4, which can be observed by the fact that adjusting brightness now works. It has no effect on wled3 because sink and ctrl base addresses are the same. This allows adjusting the brightness without having to disable then reenable the module. Signed-off-by: Obeida Shamoun Signed-off-by: Konrad Dybcio Signed-off-by: Marijn Suijten Reviewed-by: Daniel Thompson Acked-by: Kiran Gunda Signed-off-by: Lee Jones Signed-off-by: Sasha Levin --- drivers/video/backlight/qcom-wled.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/video/backlight/qcom-wled.c b/drivers/video/backlight/qcom-wled.c index 3bc7800eb0a9..83a187fdaa1d 100644 --- a/drivers/video/backlight/qcom-wled.c +++ b/drivers/video/backlight/qcom-wled.c @@ -336,13 +336,13 @@ static int wled3_sync_toggle(struct wled *wled) unsigned int mask = GENMASK(wled->max_string_count - 1, 0); rc = regmap_update_bits(wled->regmap, - wled->ctrl_addr + WLED3_SINK_REG_SYNC, + wled->sink_addr + WLED3_SINK_REG_SYNC, mask, mask); if (rc < 0) return rc; rc = regmap_update_bits(wled->regmap, - wled->ctrl_addr + WLED3_SINK_REG_SYNC, + wled->sink_addr + WLED3_SINK_REG_SYNC, mask, WLED3_SINK_REG_SYNC_CLEAR); return rc; -- 2.30.2