Received: by 10.223.164.202 with SMTP id h10csp887925wrb; Fri, 17 Nov 2017 10:13:22 -0800 (PST) X-Google-Smtp-Source: AGs4zMYeqmUotakZE8JkkxZNYfh5wNvUqqnOXtgTfx1Hvw7F0lzTh9FFERNJ3Fa2u9Id4nHMBCiM X-Received: by 10.159.207.149 with SMTP id z21mr6209113plo.164.1510942402258; Fri, 17 Nov 2017 10:13:22 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1510942402; cv=none; d=google.com; s=arc-20160816; b=SXZgdUSVkbGs1xQ3GWqTkTM6r63HUEsrzPEdDPwzpd31FbDNtbqDW6gxC90E/Lp6RL vJa/k0sZm0KdUoa1z6DzATPKiRDHpYq1OOyP1ThtRivjFjxltYEInEy+0kEEIS4YJ7W2 EY7Om0c5yY8SrLZJdQrdb7fZT5MInRNTXftijEP70rLeCv62BU/9v/ozwyx5O8lthEXB Ctj4qDe4UgW5NZ/ovX/rS2qR/0yRgj1vIJCP5+rpKxxj5GlankfTrIvRskcbrEln4vrH dFev27LuaiRA48bguLACqlqfmS33LRtf4uC8GlrhsOkwyldEltVNJPDropz0rufLn+/r 2STg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:message-id:references :in-reply-to:subject:cc:to:from:date:content-transfer-encoding :mime-version:dkim-signature:dkim-signature :arc-authentication-results; bh=ySMYO1NjL9u2SBB5cyufPn9sw2Oe7vXzQukgn1lvmQE=; b=INibEgWwxW/k1TsOwXM6L3tqXPN1UZ/rMo3IW04UIWF3hXAlI33TPL9msUchegWF7w XxEYrHgmW/0iOWfbw6d+vghsb2dwyLJ0Zq5mBXdkdaXKFzdGxyMpQCDFvOgR1tyKAG2i Zts8h51Eta1ms86eiaDYqRRBTAc1Lw2mIN8c33Ffp7O1W1rNqS3SekknTOcd6uoMTXh4 VgKLE3Rde4mwZxzXNKYXH8izVIUqlO+ytoWoYX0pvBcl34U/qlP3ZM2Kj3Y/7jdS9e0c BCO1T1Otz8HCfS3JpdMIWEqipnBq7xQX1ReF3w8vsWfWKK3cXG1SOP70Ee8c5ALP7oV2 tHUA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@codeaurora.org header.s=default header.b=Zxfcrz/l; dkim=pass header.i=@codeaurora.org header.s=default header.b=gJR+cjCJ; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g1si3141033plb.462.2017.11.17.10.13.09; Fri, 17 Nov 2017 10:13:22 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@codeaurora.org header.s=default header.b=Zxfcrz/l; dkim=pass header.i=@codeaurora.org header.s=default header.b=gJR+cjCJ; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752224AbdKQJwj (ORCPT + 91 others); Fri, 17 Nov 2017 04:52:39 -0500 Received: from smtp.codeaurora.org ([198.145.29.96]:43720 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752119AbdKQJwe (ORCPT ); Fri, 17 Nov 2017 04:52:34 -0500 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 707BF607E2; Fri, 17 Nov 2017 09:52:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1510912353; bh=lS7Ryi1kLwCYfPwn6kYqRk77b1x2lmn3+eugMHOq0p0=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=Zxfcrz/l3qRUJtgVagPEgtOCZ9dbEgHZ3kZ61P3fWvIgFdP4T0Z84cMRz8J7egxAA 1iH6xqsrWb+XfgAsxHayZusPXcazv/B9S0U6YKX/gRAP8Np4XFsoFXc2zRdTp0lwLB D6E1jFQioyevNvN7J0s7P8XOL7RhPABNCfyZusWA= X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on pdx-caf-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.8 required=2.0 tests=ALL_TRUSTED,BAYES_00, DKIM_SIGNED,T_DKIM_INVALID autolearn=no autolearn_force=no version=3.4.0 Received: from mail.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.codeaurora.org (Postfix) with ESMTP id 7DC8B60584; Fri, 17 Nov 2017 09:52:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1510912352; bh=lS7Ryi1kLwCYfPwn6kYqRk77b1x2lmn3+eugMHOq0p0=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=gJR+cjCJjXwS7ZrLG5F4cMsNO1jNIADo4pFegeignQ1o+q3Ec8h5gduSI5OXTxv5/ vIZJBiXGcHDmGBkpllu2KDyWKrmiWC5W9G9MsiHuAOxZGzC5Wo3TAvRlv3yZTGac8a UdZCiwnqnMku0inkWQ+wZktWy6159IJGskdNbGCo= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Date: Fri, 17 Nov 2017 15:22:32 +0530 From: kgunda@codeaurora.org To: Bjorn Andersson Cc: linux-arm-msm@vger.kernel.org, Lee Jones , Daniel Thompson , Jingoo Han , Richard Purdie , Jacek Anaszewski , Pavel Machek , Rob Herring , Mark Rutland , Bartlomiej Zolnierkiewicz , linux-leds@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-fbdev@vger.kernel.org, linux-arm-msm-owner@vger.kernel.org Subject: Re: [PATCH V1 1/4] qcom: spmi-wled: Add support for qcom wled driver In-Reply-To: <20171117065640.GU28761@minitux> References: <1510834717-21765-1-git-send-email-kgunda@codeaurora.org> <1510834717-21765-2-git-send-email-kgunda@codeaurora.org> <20171116165510.GP28761@minitux> <208c7332234581909f159ddb33ede32b@codeaurora.org> <20171117065640.GU28761@minitux> Message-ID: <15f6f769f5883af35f153b0c5e570442@codeaurora.org> X-Sender: kgunda@codeaurora.org User-Agent: Roundcube Webmail/1.2.5 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2017-11-17 12:26, Bjorn Andersson wrote: > On Thu 16 Nov 22:36 PST 2017, kgunda@codeaurora.org wrote: > >> On 2017-11-16 22:25, Bjorn Andersson wrote: >> > On Thu 16 Nov 04:18 PST 2017, Kiran Gunda wrote: >> > >> > > WLED driver provides the interface to the display driver to >> > > adjust the brightness of the display backlight. >> > > >> > >> > Hi Kiran, >> > >> > This driver has a lot in common with the already upstream pm8941-wled.c, >> > because it's just a new revision of the same block. >> > >> > Please extend the existing driver rather than providing a new one >> > (and yes, renaming the file is okay). >> > >> > Regards, >> > Bjorn >> >> Hi Bjorn, >> >> Yes this driver design is similar to pm8941, however the WLED HW block >> has undergone quite a few changes in analog and digital from PM8941 to >> PM8998. > > I can see that, looking at the documentation. > >> Few of them include splitting one module into wled-ctrl and wled-sink >> peripherals, changes in the register offsets and the bit >> interpretation. > > This is typical and something we need to handle in all these drivers, > to > avoid having one driver per platform. > >> Hence we concluded that it was better to have a new driver to support >> this new gen WELD module and decouple it from the pm8941. > > Okay, I can see how it's easier to not have to case about anything but > pmi8998 in this driver, but where do you add the support for other WLED > versions? What about PMI8994? Will there not be similar differences > (registers that has moved around) in the future? > >> Also, going forward this driver will support AMOLED AVDD rail (not >> supported by pm8941) touching a few more registers/configuration and >> newer PMICs. > > Is this a feature that was introduced in PMI8998? Will this support not > be dependent on the pmic version? > >> So spinning off a new driver would make it cleaner and easier to >> extend further. >> > > It's for sure easier at this point in time, but your argumentation > implies that PMI8998+1 should go into it's own driver as well. > > I suspect that if you're going to reuse this driver for future PMIC > versions you will have to deal with register layout differences and new > feature set, and as such I'm not convinced that a new driver is needed. > > > Can you give any concrete examples of where it is not possible or > undesirable to maintain the pm8941 support in the same driver? > > Regards, > Bjorn Hi Bjorn, Thanks for the inputs! Following are the reasons to go for the new driver and this driver can support 5 PMICs. 1.Majority of register, offsets and config values don’t match up between PMI8998 and PM8941 2.Feature such as – SC protection handling in SW cannot be done for 8941 as there is no SC event/irq, AMOELD AVDD cannot supported by PM8941 3.Feature such as – string auto-calibration even if common will have to use different offsets/registers in the same SW logic 4.PMI8998, PMI8994, PMI8950 and PM660 all of them have this same WLED module (and register map) with very minor changes unlike 8941. Thanks, Kiran > -- > To unsubscribe from this list: send the line "unsubscribe > linux-arm-msm" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html From 1584325896682135523@xxx Fri Nov 17 15:01:56 +0000 2017 X-GM-THRID: 1584234060306084166 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread