summaryrefslogtreecommitdiff
path: root/drivers/power/battery/bat_trats2.c
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2023-02-07 20:36:16 -0500
committerTom Rini <trini@konsulko.com>2023-02-07 20:36:16 -0500
commit94fe4ed9455d559ccca45865c195fe4ecdaffb51 (patch)
treeb56e39c0847ac222c122e8feda40c27af21a0a30 /drivers/power/battery/bat_trats2.c
parentb69026c91f2e98b247120e217a986f5056724baf (diff)
parentd727ace9abf13eb72e7ac29113f52fa3fd3357bb (diff)
Merge branch '2023-02-07-Kconfig-cleanup-dead-code-removal'
To quote the author: This series adds source scanning to moveconfig.py so that it can look for Kconfig options mentioned in the source which do not appear in Kconfig, and vice versa. This tool is then used to clean up the unused or obsolete options mentioned in Makefiles, along with any attached source code.
Diffstat (limited to 'drivers/power/battery/bat_trats2.c')
-rw-r--r--drivers/power/battery/bat_trats2.c65
1 files changed, 0 insertions, 65 deletions
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;
-}