1 From dd73451d7f93925a0aca446c5fef68c543658637 Mon Sep 17 00:00:00 2001
2 From: Dave Stevenson <dave.stevenson@raspberrypi.com>
3 Date: Thu, 20 Jan 2022 15:48:03 +0000
4 Subject: [PATCH] power: rpi-poe: Drop CURRENT_AVG as it is not
7 As documented the _AVG parameters are meant to be hardware
8 averaged, but the implementation for the PoE+ HAT was done in
9 software in the firmware.
13 Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
15 drivers/power/supply/rpi_poe_power.c | 10 ----------
16 1 file changed, 10 deletions(-)
18 --- a/drivers/power/supply/rpi_poe_power.c
19 +++ b/drivers/power/supply/rpi_poe_power.c
20 @@ -106,15 +106,6 @@ static int rpi_poe_power_supply_get_prop
21 r_val->intval = (val > 5);
24 - case POWER_SUPPLY_PROP_CURRENT_AVG:
26 - ret = read_reg(ctx->fw, RPI_POE_ADC_REG, &val);
29 - val = (val * 3300)/9821;
30 - r_val->intval = val * 1000;
33 case POWER_SUPPLY_PROP_CURRENT_NOW:
34 ret = read_reg(ctx->fw, RPI_POE_ADC_REG, &val);
36 @@ -145,7 +136,6 @@ static int rpi_poe_power_supply_get_prop
37 static enum power_supply_property rpi_poe_power_supply_properties[] = {
38 POWER_SUPPLY_PROP_HEALTH,
39 POWER_SUPPLY_PROP_ONLINE,
40 - POWER_SUPPLY_PROP_CURRENT_AVG,
41 POWER_SUPPLY_PROP_CURRENT_NOW,
42 POWER_SUPPLY_PROP_CURRENT_MAX,