summaryrefslogtreecommitdiffstats
path: root/include/linux/power
diff options
context:
space:
mode:
authorSebastian Reichel <sre@kernel.org>2023-03-17 23:57:01 +0100
committerSebastian Reichel <sre@kernel.org>2023-03-29 22:38:57 +0200
commit1b27bf793fd46219c882b8e545ec736cfadc0841 (patch)
tree3282e1fe0034354d6d6711fd8a97f52c447d4801 /include/linux/power
parent2f25b9750fa0d79090cadf6e7d0e3edba4fa58e3 (diff)
downloadlinux-1b27bf793fd46219c882b8e545ec736cfadc0841.tar.gz
linux-1b27bf793fd46219c882b8e545ec736cfadc0841.tar.bz2
linux-1b27bf793fd46219c882b8e545ec736cfadc0841.zip
power: supply: generic-adc-battery: use simple-battery API
Constant battery data is available through power-supply's simple-battery API. This works automatically, so the manual handling can be removed without loosing any feature :) Note, that the POWER_SUPPLY_STATUS_FULL check for the level variable can be dropped, since the variable is never written. It can be re-introduced properly once the driver gets functionality to calculate the current charge level. Apart from that the check must be done fuzzy anyways, since charge estimation usually is not precise enough to always return exactly the full charge capacity for a full battery. Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Reviewed-by: Matti Vaittinen <mazziesaccount@gmail.com> Signed-off-by: Sebastian Reichel <sre@kernel.org>
Diffstat (limited to 'include/linux/power')
-rw-r--r--include/linux/power/generic-adc-battery.h18
1 files changed, 0 insertions, 18 deletions
diff --git a/include/linux/power/generic-adc-battery.h b/include/linux/power/generic-adc-battery.h
deleted file mode 100644
index 54434e4304d3..000000000000
--- a/include/linux/power/generic-adc-battery.h
+++ /dev/null
@@ -1,18 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0-only */
-/*
- * Copyright (C) 2012, Anish Kumar <anish198519851985@gmail.com>
- */
-
-#ifndef GENERIC_ADC_BATTERY_H
-#define GENERIC_ADC_BATTERY_H
-
-/**
- * struct gab_platform_data - platform_data for generic adc iio battery driver.
- * @battery_info: recommended structure to specify static power supply
- * parameters
- */
-struct gab_platform_data {
- struct power_supply_info battery_info;
-};
-
-#endif /* GENERIC_ADC_BATTERY_H */