From patchwork Sun May 14 12:31:27 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jakob Hauser X-Patchwork-Id: 681908 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7773DC7EE2D for ; Sun, 14 May 2023 12:37:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231640AbjENMhb (ORCPT ); Sun, 14 May 2023 08:37:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35196 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234676AbjENMh3 (ORCPT ); Sun, 14 May 2023 08:37:29 -0400 Received: from sonic314-19.consmr.mail.ir2.yahoo.com (sonic314-19.consmr.mail.ir2.yahoo.com [77.238.177.145]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 90D8726A1 for ; Sun, 14 May 2023 05:37:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rocketmail.com; s=s2048; t=1684067845; bh=VqIx9LSfStGIwADHV2nx489yoOzekt9YBpjG8dE8w6w=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From:Subject:Reply-To; b=qvDNkQPO9K0t6noCETiE2k3jPvB2018MeCDFv5vhHr1B/30OMrcsZHHgzi26lkjifU55eitVjXhZfl0vSwjwytq7+15IZFB7UrzterCBNpmTmihAqil2bO2EnwgB28aml9tVDu5wBfdGYeWURqBR0RzYZHPXuibwqt20QcSYvjT0FEr3l3s/qSTmnnwYdPj/in/DodkLGzl7b6ATuAUR81VCmwKkyl7Kacb1QKe6R/0CthUC4a+uQPkEVTqt9UZ7z34SPreexH7zjJkYY6Ia+1iZn55jOxCegrqknhfav6AWilYgTwk8qq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OY6YaSbPlfHvEKjpHhZEZDApSusY4g_vnVcxAl5LJV0trkLuihqD3wZhLDl D0TcipUYvoqSBogBDYXPhMaZ8SZx7qMOIrkCR8PRGOLBkhldSi5H3NBL.aKbZMa8gi0UU7xlYUX9 xkoLADQY75aHdWFYzzwGyisWp4BJER_YJY9LguNSgiMU79MHioyHpzc8oR7jl1bcB9zYuh3jLjqd OFFQIgjPjqDD_A8vseq5ixqCRIqh8.wBzrzGMbpuKF5iw3u5ZOJnnYnQ1UGdgnVpdg77tFUAKC52 .7E0Z1jZXWWIcj2AGJOsHsR47khFsHJATD26749hgiIFb3Ys08NzwjOtaZx_fY7RDqOPvC5ZUFxS DVRQc.VurLQjzRT.mWyzZReZv3sG9NYsqzsBJk2McQFHvYEaDPdYKN8qPqnZD6wlYgH6S393dAl0 iJObruMFUdtH3J63JVoyPtJvejo6F4dDijWgNWqAESZssabT5AaZdaFd3mKZRPh.jJdNR39DExbn faNMFCy_qmCNYGr_Pfkkq4R6hhU5GtGF2waq2qrI_7D8RqLqr6L1.Z4SSpI4AOno0cxk4Mb2Z_Pt 2800_of4NpIMQ.gufzEPokN2VLBvardPsEteY24xFT1RDGcMi1EikVGUWnRY8piUIK_StMPJcttw 3LHINN0krFtHDdjYRTMxwO6CWoiKshekO8VQ_Nqz68LAcS9rtqo9WcV8O9g06VoZE.DNHzzujpkj hSFjuNmt8_3qWCRzJFbaIzwSEmE17HQ-- X-Sonic-MF: X-Sonic-ID: 3aacc60e-eb6d-4247-8021-2b47a8d10bff Received: from sonic.gate.mail.ne1.yahoo.com by sonic314.consmr.mail.ir2.yahoo.com with HTTP; Sun, 14 May 2023 12:37:25 +0000 Received: by hermes--production-ir2-7867f454fc-tvsct (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID ec262f708c8ca7d1990bed607fb68ca2; Sun, 14 May 2023 12:37:20 +0000 (UTC) From: Jakob Hauser To: Sebastian Reichel , Lee Jones , Liam Girdwood , Mark Brown , Rob Herring , Krzysztof Kozlowski Cc: Beomho Seo , Chanwoo Choi , Stephan Gerhold , Raymond Hackley , Pavel Machek , Axel Lin , ChiYuan Huang , Linus Walleij , Henrik Grimler , linux-pm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, phone-devel@vger.kernel.org, ~postmarketos/upstreaming@lists.sr.ht, Jakob Hauser Subject: [PATCH v5 07/10] power: supply: rt5033_battery: Move struct rt5033_battery to battery driver Date: Sun, 14 May 2023 14:31:27 +0200 Message-Id: <20230514123130.41172-8-jahau@rocketmail.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230514123130.41172-1-jahau@rocketmail.com> References: <20230514123130.41172-1-jahau@rocketmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org Move struct rt5033_battery from the mfd header into the battery driver because it's not used by others. Within struct rt5033_battery, remove the line "struct rt5033_dev *rt5033;" because it doesn't get used. In rt5033.h, remove #include , it's not necessary anymore. In rt5033_battery.c, remove #include , it's not necessary anymore either. Instead add #include and Signed-off-by: Jakob Hauser Acked-by: Sebastian Reichel --- drivers/power/supply/rt5033_battery.c | 9 ++++++++- include/linux/mfd/rt5033.h | 8 -------- 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/drivers/power/supply/rt5033_battery.c b/drivers/power/supply/rt5033_battery.c index 5c04cf305219..91e1efd81f69 100644 --- a/drivers/power/supply/rt5033_battery.c +++ b/drivers/power/supply/rt5033_battery.c @@ -6,11 +6,18 @@ * Author: Beomho Seo */ +#include #include #include #include +#include #include -#include + +struct rt5033_battery { + struct i2c_client *client; + struct regmap *regmap; + struct power_supply *psy; +}; static int rt5033_battery_get_capacity(struct i2c_client *client) { diff --git a/include/linux/mfd/rt5033.h b/include/linux/mfd/rt5033.h index 3992fb2ef0a8..bb3d18945d21 100644 --- a/include/linux/mfd/rt5033.h +++ b/include/linux/mfd/rt5033.h @@ -12,7 +12,6 @@ #include #include #include -#include /* RT5033 regulator IDs */ enum rt5033_regulators { @@ -32,11 +31,4 @@ struct rt5033_dev { bool wakeup; }; -struct rt5033_battery { - struct i2c_client *client; - struct rt5033_dev *rt5033; - struct regmap *regmap; - struct power_supply *psy; -}; - #endif /* __RT5033_H__ */