From patchwork Wed Apr 15 05:18:49 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Vaittinen, Matti" X-Patchwork-Id: 11489721 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 98B50912 for ; Wed, 15 Apr 2020 05:19:13 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 638802076A for ; Wed, 15 Apr 2020 05:19:13 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="W0+qfjqO" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 638802076A Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=fi.rohmeurope.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-mediatek-bounces+patchwork-linux-mediatek=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=Efe9S9dfhLb8cTGYTpILNWIPny3O9AzUblcxQA2+4K0=; b=W0+qfjqOEzcR1j 9upsY3jf1nk+x5yY8/1aJpb6BlXg7X/IyIcagfVZmdQte+tr4PbVSPEt2zYLBFhj3L1Lrul7PRt7f atS+5ZfGN2BSGljnGj9Rf5Jdmm2UpM1U8Zl9+CrJ/meX26V42DBnW77s+em/tLkmQYn30j3mQvj1A 9ZF0dhoT/X+gYyDCI5EUNWId+lw6KEkw6/AjESizu2A9xNihI9NsiodGixkeJ3zWBq8DqOcz3aBt7 oMjNagKnGaBikuzFkX+6Lrr/B1ZJ3fG8E6HF+Tyky2S0XjraLneem7wzw7L9eclYtHNpsDaHWQVu4 2/oF7w9lfAR5lq+LdM3g==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jOaS6-0008M2-3P; Wed, 15 Apr 2020 05:19:10 +0000 Received: from mail-lj1-f193.google.com ([209.85.208.193]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jOaRv-0008D4-Pe; Wed, 15 Apr 2020 05:19:01 +0000 Received: by mail-lj1-f193.google.com with SMTP id k21so2294706ljh.2; Tue, 14 Apr 2020 22:18:59 -0700 (PDT) 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:user-agent; bh=ZMsHh1YYYlFOiLqHkdfxs3ZwTkApJsjLYTYyYwXvsRY=; b=Z2XvUptOFznNeiDO9vBXQ844eyeps3TO8n69hi2wb94IwZ9MINQx+THUsoTtfK/UDN JKuEWrYqA+cOMjEcUUtQMymOnKRhotht+iqZsvyBD7N9PU7HCIJYnF7Gf3rErYfIEna9 +2LlZnpYtMfX+b0Lm/HSeiPMT9Ja3ESVbabsegWtnIOKe35zB6qM7EDUbXlSpHOfFHQz GPnwVKu7ZH4D4zJbG727h7T2Jt90IlXDDdcMPsHguKGIRUaWqT3qHOLQFy/uYb6/9RK0 F+iSqy/7Kx38S9IwILjsHlKF/rDbmTx1YHqftYoUHoeX5KilBpelSL+rVmBsuf4tQX1w QhFw== X-Gm-Message-State: AGi0PuaYK1bGw1l+13CmNKFI+xi2e1Ma8dckr2BF3EZEhdUoVmIAhYfO ZFtbmZSTAKbIRdLcsE/FVW0= X-Google-Smtp-Source: APiQypJDwC+Gny1s84W5JXa1L8IfqS3GJmXQClSE3zOki0vGM7qD7qv/PJZbyVchsPWkUmDpcRLEww== X-Received: by 2002:a2e:9682:: with SMTP id q2mr2201845lji.289.1586927938381; Tue, 14 Apr 2020 22:18:58 -0700 (PDT) Received: from localhost.localdomain (dc7t7ryyyyyyyyyyyyybt-3.rev.dnainternet.fi. [2001:14ba:16e1:b700::3]) by smtp.gmail.com with ESMTPSA id o6sm10520618lji.15.2020.04.14.22.18.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 14 Apr 2020 22:18:57 -0700 (PDT) Date: Wed, 15 Apr 2020 08:18:49 +0300 From: Matti Vaittinen To: matti.vaittinen@fi.rohmeurope.com, mazziesaccount@gmail.com Subject: [PATCH v10 03/11] power: supply: bd70528: rename linear_range to avoid collision Message-ID: References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.12.1 (2019-06-15) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200414_221859_828267_680DD0CE X-CRM114-Status: GOOD ( 16.21 ) X-Spam-Score: -0.3 (/) X-Spam-Report: SpamAssassin version 3.4.4 on bombadil.infradead.org summary: Content analysis details: (-0.3 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [209.85.208.193 listed in list.dnswl.org] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.2 HEADER_FROM_DIFFERENT_DOMAINS From and EnvelopeFrom 2nd level mail domains are different 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider [mazziesaccount[at]gmail.com] -0.0 SPF_PASS SPF: sender matches SPF record -0.8 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [209.85.208.193 listed in wl.mailspike.net] 0.2 FREEMAIL_FORGED_FROMDOMAIN 2nd level domains in From and EnvelopeFrom freemail headers are different X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Rutland , Andrei Stefanescu , Heiko Stuebner , "Rafael J. Wysocki" , Tony Lindgren , Linus Walleij , Brendan Higgins , Sebastian Reichel , Andreas Kemnade , "Angelo G. Del Regno" , Hsin-Hsiung Wang , linux-samsung-soc@vger.kernel.org, Andy Shevchenko , Axel Lin , Gregory CLEMENT , linux-pm@vger.kernel.org, Krzysztof Kozlowski , Markus Reichl , Bartosz Golaszewski , Chen-Yu Tsai , Andy Gross , markus.laine@fi.rohmeurope.com, Adam Thomson , devicetree@vger.kernel.org, Charles Keepax , linux-omap@vger.kernel.org, Bartlomiej Zolnierkiewicz , linux-arm-msm@vger.kernel.org, Richard Fitzgerald , Mark Brown , linux-mediatek@lists.infradead.org, Matthias Brugger , Thomas Gleixner , Bjorn Andersson , linux-arm-kernel@lists.infradead.org, Support Opensource , Baolin Wang , Sangbeom Kim , Greg Kroah-Hartman , Randy Dunlap , Matti Vaittinen , Liam Girdwood , linux-kernel@vger.kernel.org, mikko.mutanen@fi.rohmeurope.com, Vinod Koul , Rob Herring , patches@opensource.cirrus.com Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+patchwork-linux-mediatek=patchwork.kernel.org@lists.infradead.org Follow-up patches in this series will add a generic struct linear_range. Rename bd70528 internal struct to avoid collision. Signed-off-by: Matti Vaittinen Reviewed-by: Sebastian Reichel --- No changes since v9 Please note, This patch needs to go in before linear_ranges is used by regulators because the struct linear_range becomes visible to this driver via the BD70528 MFD headers which include the regulator headers. Mark, is it Ok for you to take this in your tree as well? drivers/power/supply/bd70528-charger.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/power/supply/bd70528-charger.c b/drivers/power/supply/bd70528-charger.c index b8e1ec106627..3b820110ecfa 100644 --- a/drivers/power/supply/bd70528-charger.c +++ b/drivers/power/supply/bd70528-charger.c @@ -335,14 +335,14 @@ static int bd70528_get_present(struct bd70528_psy *bdpsy, int *val) return 0; } -struct linear_range { +struct bd70528_linear_range { int min; int step; int vals; int low_sel; }; -static const struct linear_range current_limit_ranges[] = { +static const struct bd70528_linear_range current_limit_ranges[] = { { .min = 5, .step = 1, @@ -374,7 +374,7 @@ static const struct linear_range current_limit_ranges[] = { * voltage for low temperatures. The driver currently only reads * the charge current at room temperature. We do set both though. */ -static const struct linear_range warm_charge_curr[] = { +static const struct bd70528_linear_range warm_charge_curr[] = { { .min = 10, .step = 10, @@ -398,7 +398,7 @@ static const struct linear_range warm_charge_curr[] = { #define MAX_WARM_CHG_CURR_SEL 0x1f #define MIN_CHG_CURR_SEL 0x0 -static int find_value_for_selector_low(const struct linear_range *r, +static int find_value_for_selector_low(const struct bd70528_linear_range *r, int selectors, unsigned int sel, unsigned int *val) { @@ -420,7 +420,7 @@ static int find_value_for_selector_low(const struct linear_range *r, * I guess it is enough if we use voltage/current which is closest (below) * the requested? */ -static int find_selector_for_value_low(const struct linear_range *r, +static int find_selector_for_value_low(const struct bd70528_linear_range *r, int selectors, unsigned int val, unsigned int *sel, bool *found) {