public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Jaehoon Chung <jh80.chung@gmail.com>
To: Simon Glass <sjg@chromium.org>, u-boot@lists.denx.de
Cc: Tom Rini <trini@konsulko.com>, Jaehoon Chung <jh80.chung@samsung.com>
Subject: Re: [PATCH 56/88] power: Drop unused bat_trats driver and battery code
Date: Tue, 31 Jan 2023 21:53:06 +0900	[thread overview]
Message-ID: <519a4405-60d4-c19c-bbe3-e8d94f18e6be@gmail.com> (raw)
In-Reply-To: <20230123220031.3540724-57-sjg@chromium.org>



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 <sjg@chromium.org>

Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>

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 <Tom.Rix at windriver.com>
>  
>  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 <l.majewski@samsung.com>
> -
> -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 <l.majewski@samsung.com>
> - */
> -
> -#include <common.h>
> -#include <console.h>
> -#include <log.h>
> -#include <linux/delay.h>
> -#include <power/pmic.h>
> -#include <power/battery.h>
> -#include <power/max8997_pmic.h>
> -#include <errno.h>
> -
> -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 <p.wilczek@samsung.com>
> - */
> -
> -#include <common.h>
> -#include <log.h>
> -#include <power/pmic.h>
> -#include <power/battery.h>
> -#include <power/max77693_pmic.h>
> -#include <errno.h>
> -
> -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;
> -}

  reply	other threads:[~2023-01-31 12:53 UTC|newest]

