From 7d0d32dbc65a8332a49aeed3a97e24cb109958b2 Mon Sep 17 00:00:00 2001 From: Solomon Peachy Date: Fri, 23 Apr 2021 11:31:58 -0400 Subject: Nuke the never-functional iriver ifp-7xx port It never worked, and hasn't compiled in something like a decade, Given the HW capabilities (limited onboard flash, no expandability) there's really no point in trying to fix/complete it. Change-Id: I7d175089840396f8891645bd10010d730dd5bfdc --- .../arm/pnx0101/iriver-ifp7xx/powermgmt-ifp7xx.c | 55 ---------------------- 1 file changed, 55 deletions(-) delete mode 100644 firmware/target/arm/pnx0101/iriver-ifp7xx/powermgmt-ifp7xx.c (limited to 'firmware/target/arm/pnx0101/iriver-ifp7xx/powermgmt-ifp7xx.c') diff --git a/firmware/target/arm/pnx0101/iriver-ifp7xx/powermgmt-ifp7xx.c b/firmware/target/arm/pnx0101/iriver-ifp7xx/powermgmt-ifp7xx.c deleted file mode 100644 index 4ce90a4c4f..0000000000 --- a/firmware/target/arm/pnx0101/iriver-ifp7xx/powermgmt-ifp7xx.c +++ /dev/null @@ -1,55 +0,0 @@ -/*************************************************************************** - * __________ __ ___. - * Open \______ \ ____ ____ | | _\_ |__ _______ ___ - * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / - * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < - * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ - * \/ \/ \/ \/ \/ - * $Id$ - * - * Copyright (C) 2002 by Heikki Hannikainen, Uwe Freese - * Revisions copyright (C) 2005 by Gerald Van Baren - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - ****************************************************************************/ - -#include "config.h" -#include "adc.h" -#include "powermgmt.h" - -const unsigned short battery_level_dangerous[BATTERY_TYPES_COUNT] = -{ - 1050, 1150 -}; - -const unsigned short battery_level_shutoff[BATTERY_TYPES_COUNT] = -{ - 1050, 1150 /* FIXME: just copied from above, was missing in powermgmt.c */ -}; - -/* voltages (millivolt) of 0%, 10%, ... 100% when charging disabled */ -const unsigned short percent_to_volt_discharge[BATTERY_TYPES_COUNT][11] = -{ - /* These values are the same as for Ondio divided by 3. */ - /* May need recalibration. */ - { 930, 1080, 1140, 1180, 1210, 1250, 1280, 1320, 1360, 1420, 1580 }, /* alkaline */ - { 1030, 1180, 1210, 1230, 1240, 1250, 1260, 1270, 1280, 1290, 1350 } /* NiMH */ -}; - -/* TODO: only roughly correct */ -#define BATTERY_SCALE_FACTOR 3072 -/* full-scale ADC readout (2^10) in millivolt */ - -/* Returns battery voltage from ADC [millivolts] */ -int _battery_voltage(void) -{ - return (adc_read(ADC_UNREG_POWER) * BATTERY_SCALE_FACTOR) >> 10; -} - -- cgit v1.2.3