From patchwork Tue Apr 14 08:03:30 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Vaittinen, Matti" X-Patchwork-Id: 11487007 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 2F4816CA for ; Tue, 14 Apr 2020 08:03:53 +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 098F42072D for ; Tue, 14 Apr 2020 08:03:53 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="M9E7HWHr" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 098F42072D 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=JI+swx1cPzD+mPEjOkft4c/IEDPcGBu81fIfErfErJk=; b=M9E7HWHrV/kEu7 Fmk9NVYDoOJB5oMC60w1XU9Bat3JBfuWgLs75YWODEFD/5tfXCKTd1a3sAJn0DHFIOlRssNUBwjZy yBEafxSKlFIAPkDpjRccaMI3+JqRaFPWfEOSY8bMuTpf7xFAeQdMy4xsARQcWJyT3asSHhAUh2KZf lvxUsQhVhLE613uGV9epO0i/NqrhBi76RUUdpQ/yyBWEf8ubYY3BzxZ84Ox/oyhUM8mkiyqSglK8s roHqR6ra1uvdc0HEqvIeyis3F0q7zq79kmwcYW/r6tWou2aPvCBQfyCn+K71XpiRV9NpSKRW+Qed8 p6EqaE95hPeO9v7bPN4Q==; 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 1jOGXu-0004mp-PK; Tue, 14 Apr 2020 08:03:50 +0000 Received: from mail-lj1-f194.google.com ([209.85.208.194]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jOGXm-0004fe-Dz; Tue, 14 Apr 2020 08:03:43 +0000 Received: by mail-lj1-f194.google.com with SMTP id v9so4831356ljk.12; Tue, 14 Apr 2020 01:03:42 -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=pN0+uF+NuMP99C05+WOUNbKmQVPgciz7/EklRsboC3M=; b=Y46j5Ul6I2kDot+VClcxjW0HP8y8+V2FbCUjr5xIokJLqh2dWMvI29+yd6HwAZZtQj aKRDNkDeJ5Y8izmbsEv6JsxwyXDmeBw6Ru56Lh3PYQtkUrCmalx494O516i0dB7iNHSa gVMpZ3HYKuaiduzi6r2RTOfQ7lYBQObVUfvbaeo6VQ75yfUG41SirQErf8SkkovzrDYs BlDlmSkHYZwIj5mD8ZOVoMe36USqnawUTdLN5B8njqW6UVxGOlUIpXnn1m0NKklFovxf ISFqWKV6Soh2kmqAX9lYbQLuea5B0XaQ4bSnNfGr1BIn21JMaW13d6Pt3zveeoNo4w8M Sg+A== X-Gm-Message-State: AGi0PuaUhpTHIWzxv8wBC+se6+4KFJmzlnrMZ9nBQsG1zBQEGELMOT8T WPURvTpJzLAM/nD0PjPOIL0= X-Google-Smtp-Source: APiQypKZH/jzQHp4h5J7XbmiSPeZZi1jUOfpCC+MeL8FCVq+trmxLFT3BV4ZpUbpWQiHzvsbB+ClSw== X-Received: by 2002:a05:651c:200c:: with SMTP id s12mr11906100ljo.30.1586851420610; Tue, 14 Apr 2020 01:03:40 -0700 (PDT) Received: from localhost.localdomain (dc7t7ryyyyyyyyyyyyybt-3.rev.dnainternet.fi. [2001:14ba:16e1:b700::3]) by smtp.gmail.com with ESMTPSA id y199sm9840864lfa.80.2020.04.14.01.03.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 14 Apr 2020 01:03:39 -0700 (PDT) Date: Tue, 14 Apr 2020 11:03:30 +0300 From: Matti Vaittinen To: matti.vaittinen@fi.rohmeurope.com, mazziesaccount@gmail.com Subject: [PATCH v9 03/10] 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_010342_472252_9520E55C X-CRM114-Status: GOOD ( 15.96 ) 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.194 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.194 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 --- Changes since v8 - rebased and reordered series. 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) {