Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp382343imm; Tue, 19 Jun 2018 23:27:35 -0700 (PDT) X-Google-Smtp-Source: ADUXVKIxvY5bR9GzctX8Diz8mPirQWS/w3Rrf5DzG/Kuw7v6/5G4I+tjvdlSkg1DJLVl/LpdGM7Y X-Received: by 2002:a17:902:c85:: with SMTP id 5-v6mr22318769plt.126.1529476055035; Tue, 19 Jun 2018 23:27:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1529476055; cv=none; d=google.com; s=arc-20160816; b=wk9+CGZ9gYloJFlsEaGJqh/YUdp3i8Ds+Z7fLeXvN+94/GzSKErAjAxIdO0uxyTuP0 r4UjXUhKv4Ys/o3i2TaawbU7ZQ8NUWSY/LPVnya35l/KZMdICHgZwvYVc3+jete/S6wh qKa57E1YTKpxfXs6u3xE2e4WwCXD4BAyoB7t5jQ7abfrV8wOohFcCVfV0e/3WPXp2sfz eoxbJkVGtsPLKaHoCgUoTPPZBx0qXOsPInIj4pOQ6ObzDqT2ihy0uTK7uZrlshxHwUMn N0Vy12NvD7hbtENriruoz+52+SrCv8oPBXhRMOjlkJyAhyS1GF/U+hCvt40egH+wwsZU MxPA== 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=Z0nyBu/6vfGcQHF8gXUQW80ApRL/A9A+oSiqFaRd490=; b=EX5LRpkYmDSiSFs3uKWcTKEitPDCbfP8Ay+pf6a0YpGtKLiRpUCJ3gbNt6J12K7UUn Q+ySR/eAV3ZXcFbLIWzoPAkTNcFU2K5O0kAxGewVjh17HH2snT7v2xP0UFcArz8vu098 KGs3CAVOD3jm55XwyBnf3BYPj4NurwDw/b/P+oa55ZJLV2jTOgzD7QGbYWsBFJw1B8wY AFFiFTCtH7CLpRxie1iD17Ie5bQCj+WIxvQPzuvvWpQ5takWHVoi6OlL0VUv/7UhbBDU fLfDKExCVwtLUU2gVMeDPvcKoNqAmJmQgZUgrgiFV2QZ3bqMxZCtU+W7MJXd7f8xvVjB qkPQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@codeaurora.org header.s=default header.b="e/4HsODb"; dkim=pass header.i=@codeaurora.org header.s=default header.b=T5bnp1Nz; 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 b2-v6si1579671plx.88.2018.06.19.23.27.20; Tue, 19 Jun 2018 23:27:34 -0700 (PDT) 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="e/4HsODb"; dkim=pass header.i=@codeaurora.org header.s=default header.b=T5bnp1Nz; 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 S1751648AbeFTG0l (ORCPT + 99 others); Wed, 20 Jun 2018 02:26:41 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:59084 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750827AbeFTG0i (ORCPT ); Wed, 20 Jun 2018 02:26:38 -0400 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 2C2186085F; Wed, 20 Jun 2018 06:26:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1529475998; bh=kHiwzXPmoL/9oz/ZwI7jorfKe3RA1ydbmPA9iFqucK4=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=e/4HsODbgHKsJV2CxFk3Dq3k28TLwmvqxuCAYioE4QMTcyDTokEKleJgBsT1FFkym sA5AjxrteU88ksGn19EnSEFdnj6CSk+F+pwNkDb8otzoquJ0GRPyuhAvxEFh+SHt6f fL0/n/+Y+h3y4eFKraZOBLgtPW585nuiezruuzXQ= 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 70AD860791; Wed, 20 Jun 2018 06:26:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1529475997; bh=kHiwzXPmoL/9oz/ZwI7jorfKe3RA1ydbmPA9iFqucK4=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=T5bnp1NzRPpOBD1s3SXMM0f3BDzBkoxzG0z1qmE+AVF5NJAubAYwYFEfr187MbBjo sRMcskdDcWnersDqVDXEdFVyzatYklA5sT4RRyrQTHAsZfpfXC3m3HBwOc/08lvVzY DOHeMpXXZNaVjbP1ZixiM2JcmA8dJ+qklmfUVdzA= MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Wed, 20 Jun 2018 11:56:37 +0530 From: kgunda@codeaurora.org To: Bjorn Andersson Cc: jingoohan1@gmail.com, lee.jones@linaro.org, b.zolnierkie@samsung.com, dri-devel@lists.freedesktop.org, Daniel Thompson , linux-fbdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-leds@vger.kernel.org Subject: Re: [PATCH V3 4/7] backlight: qcom-wled: Rename PM8941* to WLED3 In-Reply-To: <20180619231126.GH15126@tuxbook-pro> References: <1529406822-15379-1-git-send-email-kgunda@codeaurora.org> <1529406822-15379-5-git-send-email-kgunda@codeaurora.org> <20180619231126.GH15126@tuxbook-pro> Message-ID: 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 2018-06-20 04:41, Bjorn Andersson wrote: > On Tue 19 Jun 04:13 PDT 2018, Kiran Gunda wrote: > >> Rename the PM8941* references as WLED3 to make the >> driver generic and have WLED support for other PMICs. >> > > Looks good, just three minor comments below. > >> Signed-off-by: Kiran Gunda >> --- >> drivers/video/backlight/qcom-wled.c | 248 >> ++++++++++++++++++------------------ >> 1 file changed, 125 insertions(+), 123 deletions(-) >> >> diff --git a/drivers/video/backlight/qcom-wled.c >> b/drivers/video/backlight/qcom-wled.c >> index 0b6d219..812f3cb 100644 >> --- a/drivers/video/backlight/qcom-wled.c >> +++ b/drivers/video/backlight/qcom-wled.c >> @@ -18,77 +18,79 @@ >> #include >> >> /* From DT binding */ >> -#define PM8941_WLED_DEFAULT_BRIGHTNESS 2048 >> +#define WLED_DEFAULT_BRIGHTNESS 2048 >> >> -#define PM8941_WLED_REG_VAL_BASE 0x40 >> -#define PM8941_WLED_REG_VAL_MAX 0xFFF >> +#define WLED3_SINK_REG_BRIGHT_MAX 0xFFF >> +#define WLED3_CTRL_REG_VAL_BASE 0x40 >> >> -#define PM8941_WLED_REG_MOD_EN 0x46 >> -#define PM8941_WLED_REG_MOD_EN_BIT BIT(7) >> -#define PM8941_WLED_REG_MOD_EN_MASK BIT(7) >> +/* WLED3 control registers */ >> +#define WLED3_CTRL_REG_MOD_EN 0x46 >> +#define WLED3_CTRL_REG_MOD_EN_BIT BIT(7) >> +#define WLED3_CTRL_REG_MOD_EN_MASK BIT(7) >> >> -#define PM8941_WLED_REG_SYNC 0x47 > > These are in address order, any reason why WLED3_SINK_REG_SYNC moved > down? > Actually, this is a sink specific register. That's why moved it to under the /* WLED3 sink specific registers */ >> -#define PM8941_WLED_REG_SYNC_MASK 0x07 >> -#define PM8941_WLED_REG_SYNC_LED1 BIT(0) >> -#define PM8941_WLED_REG_SYNC_LED2 BIT(1) >> -#define PM8941_WLED_REG_SYNC_LED3 BIT(2) >> -#define PM8941_WLED_REG_SYNC_ALL 0x07 >> -#define PM8941_WLED_REG_SYNC_CLEAR 0x00 >> +#define WLED3_CTRL_REG_FREQ 0x4c >> +#define WLED3_CTRL_REG_FREQ_MASK 0x0f >> >> -#define PM8941_WLED_REG_FREQ 0x4c >> -#define PM8941_WLED_REG_FREQ_MASK 0x0f >> +#define WLED3_CTRL_REG_OVP 0x4d >> +#define WLED3_CTRL_REG_OVP_MASK 0x03 >> >> -#define PM8941_WLED_REG_OVP 0x4d >> -#define PM8941_WLED_REG_OVP_MASK 0x03 >> +#define WLED3_CTRL_REG_ILIMIT 0x4e >> +#define WLED3_CTRL_REG_ILIMIT_MASK 0x07 >> >> -#define PM8941_WLED_REG_BOOST 0x4e >> -#define PM8941_WLED_REG_BOOST_MASK 0x07 >> +/* WLED3 sink registers */ >> +#define WLED3_SINK_REG_SYNC 0x47 >> +#define WLED3_SINK_REG_SYNC_MASK 0x07 >> +#define WLED3_SINK_REG_SYNC_LED1 BIT(0) >> +#define WLED3_SINK_REG_SYNC_LED2 BIT(1) >> +#define WLED3_SINK_REG_SYNC_LED3 BIT(2) >> +#define WLED3_SINK_REG_SYNC_ALL 0x07 >> +#define WLED3_SINK_REG_SYNC_CLEAR 0x00 >> > [..] >> -struct pm8941_wled_config { >> - u32 i_boost_limit; >> +struct wled_config { >> + u32 boost_i_limit; >> u32 ovp; >> u32 switch_freq; >> u32 num_strings; >> - u32 i_limit; >> + u32 string_i_limit; > > Changing the members in this struct seems unrelated. > Changed the members, to have resemblance with the IPCAT and better readability . >> bool cs_out_en; >> bool ext_gen; >> bool cabc_en; >> }; >> > [..] >> -MODULE_DESCRIPTION("pm8941 wled driver"); >> +MODULE_DESCRIPTION("qcom wled driver"); > > I would prefer if this was "Qualcomm WLED driver". > Sure. I will change it in the next series. >> MODULE_LICENSE("GPL v2"); > > Regards, > Bjorn