Received: by 2002:a05:6a10:a841:0:0:0:0 with SMTP id d1csp771796pxy; Wed, 28 Apr 2021 13:58:33 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz/ic7HxQABTToLugQsCJLlPa3w5VaPdwnF6LyhNKMc0h8yu8TaY8Jus4YLveG6kghnqeof X-Received: by 2002:a17:906:7197:: with SMTP id h23mr3243068ejk.465.1619643513508; Wed, 28 Apr 2021 13:58:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1619643513; cv=none; d=google.com; s=arc-20160816; b=LFY7j/2F+ZcFeEpvWxl5GzvExN4dl5fVKvStz4LSP/FeZ1BUqxtWH6NZH7TTmygusR VbXu4hJPS94UErO11OLNdKLxunFNrQFgCS9vbWqOuEVHlOJvOxn1z1YabGU/7wvQtzV0 CItA/SrE83n/lO36sPHb5VqAFQNVWWs9q10wXnNLOCwpqHnzlIXxGO7CQrI8ehbt4bOc mNSZGXnCsTfoS08E0ZQH1Eu7cAMhY7YqPdBvp/nYO2RXBJ90STWF52l6gDR6RFd8oGVd C4HpaW+rQuDQUovL13jECtD+GzBPkOvTUlsrS6l5prDe5JvuY1wWc3dzpQ7mSctebiux dS4w== 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=vl7A1Bucz63bZ2sNuRyc6lFBD6YydDSFIrYy2XAFbW4=; b=qZtGMSEtHWKVUZCxmtPDaQAsjNoASC/43PgsYTaCaky5E2+I1eYYNKIpPODX0tHZvx KxZ0m6bXQ6ScVKn4sHig2BbnQZ/X87DrfdXwSMCEISep/lfImDnnnrOzRXfKzwXhjOTN LxVp7hPayeNQ0mMgdFqTcuYGYhTNtpTpSGa9ABtRNrWSPLRQxAuhIFpCQcROpCdVcSSk XLAfbieFkhyCdk8KAoCYb/IP6eZPtTceIRv6C1H3UPvvMED5ft4Drb6mJe1mNnhEVrG4 We46jPqguj1aiLsjbsarjIuN+DH3pNWzvIw2ibAW75eC8rFV+I8Q4RLquhKBn9nr6Iud pveQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=V+PDi+r9; 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 m23si1090952ejn.692.2021.04.28.13.58.10; Wed, 28 Apr 2021 13:58:33 -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=@linaro.org header.s=google header.b=V+PDi+r9; 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 S241739AbhD1UIU (ORCPT + 99 others); Wed, 28 Apr 2021 16:08:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52544 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238991AbhD1UHx (ORCPT ); Wed, 28 Apr 2021 16:07:53 -0400 Received: from mail-oi1-x233.google.com (mail-oi1-x233.google.com [IPv6:2607:f8b0:4864:20::233]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B535CC0613ED for ; Wed, 28 Apr 2021 13:06:53 -0700 (PDT) Received: by mail-oi1-x233.google.com with SMTP id r3so10856724oic.1 for ; Wed, 28 Apr 2021 13:06:53 -0700 (PDT) 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=vl7A1Bucz63bZ2sNuRyc6lFBD6YydDSFIrYy2XAFbW4=; b=V+PDi+r9lcfd6nKjXBqXO7T4yGd0umuQaXFT35w2tV6DrX6On7FxjGWqdF3tS5MSE+ P+pX2ad6Mtyzf1c4KfvG0i9/O0LgZYK3O1gQjWOZFZDe3UpiaL5jPZ9HtwormPpB9AqP Dd9pzkECFx19XuqHapvjUsFVxbCALKkus+6Gzmt7riMQJfy5QbldfUgIEg9y+93qAKO7 aO8sixH0nO+n5uEt3E9LaBcbDaEjV6aJfCQv0vtFQFhV2YscJemZjO4eIvOQ3Fhm0L6d QLRpdqFumHBAi1ZJ98WtnZC4awoXEe8bu2/KJG5+VkeNdS0mEWyELY5ebkIwaupWcxxw pZkQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=vl7A1Bucz63bZ2sNuRyc6lFBD6YydDSFIrYy2XAFbW4=; b=i3pIn5FXuJaucbbUEbHVOpSt4zYh8J1BFZiTXMU+e3pVozE8JgfaN9iSIgkvSMC7Nc GIrRf01nCDjetGaWbspvHsXCr5O1ZH71xFFfrjJlR4ZWLVZlgzzedy27zVTgPvFwbBjC Cn4bRQ9QgXxk7Dqq1tGxLiK1/SzefwOr65x3PJ2/S4tjvE+eTb0KysE3biy9EE1NK+b+ LdfsbrLS5hOpmM2iitsmG14+TEf7T5Bw3XP/pUtnrV5Aj4VNf0ppn2igmm5JUz5pxd7X g05lx9lJG0LvdGBdvAAqrc2JjDVgymMt0HDldwk2emMP9doUkXIFV1n848rlMsH84VYc 4jMg== X-Gm-Message-State: AOAM532CAHEFPdEV3mKtv9z8z9/Zs1OWAp35IcNt+DJ/VH50JkdeJHGK SZxrvhQv6CI+kANYaN9kEMpV6g== X-Received: by 2002:a05:6808:18e:: with SMTP id w14mr21763329oic.159.1619640413040; Wed, 28 Apr 2021 13:06:53 -0700 (PDT) Received: from yoga (104-57-184-186.lightspeed.austtx.sbcglobal.net. [104.57.184.186]) by smtp.gmail.com with ESMTPSA id x45sm195564otr.35.2021.04.28.13.06.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 28 Apr 2021 13:06:52 -0700 (PDT) Date: Wed, 28 Apr 2021 15:06:50 -0500 From: Bjorn Andersson To: Subbaraman Narayanamurthy Cc: aghayal@codeaurora.org, collinsd@codeaurora.org, fenglinw@codeaurora.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 0/2] Add QCOM PMIC PWM driver Message-ID: <20210428200650.GM1908499@yoga> References: <20210428155422.GL1908499@yoga> <1619635777-2872-1-git-send-email-subbaram@codeaurora.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1619635777-2872-1-git-send-email-subbaram@codeaurora.org> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed 28 Apr 13:49 CDT 2021, Subbaraman Narayanamurthy wrote: > >> Add PWM driver to support PWM modules inside QCOM PMIC chips which are accessed > >> through SPMI bus. Normally, there would be multiple PWM modules with adjacent > >> address spaces present in one PMIC chip, and each PWM module has 0x100 size of > >> address space. With this driver, a pwm_chip with multiple pwm_device individuals > >> is created, and each pwm_device individual is corresponding to one PWM module. > >> > > > Exposing this as individual pwm_chips will prevent us from enabling the > > LED related use cases (patterns and multicolor) that most versions of > > the hardware support. > > > I proposed [1] a while ago and think this is a better approach. I'll > > take some time to respin this and send out the next version. > > > [1] https://lore.kernel.org/linux-arm-msm/20201021201224.3430546-1-bjorn.andersson@linaro.org/ > > Hi Bjorn, > Yes, we came across this patch series but this driver (leds-qcom-lpg) is a > combo one which provides support only for RGB LEDs (or TRI_LED module) along > with PWM/LPG channels allocated for it. Say, if we've additional PWM channels > on the same PMIC (that provides user-interface support) or another PMIC > (non user-interface) that has multiple PWM channels that are not used for LED > notifications, it would be good to have a separate PWM driver to support such > channels IMHO. There are couple of use cases we've come across recently. > > 1. Using a PWM channel for controlling external LCD backlight controller > 2. Using a PWM channel for controlling a haptics actuator > The LPG driver, as it's currently written, support using each channel as a LED, part of a multicolor LED or as a pwm_chip. It's been tested on pm8916 (which doesn't have triled or the lut), pm*8994, pmi8996 and pm8150* in various combinations. In particular the PWM-only modes that you describe here is how the driver has been used on db410c, for driving the "backlight GPIO" in the low-speed connector. Regards, Bjorn