From patchwork Fri Mar 12 08:36:03 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 398504 Delivered-To: patch@linaro.org Received: by 2002:a02:8562:0:0:0:0:0 with SMTP id g89csp1011316jai; Fri, 12 Mar 2021 00:36:57 -0800 (PST) X-Google-Smtp-Source: ABdhPJwpFTaUUEIvQFkV7Qaypb+mlMCZvO78r9xFGiNJ7xpZw18d6UwMzKM1KzmIYZleoo1XZ5y/ X-Received: by 2002:aa7:d445:: with SMTP id q5mr12657203edr.382.1615538217285; Fri, 12 Mar 2021 00:36:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1615538217; cv=none; d=google.com; s=arc-20160816; b=MUZ4SLo4YhefTEvtTMjx3+y80s7z7i92gVDBtMoz3YTpGXoTfrWaC3YQPdT1Jszt/a DwoRYEKvOtRJ7VTzjAZEkl/mKQU/KRR1y0sigRKW/k8/fMioCuERTV07KsPx2/11YAMb D6FdQaS7NmTq2e92sJRT0T0JrvFSiWVUW1X4E0cAPfDxGx/uZvKJ8u4XcGJ/3NM9NRh7 ZS7nsxWPThqZ4kZIIjfEuO8ifdAa4rBr3NgMZAABqlLmqN+QbOMvy8y9TYZahoTyNefp 5Zg96vaMhSrvyK0ptl9pCusNk4wf3ZA0wdeze/ogOYswzC+ZHRjNw7hku3Wy0/Xphtsp VclA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=w3IZh6Sr3KpjXM0LqFQFqH1i8vaQmDVN35tRH7/mbAU=; b=Ll+uZb/NhXBylbqNaNmIGz9KXzuqF0Lg8tfUsme+l6YbztKJH+1t87eHKb8Bh4z1i6 vzQO6t9ni/qjgFOrWl04jN99dWCcHPPtGMyWvKsFVwNTCgldYJ48TDoPl1v3t00jMQ0B 6pu2rGlUiNsgzHL9AhNAW2ZpNDwPsprQwYN62buHPPkJ0fLj96FZYgUChZD2RPLyFYjV +uKEM+Dr5bWXk3fYuc2JGzyntS4mVgI07OipTefQu3Fxm3b1jHBOZYqFe+yGtNR63DGJ DOr6y6QBvmOPSUVgSmTGtlqpW5JhklG0qppVjWTa4Y8cXmysA0iQfusiJ2cEO6z645+r pTyA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=w4PN1C4P; spf=pass (google.com: domain of linux-pm-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-pm-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 u6si546401ejf.56.2021.03.12.00.36.57; Fri, 12 Mar 2021 00:36:57 -0800 (PST) Received-SPF: pass (google.com: domain of linux-pm-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=w4PN1C4P; spf=pass (google.com: domain of linux-pm-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-pm-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 S232363AbhCLIgW (ORCPT + 7 others); Fri, 12 Mar 2021 03:36:22 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39048 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232251AbhCLIgP (ORCPT ); Fri, 12 Mar 2021 03:36:15 -0500 Received: from mail-lj1-x230.google.com (mail-lj1-x230.google.com [IPv6:2a00:1450:4864:20::230]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E0500C061574 for ; Fri, 12 Mar 2021 00:36:14 -0800 (PST) Received: by mail-lj1-x230.google.com with SMTP id z25so5695936lja.3 for ; Fri, 12 Mar 2021 00:36:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=w3IZh6Sr3KpjXM0LqFQFqH1i8vaQmDVN35tRH7/mbAU=; b=w4PN1C4PgugnW7X5qRA0bcvSlXdgQLcTfkchIx0g+Hin/luGafbnvA2aV/WxDs2ar6 XrD/+ibpcgVcuoPff1Cp1tkimFnIBsHp48mxcjjn58EWXIz4SJqmxKEXImfdGQwdZtQF +IO0VbfdjPVxP4ZBNW/Bbicd0DoS2ZjmsycP4IHap5SpZ4U1jGnropCsldbRsPXZiEZO kntOeDJluDH47l0LSpRjbsgf8w7NJPXpkpEWaTPvCOAE4f3paj3i8hYY40SdKSemRz/z VWNOk0fzneDCuiWEmduxwGqYtxMVbd6TpvE7ZIOezFhqugFwYv2UDZ3YzpiPrtyMBCRD 7drg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=w3IZh6Sr3KpjXM0LqFQFqH1i8vaQmDVN35tRH7/mbAU=; b=b78PMOtsfCpQSU/xz4wICRItBLMM7D2+aOqz8Tmkvo/asQANSQllsBffP+GIMTrefx MDg1wb/fK9UMMF+BZqv2JZRinNQDWpblDUTAWLsN35BeAXVbHAQCnMg8ond2tbsJzJAb 45XoK+Wbx6bnAcUHIE2fwzdk8/c0ruX5wk938tr3+KwJFh53QdEU3hZGR8/dGq5LeGa1 TLnnzTX9UUGAQSOI2bRthRmx0aq2iA5FW1JgueuH0Kp6Thm8odgIP0Hoy0Q2Sdwrl8vZ KaK8g0DcJLlQz/e7TQIHjHcs5xsD5iFJtds1ALCyGnHR7xoj+d4KFAQ/ZK+NKqBdkUu3 TBTQ== X-Gm-Message-State: AOAM532MOSqOGSHzN9QrzPpRFSKOpS34cGKBvUFJ2xXuOnzzUobDuezk qKr0WpaL8CwPxxM2yfdIQ7OjkA== X-Received: by 2002:a2e:b17b:: with SMTP id a27mr1760158ljm.62.1615538173441; Fri, 12 Mar 2021 00:36:13 -0800 (PST) Received: from localhost.localdomain (c-d7cb225c.014-348-6c756e10.bbcust.telenor.se. [92.34.203.215]) by smtp.gmail.com with ESMTPSA id p6sm1617532lfc.71.2021.03.12.00.36.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 12 Mar 2021 00:36:13 -0800 (PST) From: Linus Walleij To: lee.jones@linaro.org, Sebastian Reichel Cc: linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, Linus Walleij Subject: [PATCH 3/4] mfd/power: ab8500: Push algorithm to power supply code Date: Fri, 12 Mar 2021 09:36:03 +0100 Message-Id: <20210312083604.3708890-4-linus.walleij@linaro.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20210312083604.3708890-1-linus.walleij@linaro.org> References: <20210312083604.3708890-1-linus.walleij@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org The charging algorithm header is only used locally in the power supply subsystem so push this down into drivers/power/supply and rename from the confusing "ux500_chargalg.h" to "ab8500-chargalg.h" for clarity: it is only used with the AB8500. This is another remnant of non-DT code needing to pass data from boardfiles, which we don't do anymore. Signed-off-by: Linus Walleij --- .../power/supply/ab8500-chargalg.h | 6 +++--- drivers/power/supply/ab8500_charger.c | 2 +- drivers/power/supply/abx500_chargalg.c | 2 +- drivers/power/supply/pm2301_charger.c | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) rename include/linux/mfd/abx500/ux500_chargalg.h => drivers/power/supply/ab8500-chargalg.h (93%) -- 2.29.2 diff --git a/include/linux/mfd/abx500/ux500_chargalg.h b/drivers/power/supply/ab8500-chargalg.h similarity index 93% rename from include/linux/mfd/abx500/ux500_chargalg.h rename to drivers/power/supply/ab8500-chargalg.h index 9b97d284d0ce..94a6f9068bc5 100644 --- a/include/linux/mfd/abx500/ux500_chargalg.h +++ b/drivers/power/supply/ab8500-chargalg.h @@ -4,8 +4,8 @@ * Author: Johan Gardsmark for ST-Ericsson. */ -#ifndef _UX500_CHARGALG_H -#define _UX500_CHARGALG_H +#ifndef _AB8500_CHARGALG_H_ +#define _AB8500_CHARGALG_H_ #include @@ -48,4 +48,4 @@ struct ux500_charger { extern struct blocking_notifier_head charger_notifier_list; -#endif +#endif /* _AB8500_CHARGALG_H_ */ diff --git a/drivers/power/supply/ab8500_charger.c b/drivers/power/supply/ab8500_charger.c index 50989a5ec95c..a9be10eb2c22 100644 --- a/drivers/power/supply/ab8500_charger.c +++ b/drivers/power/supply/ab8500_charger.c @@ -28,12 +28,12 @@ #include #include #include -#include #include #include #include #include "ab8500-bm.h" +#include "ab8500-chargalg.h" /* Charger constants */ #define NO_PW_CONN 0 diff --git a/drivers/power/supply/abx500_chargalg.c b/drivers/power/supply/abx500_chargalg.c index 5b28d58041b4..f5b792243727 100644 --- a/drivers/power/supply/abx500_chargalg.c +++ b/drivers/power/supply/abx500_chargalg.c @@ -28,10 +28,10 @@ #include #include #include -#include #include #include "ab8500-bm.h" +#include "ab8500-chargalg.h" /* Watchdog kick interval */ #define CHG_WD_INTERVAL (6 * HZ) diff --git a/drivers/power/supply/pm2301_charger.c b/drivers/power/supply/pm2301_charger.c index 5aeff75db33b..d53e0c37c059 100644 --- a/drivers/power/supply/pm2301_charger.c +++ b/drivers/power/supply/pm2301_charger.c @@ -18,13 +18,13 @@ #include #include #include -#include #include #include #include #include #include "ab8500-bm.h" +#include "ab8500-chargalg.h" #include "pm2301_charger.h" #define to_pm2xxx_charger_ac_device_info(x) container_of((x), \