Thread overview: 117+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-23 21:59 [PATCH 00/88] Clean up of bad Kconfig options Simon Glass
2023-01-23 21:59 ` [PATCH 01/88] moveconfig: Add an option to compare Kconfig against source Simon Glass
2023-01-23 21:59 ` [PATCH 02/88] treewide: Correct invalid Kconfig syntax and warnings Simon Glass
2023-01-27 10:06   ` Neha Malcom Francis
2023-01-27 13:21     ` Tom Rini
2023-01-27 13:45   ` Tom Rini
2023-01-27 15:00     ` Daniel Schwierzeck
2023-01-27 15:48       ` Tom Rini
2023-02-07  4:02         ` Simon Glass
2023-02-10 12:24       ` Alexey Brodkin
2023-02-10 14:03         ` Tom Rini
2023-01-23 21:59 ` [PATCH 03/88] power: Drop fg_max77693 Simon Glass
2023-01-31 12:51   ` Jaehoon Chung
2023-01-23 21:59 ` [PATCH 04/88] nand: Drop CONFIG_NAND_SPEAR Simon Glass
2023-01-24 12:03   ` Michael Nazzareno Trimarchi
2023-01-23 21:59 ` [PATCH 05/88] power: Drop pmic_max77693.c Simon Glass
2023-01-31 12:51   ` Jaehoon Chung
2023-01-23 21:59 ` [PATCH 06/88] gpio: Drop adi_gpio2 Simon Glass
2023-01-23 21:59 ` [PATCH 07/88] Makefile: Drop CONFIG_AIS_CONFIG_FILE Simon Glass
2023-01-23 21:59 ` [PATCH 08/88] misc: Drop ali512x Simon Glass
2023-01-23 21:59 ` [PATCH 09/88] sandbox: Drop reference to CONFIG_ARCH_DEVICE_TREE Simon Glass
2023-01-23 21:59 ` [PATCH 10/88] Rename ARCH_NPCM7xx Simon Glass
2023-01-23 21:59 ` [PATCH 11/88] arm: mvebu: Correct reference to ARMADA_370 Simon Glass
2023-01-24  6:06   ` Stefan Roese
2023-01-23 21:59 ` [PATCH 12/88] arm: mvebu: Drop reference to CONFIG_ARMADA_39X Simon Glass
2023-01-24  6:07   ` Stefan Roese
2023-01-23 21:59 ` [PATCH 13/88] ppc: Drop bat_rw Simon Glass
2023-01-23 21:59 ` [PATCH 14/88] rockchip: Correct a reference to CONFIG_BOOT_MODE_REG Simon Glass
2023-01-23 21:59 ` [PATCH 15/88] cmd: Add an option to enable the ini command Simon Glass
2023-01-23 21:59 ` [PATCH 16/88] cmd: Drop mfsl command Simon Glass
2023-01-23 21:59 ` [PATCH 17/88] Correct CONFIG_CONTROLCENTERDC Simon Glass
2023-01-23 21:59 ` [PATCH 18/88] Drop dataflash_mmc_mux command Simon Glass
2023-01-23 21:59 ` [PATCH 19/88] Drop CONFIG_DM644X_GPIO Simon Glass
2023-01-23 21:59 ` [PATCH 20/88] Makefile: Avoid use of invalid CONFIG_ option Simon Glass
2023-01-23 21:59 ` [PATCH 21/88] env: Drop ENV_IS_IN_SATA Simon Glass
2023-01-23 21:59 ` [PATCH 22/88] samsung: Drop CONFIG_EXYNOS_PWM_BL Simon Glass
2023-01-23 21:59 ` [PATCH 23/88] fpga: Add a LATTICE option Simon Glass
2023-01-23 21:59 ` [PATCH 24/88] fpga: Add a FPGA_STRATIX_II option Simon Glass
2023-01-23 21:59 ` [PATCH 25/88] misc: Drop mc9sdz60 driver Simon Glass
2023-01-23 21:59 ` [PATCH 26/88] freescale: Drop unused pixis code Simon Glass
2023-01-23 21:59 ` [PATCH 27/88] freescale: Drop unused ftpmu010 driver Simon Glass
2023-01-23 21:59 ` [PATCH 28/88] rcar: Drop timer Simon Glass
2023-01-23 21:59 ` [PATCH 29/88] i2c: Rename I2C_MUX_PCA954x Simon Glass
2023-01-23 22:28   ` Chris Packham
2023-01-24  5:51   ` Heiko Schocher
2023-01-24  7:49   ` Luca Ceresoli
2023-01-23 21:59 ` [PATCH 30/88] imx: Drop unused CONFIG_IMX Simon Glass
2023-01-23 21:59 ` [PATCH 31/88] arm: Drop old kona code Simon Glass
2023-01-23 21:59 ` [PATCH 32/88] video: Drop unused lg4573 driver Simon Glass
2023-01-23 21:59 ` [PATCH 33/88] m68k: Drop unused CONFIG_M52277 Simon Glass
2023-01-23 21:59 ` [PATCH 34/88] m68k: Rename MCF5301x Simon Glass
2023-01-23 21:59 ` [PATCH 35/88] m68k: Rename MCF532x Simon Glass
2023-01-23 21:59 ` [PATCH 36/88] m68k: Rename MCF5441x Simon Glass
2023-01-23 21:59 ` [PATCH 37/88] m68k: Drop unused CONFIG_MACH_DAVINCI_DA830_EVM Simon Glass
2023-01-23 21:59 ` [PATCH 38/88] arm: Drop CONFIG_MMU Simon Glass
2023-01-23 21:59 ` [PATCH 39/88] arc: " Simon Glass
2023-01-23 21:59 ` [PATCH 40/88] ppc: Rename MPC83xx Simon Glass
2023-01-24  5:51   ` Heiko Schocher
2023-01-23 21:59 ` [PATCH 41/88] gpio: Drop unused mpc83xx_gpio driver Simon Glass
2023-01-23 21:59 ` [PATCH 42/88] ppc: Rename MPC85xx Simon Glass
2023-01-23 21:59 ` [PATCH 43/88] powerpc: Rename MPC86xx Simon Glass
2023-01-23 21:59 ` [PATCH 44/88] imx: Rename CONFIG_MXS to CFG_MXS Simon Glass
2023-01-23 21:59 ` [PATCH 45/88] nand: Drop unused actl_nand driver Simon Glass
2023-01-23 21:59 ` [PATCH 46/88] mtd: Drop unused fsl_upm driver Simon Glass
2023-01-24 12:04   ` Michael Nazzareno Trimarchi
2023-01-23 21:59 ` [PATCH 47/88] mtd: Drop unused fsmc_nand driver Simon Glass
2023-01-24 12:06   ` Michael Nazzareno Trimarchi
2023-02-22 19:02   ` Patrick DELAUNAY
2023-01-23 21:59 ` [PATCH 48/88] mtd: Drop unused kb9202_nand driver Simon Glass
2023-01-23 21:59 ` [PATCH 49/88] mtd: Drop unused nand_plat driver Simon Glass
2023-01-23 21:59 ` [PATCH 50/88] Makefile: Drop CONFIG_OF_EARLY_FLATTREE Simon Glass
2023-01-23 21:59 ` [PATCH 51/88] omap: Drop unused CONFIG_OMAP_USB_PHY Simon Glass
2023-01-24 19:09   ` Tom Rini
2023-01-23 21:59 ` [PATCH 52/88] mtd: Drop unused CONFIG_ONENAND_U_BOOT Simon Glass
2023-01-23 21:59 ` [PATCH 53/88] ppc: Drop unused CONFIG_P2020DS Simon Glass
2023-01-23 21:59 ` [PATCH 54/88] gpio: Drop unused pca9698 driver Simon Glass
2023-01-23 21:59 ` [PATCH 55/88] samsung: Rename PINCTRL_EXYNOS78x0 Simon Glass
2023-01-23 21:59 ` [PATCH 56/88] power: Drop unused bat_trats driver and battery code Simon Glass
2023-01-31 12:53   ` Jaehoon Chung [this message]
2023-01-23 22:00 ` [PATCH 57/88] power: Drop unused fg_max17042 driver and fuel gauge code Simon Glass
2023-01-31 12:53   ` Jaehoon Chung
2023-01-23 22:00 ` [PATCH 58/88] power: Drop unused muic_max77693 driver and mfd code Simon Glass
2023-01-31 12:53   ` Jaehoon Chung
2023-01-23 22:00 ` [PATCH 59/88] power: Drop unused muic_max8997 driver Simon Glass
2023-01-31 12:54   ` Jaehoon Chung
2023-01-23 22:00 ` [PATCH 60/88] freescale: Drop unused pq-mds-pib driver Simon Glass
2023-01-23 22:00 ` [PATCH 61/88] rmobile: Drop CONFIG_RMOBILE Simon Glass
2023-01-23 22:00 ` [PATCH 62/88] rtc: Drop old and unused drivers Simon Glass
2023-01-23 22:00 ` [PATCH 63/88] mtd: Drop unused CONFIG_S32V234 Simon Glass
2023-01-23 22:00 ` [PATCH 64/88] mtd: Drop unused scf0403_lcd driver Simon Glass
2023-01-23 22:00 ` [PATCH 65/88] rmobile: Drop CONFIG_SH73A0 and associated code Simon Glass
2023-01-23 22:00 ` [PATCH 66/88] sh4: Drop unused pci_sh7780 driver Simon Glass
2023-01-23 22:00 ` [PATCH 67/88] Drop ubsha1 tool Simon Glass
2023-01-23 22:00 ` [PATCH 68/88] arm: Rename STM32MP13x Simon Glass
2023-01-31 12:47   ` Patrice CHOTARD
2023-02-22 19:07   ` Patrick DELAUNAY
2023-01-23 22:00 ` [PATCH 69/88] arm: Rename STM32MP15x Simon Glass
2023-01-31 12:48   ` Patrice CHOTARD
2023-02-22 19:07   ` Patrick DELAUNAY
2023-01-23 22:00 ` [PATCH 70/88] sysreset: at91: Correct Makefile rule for SYSRESET_AT91 Simon Glass
2023-01-27 13:53   ` Claudiu.Beznea
2023-01-23 22:00 ` [PATCH 71/88] gdsys: Drop unused fpga file Simon Glass
2023-01-23 22:00 ` [PATCH 73/88] compulab: Drop CONFIG_TARGET_MCM_IMX8M_MINI Simon Glass
2023-01-23 22:00 ` [PATCH 74/88] freescale: Drop CONFIG_TARGET_MPC8536DS et al Simon Glass
2023-01-23 22:00 ` [PATCH 75/88] sh4: Drop unused twl6030 driver Simon Glass
2023-01-23 22:00 ` [PATCH 76/88] ppc: Makefile: Drop unused ppc4xx code Simon Glass
2023-01-24  6:18   ` Stefan Roese
2023-01-23 22:00 ` [PATCH 77/88] armada: usb: net: Drop unused USB drivers Simon Glass
2023-01-23 22:00 ` [PATCH 78/88] usb: Drop unused ehci-faraday driver Simon Glass
2023-01-23 22:00 ` [PATCH 79/88] usb: Drop unused fotg210 gadget Simon Glass
2023-01-23 22:00 ` [PATCH 80/88] rmobile: Drop unused ehci-rmobile driver Simon Glass
2023-01-23 22:00 ` [PATCH 81/88] usb: Drop unused ehci-vct driver Simon Glass
2023-01-23 22:00 ` [PATCH 82/88] usb: Drop unused sl811-hcd driver Simon Glass
2023-01-23 22:00 ` [PATCH 85/88] watchdog: Rename WDT_MPC8xx Simon Glass
2023-01-23 22:00 ` [PATCH 87/88] freescale: Drop unused zm7300 driver Simon Glass
2023-01-23 22:00 ` [PATCH 88/88] fdt: Drop use of non-existent OF_PLATDATA option Simon Glass
     [not found] ` <20230123220031.3540724-73-sjg@chromium.org>
2023-01-24  5:52   ` [PATCH 72/88] sh4: Drop unused kona_i2c driver Heiko Schocher

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=519a4405-60d4-c19c-bbe3-e8d94f18e6be@gmail.com \
    --to=jh80.chung@gmail.com \
    --cc=jh80.chung@samsung.com \
    --cc=sjg@chromium.org \
    --cc=trini@konsulko.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox