From mboxrd@z Thu Jan 1 00:00:00 1970 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 phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 04F21C38142 for ; Tue, 31 Jan 2023 12:53:18 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 7B7248599E; Tue, 31 Jan 2023 13:53:16 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="iPdj4BE3"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 41FDF859B9; Tue, 31 Jan 2023 13:53:14 +0100 (CET) Received: from mail-pg1-x52c.google.com (mail-pg1-x52c.google.com [IPv6:2607:f8b0:4864:20::52c]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 47E8983D38 for ; Tue, 31 Jan 2023 13:53:10 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=jh80.chung@gmail.com Received: by mail-pg1-x52c.google.com with SMTP id g68so9957256pgc.11 for ; Tue, 31 Jan 2023 04:53:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=PqINhWgPAny4/S6ExoGLHpYyq9PpUgV2ORiSxrIJe80=; b=iPdj4BE3ibY9tx+UZD17eWJBoTRoiABvydBk5aBpA0dYUgtyOjgDXnsPDR45FdyZEo t1H6KKKgpW43QOS6G6CrktmRbaFgXyw0HaqcuDYmUOnYfXu0s9GXOKWdaNmoOBzpQuxw +1dsKIYVKuInJjzHvIINIs/81riXZyxbrXXHgzXY5qV5OoFcQkUKTnKXsgujPNAvVN3R 10C2DkgwPEPmXQS+spjoLtn1KbbemeJNxnTpKlSYm7XoqjSjSGrO2r0QlIsNUJES0sMw ZkWsKqaC2mJ6/uHh/a7vv8pI793q3pzyPu3k0YMdXVc3vCpQ1E1BLQ4qnNh3BsEUEZFN hbZg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=PqINhWgPAny4/S6ExoGLHpYyq9PpUgV2ORiSxrIJe80=; b=LZEo95rP0co7XycX8wCwDIKQCQo34rjqO0DBrHv7VSqzZNkxI3uyErNQntiZKBeC7l Z4EbzIlIfYGMQmBiKsFmZClPdmWITGiNVQUmpztCWpI9zSw+6NRl3/yKWg54emykR3oO FiV/DamQfjvltaPBiE2BteuKL1CjoxAvDQL8Y8PLCvJjudtqWdRn0sNBhcbVCK69o3xv wOl9NDVWb+km5p4EaaK2ZHF71fSG5D5g5toyCAUky8JNBHQbKcSqDJUL42fqBLHJxRzZ 2FlIGflYc6VvkKTdHE4BzhJEtOi2BQAEGp3IqwYAxmh2Ygva+i+Swi7SCvJyGNmsTIDg lyAw== X-Gm-Message-State: AO0yUKXXlspx/rrUuZ9HbmGM+JRB9xxr3xS4Ig+BcB0IxqAGCOgl4UJX HnjuGg8yrMzeyBNMGcmOms4= X-Google-Smtp-Source: AK7set9PgjtH0eV9x4ymJWTNqeDAQm7iNk4K8I+ck829CKGGn6znOifUCoHvBa19ZA4JoAY5+V+OwA== X-Received: by 2002:a05:6a00:2792:b0:590:6d2f:d23a with SMTP id bd18-20020a056a00279200b005906d2fd23amr11554182pfb.10.1675169588666; Tue, 31 Jan 2023 04:53:08 -0800 (PST) Received: from [192.168.0.19] ([183.99.112.216]) by smtp.gmail.com with ESMTPSA id w127-20020a628285000000b005939fe1719fsm5891177pfd.39.2023.01.31.04.53.07 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 31 Jan 2023 04:53:08 -0800 (PST) Message-ID: <519a4405-60d4-c19c-bbe3-e8d94f18e6be@gmail.com> Date: Tue, 31 Jan 2023 21:53:06 +0900 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.2 Subject: Re: [PATCH 56/88] power: Drop unused bat_trats driver and battery code Content-Language: en-US To: Simon Glass , u-boot@lists.denx.de Cc: Tom Rini , Jaehoon Chung References: <20230123220031.3540724-1-sjg@chromium.org> <20230123220031.3540724-57-sjg@chromium.org> From: Jaehoon Chung In-Reply-To: <20230123220031.3540724-57-sjg@chromium.org> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.6 at phobos.denx.de X-Virus-Status: Clean On 1/24/23 06:59, Simon Glass wrote: > This driver and bat_trats2 are not used. Drop them and the entire battery > directory, since there is nothing left. > > Signed-off-by: Simon Glass Reviewed-by: Jaehoon Chung Best Regards, Jaehoon Chung > --- > > drivers/power/Makefile | 1 - > drivers/power/battery/Makefile | 7 --- > drivers/power/battery/bat_trats.c | 91 ------------------------------ > drivers/power/battery/bat_trats2.c | 65 --------------------- > 4 files changed, 164 deletions(-) > delete mode 100644 drivers/power/battery/Makefile > delete mode 100644 drivers/power/battery/bat_trats.c > delete mode 100644 drivers/power/battery/bat_trats2.c > > diff --git a/drivers/power/Makefile b/drivers/power/Makefile > index 34a84808a9c..efdae3655ac 100644 > --- a/drivers/power/Makefile > +++ b/drivers/power/Makefile > @@ -4,7 +4,6 @@ > # Tom Rix > > obj-$(CONFIG_$(SPL_TPL_)ACPI_PMC) += acpi_pmc/ > -obj-y += battery/ > obj-$(CONFIG_$(SPL_TPL_)POWER_DOMAIN) += domain/ > obj-y += fuel_gauge/ > obj-y += mfd/ > diff --git a/drivers/power/battery/Makefile b/drivers/power/battery/Makefile > deleted file mode 100644 > index 370923a6ed9..00000000000 > --- a/drivers/power/battery/Makefile > +++ /dev/null > @@ -1,7 +0,0 @@ > -# SPDX-License-Identifier: GPL-2.0+ > -# > -# Copyright (C) 2012 Samsung Electronics > -# Lukasz Majewski > - > -obj-$(CONFIG_POWER_BATTERY_TRATS) += bat_trats.o > -obj-$(CONFIG_POWER_BATTERY_TRATS2) += bat_trats2.o > diff --git a/drivers/power/battery/bat_trats.c b/drivers/power/battery/bat_trats.c > deleted file mode 100644 > index 54b2bf91e5c..00000000000 > --- a/drivers/power/battery/bat_trats.c > +++ /dev/null > @@ -1,91 +0,0 @@ > -// SPDX-License-Identifier: GPL-2.0+ > -/* > - * Copyright (C) 2012 Samsung Electronics > - * Lukasz Majewski > - */ > - > -#include > -#include > -#include > -#include > -#include > -#include > -#include > -#include > - > -static struct battery battery_trats; > - > -static int power_battery_charge(struct pmic *bat) > -{ > - struct power_battery *p_bat = bat->pbat; > - struct battery *battery = p_bat->bat; > - int k; > - > - if (bat->chrg->chrg_state(p_bat->chrg, PMIC_CHARGER_ENABLE, 450)) > - return -1; > - > - for (k = 0; bat->chrg->chrg_bat_present(p_bat->chrg) && > - bat->chrg->chrg_type(p_bat->muic) && > - battery->state_of_chrg < 100; k++) { > - udelay(2000000); > - if (!(k % 5)) > - puts("."); > - bat->fg->fg_battery_update(p_bat->fg, bat); > - > - if (k == 200) { > - debug(" %d [V]", battery->voltage_uV); > - puts("\n"); > - k = 0; > - } > - > - if (ctrlc()) { > - printf("\nCharging disabled on request.\n"); > - goto exit; > - } > - } > - exit: > - bat->chrg->chrg_state(p_bat->chrg, PMIC_CHARGER_DISABLE, 0); > - > - return 0; > -} > - > -static int power_battery_init_trats(struct pmic *bat_, > - struct pmic *fg_, > - struct pmic *chrg_, > - struct pmic *muic_) > -{ > - bat_->pbat->fg = fg_; > - bat_->pbat->chrg = chrg_; > - bat_->pbat->muic = muic_; > - > - bat_->fg = fg_->fg; > - bat_->chrg = chrg_->chrg; > - bat_->chrg->chrg_type = muic_->chrg->chrg_type; > - return 0; > -} > - > -static struct power_battery power_bat_trats = { > - .bat = &battery_trats, > - .battery_init = power_battery_init_trats, > - .battery_charge = power_battery_charge, > -}; > - > -int power_bat_init(unsigned char bus) > -{ > - static const char name[] = "BAT_TRATS"; > - struct pmic *p = pmic_alloc(); > - > - if (!p) { > - printf("%s: POWER allocation error!\n", __func__); > - return -ENOMEM; > - } > - > - debug("Board BAT init\n"); > - > - p->interface = PMIC_NONE; > - p->name = name; > - p->bus = bus; > - > - p->pbat = &power_bat_trats; > - return 0; > -} > diff --git a/drivers/power/battery/bat_trats2.c b/drivers/power/battery/bat_trats2.c > deleted file mode 100644 > index 1172970d1e0..00000000000 > --- a/drivers/power/battery/bat_trats2.c > +++ /dev/null > @@ -1,65 +0,0 @@ > -// SPDX-License-Identifier: GPL-2.0+ > -/* > - * Copyright (C) 2013 Samsung Electronics > - * Piotr Wilczek > - */ > - > -#include > -#include > -#include > -#include > -#include > -#include > - > -static struct battery battery_trats; > - > -static int power_battery_charge(struct pmic *bat) > -{ > - struct power_battery *p_bat = bat->pbat; > - > - if (bat->chrg->chrg_state(p_bat->chrg, PMIC_CHARGER_ENABLE, 450)) > - return -EINVAL; > - > - return 0; > -} > - > -static int power_battery_init_trats2(struct pmic *bat_, > - struct pmic *fg_, > - struct pmic *chrg_, > - struct pmic *muic_) > -{ > - bat_->pbat->fg = fg_; > - bat_->pbat->chrg = chrg_; > - bat_->pbat->muic = muic_; > - > - bat_->fg = fg_->fg; > - bat_->chrg = chrg_->chrg; > - bat_->chrg->chrg_type = muic_->chrg->chrg_type; > - return 0; > -} > - > -static struct power_battery power_bat_trats2 = { > - .bat = &battery_trats, > - .battery_init = power_battery_init_trats2, > - .battery_charge = power_battery_charge, > -}; > - > -int power_bat_init(unsigned char bus) > -{ > - static const char name[] = "BAT_TRATS2"; > - struct pmic *p = pmic_alloc(); > - > - if (!p) { > - printf("%s: POWER allocation error!\n", __func__); > - return -ENOMEM; > - } > - > - debug("Board BAT init\n"); > - > - p->interface = PMIC_NONE; > - p->name = name; > - p->bus = bus; > - > - p->pbat = &power_bat_trats2; > - return 0; > -}