Received: by 2002:a05:6a10:1a4d:0:0:0:0 with SMTP id nk13csp2809559pxb; Thu, 3 Feb 2022 15:10:57 -0800 (PST) X-Google-Smtp-Source: ABdhPJy1WUKgxLjUn7YWss7/b+FVHykKZwMA7gm5w155lDs/dP++AaqYWTdQ+JPp5KCoFXmnlfv8 X-Received: by 2002:a05:6a00:2451:: with SMTP id d17mr414732pfj.70.1643929857107; Thu, 03 Feb 2022 15:10:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643929857; cv=none; d=google.com; s=arc-20160816; b=hoE/+UjRZw3RWaATNLJScTQpPi/5RDH5KQZssg8s6ylfWb0Bwr7Kv8Bs+0wlU1mHto +SxcHqicBAwnj7NPQT92FTRHPBYjStuGamMx9kgiDuoV+lUFVdEj5O6DA+RoV2jOpDQf 8pNgc3LUQB2rb52/xjMrjFEMaDTEjyI1Xvd/y1AoClKNN/Lqg8qi2KGZvbmGqBT5QCat YQxDHtiTn6UF+KKR7nSSXfs19BXeDNecGEAUXjBQXjmOERgrInYjyVbbOvCkvXXzV6sT TEww1+7uXM6iRAWGJ1SUgzlffsCh5T+f5q6bayMD/ohJR3avP/CFGtLzCmvCH8n8eKlh 538A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=N6ZzLztIBXsSHwUTTVe+ti7RlXdZ0g3wBmgfg6ekAgg=; b=gUq9/VvEF+E25+DhLh029FcbWWoy3gtaq4jaFWKWcNAmOtUN5OsMKc+AFiwUGaALGu jkSRAEWEJLyo89fGxsCKsCkqfZKUDrnEEehfa/CA1SaOcYxvipwbahxD+xXFAfIoyf+E WZUkbeJxhn9xz+99h3+pzyJ4ckzhgcgGmpsGOyZOZEzk9IcnKY+PZ/00tYDtqiQl/yf0 hs8YCSr8/BQPKcouMvm2ak0ivtCoBWjqOMJ7PDZc+1/yQrf5bAyWrOT4MlAMWWui37nh muYdBOGCEPuzwIX7YUOapSo90IKlYzle2KZzkhbUAVhbuFGYJIebjDc5NchaoLcJCP7V eTeA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id h14si216387pfc.358.2022.02.03.15.10.44; Thu, 03 Feb 2022 15:10:57 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1343500AbiBBKRQ (ORCPT + 99 others); Wed, 2 Feb 2022 05:17:16 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40466 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S245339AbiBBKRK (ORCPT ); Wed, 2 Feb 2022 05:17:10 -0500 Received: from relay08.th.seeweb.it (relay08.th.seeweb.it [IPv6:2001:4b7a:2000:18::169]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 026C5C061714 for ; Wed, 2 Feb 2022 02:17:09 -0800 (PST) Received: from SoMainline.org (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 ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by m-r2.th.seeweb.it (Postfix) with ESMTPSA id CF9E53F72A; Wed, 2 Feb 2022 11:17:07 +0100 (CET) Date: Wed, 2 Feb 2022 11:17:06 +0100 From: Marijn Suijten To: Bjorn Andersson Cc: Pavel Machek , Rob Herring , Andy Gross , Thierry Reding , Uwe Kleine-K?nig , Lee Jones , linux-leds@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-pwm@vger.kernel.org, Yassine Oudjana , Luca Weiss , Subbaraman Narayanamurthy Subject: Re: [PATCH v10 2/2] leds: Add driver for Qualcomm LPG Message-ID: <20220202101706.ompigtbovbz6shwq@SoMainline.org> References: <20211010043912.136640-1-bjorn.andersson@linaro.org> <20211010043912.136640-2-bjorn.andersson@linaro.org> <20211027211928.tjybwy2lokj6eoun@SoMainline.org> <20211027212709.4ma5uzy5titmgzqv@SoMainline.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2022-01-28 18:53:24, Bjorn Andersson wrote: > On Wed 27 Oct 16:27 CDT 2021, Marijn Suijten wrote: > > > On 2021-10-27 23:19:30, Marijn Suijten wrote: > > > Hi Bjorn, > > > > > > On 2021-10-22 10:25:35, Bjorn Andersson wrote: > > > > On Sat 09 Oct 21:39 PDT 2021, Bjorn Andersson wrote: > > > > > > > > > The Light Pulse Generator (LPG) is a PWM-block found in a wide range of > > > > > PMICs from Qualcomm. These PMICs typically comes with 1-8 LPG instances, > > > > > with their output being routed to various other components, such as > > > > > current sinks or GPIOs. > > > > > > > > > > Each LPG instance can operate on fixed parameters or based on a shared > > > > > lookup-table, altering the duty cycle over time. This provides the means > > > > > for hardware assisted transitions of LED brightness. > > > > > > > > > > A typical use case for the fixed parameter mode is to drive a PWM > > > > > backlight control signal, the driver therefor allows each LPG instance > > > > > to be exposed to the kernel either through the LED framework or the PWM > > > > > framework. > > > > > > > > > > A typical use case for the LED configuration is to drive RGB LEDs in > > > > > smartphones etc, for which the driver support multiple channels to be > > > > > ganged up to a MULTICOLOR LED. In this configuration the pattern > > > > > generators will be synchronized, to allow for multi-color patterns. > > > > > > > > > > Signed-off-by: Bjorn Andersson > > > > > --- > > > > > > > > Any feedback on this? > > > > > > I asked in #linux-msm whether anything is wrong with the patterns, > > > since my Sony Discovery (sdm630 with a pm660l) blinks way quicker on a > > > pattern that's supposed to stay on for 1s and off for 1s: > > > > > > echo "0 1000 255 1000" > /sys/class/leds/rgb\:status/hw_pattern > > > > > > It however seems to be broken in the same way on an older version now > > > (this might be v9 or v8) which I don't remember to be the case. Can you > > > double-check if this is all working fine on your side? If so, I'll have > > > to find some time to debug it on my end. > > > > > > Thanks! > > > - Marijn > > > > Another thing I just ran into: on both patch revisions the colors are > > flipped. multi_index reports "red green glue", but the values written > > to multi_intensity correspond to "blue green red" instead. Is it the > > same on your side? > > > > I booted one of my 8974 devices with RGB LED and the colors matches my > expectations. Can you confirm that your mapping in the DT node is > correct? > > E.g. with pm8941 the mapping should be "backwards": > [snip] Thanks, this was indeed a mistake on my side: downstream pm660l sets blue to the first channel too, whereas I set it to red. Let's blame it on downstream mixing zero-based and one-based indices and my inability to read that :) - Marijn