Received: by 2002:a05:6a10:1a4d:0:0:0:0 with SMTP id nk13csp7568pxb; Mon, 31 Jan 2022 03:56:41 -0800 (PST) X-Google-Smtp-Source: ABdhPJxnM3irsojt1a7g20iGYaX7IaBjWnvmWmLYdQVmygS/5dbo2FIvZr5XCKG4ngWFmpy8YJSM X-Received: by 2002:a17:907:a409:: with SMTP id sg9mr16708199ejc.219.1643630200781; Mon, 31 Jan 2022 03:56:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643630200; cv=none; d=google.com; s=arc-20160816; b=JvB7G9IjOkmCU3cZpH0AyNsdJC4J6HKDUozyEaxJUjxCT9udwPc/Vu2FftfTM90loT 69UpgTrBde5stRswytwqhPYt1cwlb/SQHq5ZNpVDOEFE9YMQsCrExleH6DzaEX9KyUXA y3kf9pD4eVWF2RLLMYstgfH3wKqURcZ7F4NBx5SubbSQqi5eolAYm7Vzyxp1vqZLyycb SjLDPYdmqIxFsAEOKbkse8wBP0mxwuzotI6wuJt1fXe+A8m71JRrITAL7k31qKpoJAMD EWUBUcKI6mH4GA6V2JftGKrhEWtzH+GSa1wKZtLqNcZPxuwj8l1PGMqbUV+DbQ2qdGA+ ebuA== 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:dkim-signature; bh=kdgdtq3eOJHV51siqvXo/GLiap2Pd2Ct5h8leY/7+qQ=; b=LwqbxyRUSP+Xgy/n4Gl99TOMEnWgV0xqN0QD8K0mDZbgOFPSHZPtCI9q4egQ4ts/4l uZ76/Ln8fMfndKRVQUC2ohBQhrY/8hziFRA+do32aunkYkqcEBuX8PorHkVoCGv1ZZIQ twPHggO8l3z5WeO4re6LcXzoCCpATIYeLCDWcPwmh617cuCOlhKuOhR/DscK4f7GbtoZ DHn0wYOeViIugUyW64mwngg5tX1ryAIOzjH83bBRBXM8RtVSfpnpqVplJemWKwNfhwFp yDFl7BKj2AS5O2ZaBZSZWLzH3TLyYj6lTVaX5JcMFLrBa98r3RGyHr1OcOODdqO0tkei BWWQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=fiWptCh5; 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=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id w4si7612164edt.364.2022.01.31.03.56.16; Mon, 31 Jan 2022 03:56:40 -0800 (PST) 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=@linaro.org header.s=google header.b=fiWptCh5; 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=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344838AbiA2Ax3 (ORCPT + 99 others); Fri, 28 Jan 2022 19:53:29 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44142 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236412AbiA2Ax2 (ORCPT ); Fri, 28 Jan 2022 19:53:28 -0500 Received: from mail-ot1-x32d.google.com (mail-ot1-x32d.google.com [IPv6:2607:f8b0:4864:20::32d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D7D83C061747 for ; Fri, 28 Jan 2022 16:53:27 -0800 (PST) Received: by mail-ot1-x32d.google.com with SMTP id e21-20020a9d0195000000b005a3cd7c1e09so680617ote.6 for ; Fri, 28 Jan 2022 16:53:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=kdgdtq3eOJHV51siqvXo/GLiap2Pd2Ct5h8leY/7+qQ=; b=fiWptCh5t5yJTLtKKqW+Ag6RQ6RGNL8eRJ50PmEcFl2VOoxRJXMkyb1I3y6HYKfDow 1jLKcBqJxEG/r5+SaKi/+w4kkXXNEfluF3OJofOpTQCluSPdSZxnILu1AIkk7hCWLliS CSN8Ixj5fTR5DhfUbaTZNrNip+mfxNpMtUgZrRb9XW2mow9xD43I+CBMK+7CKCWAqMgk yMdIPEh36bjEuPHtgiY34m0AVB5zr4hq8irnnwDuxpukW2PZr6ticWOZSeKPwRumK5HN ipxXKJFQXiO5o00GlbUHMYrXXspNv7RnkbMTN0fbHz9FIb5y0ucrEHFzJOUBPuEbRhYf 0wJg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=kdgdtq3eOJHV51siqvXo/GLiap2Pd2Ct5h8leY/7+qQ=; b=Npsxhb3eOKnsBpS2mlIQr4xVUChZsY7giCAho7zQIU3dQPZAtKBdbh1rUxepFm6Jk9 K/L+lIiy6wnzpC0SZPJ5MOLgjJj5pqZb2WVvbhyeSmARHJhGB4dzO9Uqc5wJqdHTFYZb Z4pBuQnwM0j6LVMu4izj21uvMlnhhQ8AC2uHk2cdMIcspMhweVFs6vJifk8Lhd4KcJPU kub2QLHPMwXr7KxJB7eaTeCBQe/P5w5QogRqtRPSVPQpo0aPste6WYVIZkDe8yCB9E0W qfKFTaLp79iEWM/0yndAn8C7vS3R6/sXNUq3RwLlRH+vB4qC5RNsoP60iF5m+V2DZEYM 8jKw== X-Gm-Message-State: AOAM532yejB6CLZ6plz8bKFBoGKUQLklTw8DP0xmAh1IEfHykMgDP3d4 0QdaGuZgNrStkt/tGUcfzNz0GQ== X-Received: by 2002:a05:6830:839:: with SMTP id t25mr6395244ots.372.1643417607223; Fri, 28 Jan 2022 16:53:27 -0800 (PST) Received: from yoga ([2600:1700:a0:3dc8:5c39:baff:fe03:898d]) by smtp.gmail.com with ESMTPSA id 124sm12194246oif.7.2022.01.28.16.53.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 28 Jan 2022 16:53:26 -0800 (PST) Date: Fri, 28 Jan 2022 18:53:24 -0600 From: Bjorn Andersson To: Marijn Suijten 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: 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: <20211027212709.4ma5uzy5titmgzqv@SoMainline.org> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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": lpg { ...; rgb-led { color = ; function = LED_FUNCTION_STATUS; #address-cells = <1>; #size-cells = <0>; led@1 { reg = <7>; color = ; }; led@2 { reg = <6>; color = ; }; led@3 { reg = <5>; color = ; }; }; Regards, Bjorn