1*95e1ffb1Schristos /* $NetBSD: hpcbatterytable.h,v 1.6 2005/12/11 12:21:22 christos Exp $ */ 298f091d6Ssato 398f091d6Ssato /* 498f091d6Ssato * Copyright (c) 2000-2001 SATO Kazumi 598f091d6Ssato * All rights reserved. 698f091d6Ssato * 798f091d6Ssato * Redistribution and use in source and binary forms, with or without 898f091d6Ssato * modification, are permitted provided that the following conditions 998f091d6Ssato * are met: 1098f091d6Ssato * 1. Redistributions of source code must retain the above copyright 1198f091d6Ssato * notice, this list of conditions and the following disclaimer. 1298f091d6Ssato * 2. Redistributions in binary form must reproduce the above copyright 1398f091d6Ssato * notice, this list of conditions and the following disclaimer in the 1498f091d6Ssato * documentation and/or other materials provided with the distribution. 1598f091d6Ssato * 1698f091d6Ssato * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 1798f091d6Ssato * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 1898f091d6Ssato * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 1998f091d6Ssato * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 2098f091d6Ssato * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 2198f091d6Ssato * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 2298f091d6Ssato * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 2398f091d6Ssato * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 2498f091d6Ssato * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 2598f091d6Ssato * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 2698f091d6Ssato * SUCH DAMAGE. 2798f091d6Ssato * 2898f091d6Ssato */ 2998f091d6Ssato #ifdef hpcmips 3098f091d6Ssato /* 3198f091d6Ssato * NEC MCR/430, MCR/530 parameters 3298f091d6Ssato */ 3398f091d6Ssato struct hpcbattery_spec hpcbattery_mcr530_spec = 3498f091d6Ssato { 3598f091d6Ssato 0, /* guess_charge */ 3698f091d6Ssato 0, /* guess_ac_dc */ 3798f091d6Ssato 0, /* main_port */ 3898f091d6Ssato 10, /* drift */ 3998f091d6Ssato 20, /* ac_bias */ 4098f091d6Ssato 840, /* dc_100p (100) */ 4198f091d6Ssato 810, /* dc_80p (80) */ 4298f091d6Ssato 780, /* dc_50p (50) */ 4398f091d6Ssato 720, /* dc_20p (20) */ 4498f091d6Ssato 630, /* dc_critical (0) */ 4598f091d6Ssato 875, /* ac_charge_100p */ 4698f091d6Ssato 860, /* ac_100p */ 4798f091d6Ssato 830, /* ac_80p */ 4898f091d6Ssato 800, /* ac_50p */ 4998f091d6Ssato 740, /* ac_20p */ 5098f091d6Ssato 640, /* ac_critical */ 5198f091d6Ssato 1, /* main_flag */ 5298f091d6Ssato 5398f091d6Ssato 1, /* backup_port */ 5498f091d6Ssato 900, /* b_full */ 5598f091d6Ssato 720, /* b_low */ 5698f091d6Ssato 640, /* b_critical */ 5798f091d6Ssato 1, /* b_flag */ 5898f091d6Ssato 5998f091d6Ssato -1, /* nocharge_port */ 6098f091d6Ssato -1, /* n_low */ 6198f091d6Ssato 0, /* n_flag */ 6298f091d6Ssato 6398f091d6Ssato -1, /* dc_ac_port */ 6498f091d6Ssato -1, /* da_low */ 6598f091d6Ssato 0, /* da_flag */ 6698f091d6Ssato 6798f091d6Ssato -1, /* c_ac_port */ 6898f091d6Ssato -1, /* c_low */ 6998f091d6Ssato 0 /* c_flag */ 7098f091d6Ssato }; 7198f091d6Ssato 7298f091d6Ssato /* 7398f091d6Ssato * DoCoMo sigmarion parameter 7498f091d6Ssato */ 7598f091d6Ssato struct hpcbattery_spec hpcbattery_sigmarion_spec = 7698f091d6Ssato { 7798f091d6Ssato 0, /* guess_charge */ 7898f091d6Ssato 0, /* guess_ac_dc */ 7998f091d6Ssato 0, /* main_port */ 8098f091d6Ssato 10, /* drift */ 8198f091d6Ssato 20, /* ac_bias */ 8298f091d6Ssato 840, /* dc_100p */ 8398f091d6Ssato 810, /* dc_80p */ 8498f091d6Ssato 780, /* dc_50p */ 8598f091d6Ssato 720, /* dc_20p */ 8698f091d6Ssato 630, /* dc_critical */ 8798f091d6Ssato 875, /* ac_charge_100p */ 8898f091d6Ssato 860, /* ac_100p */ 8998f091d6Ssato 830, /* ac_80p */ 9098f091d6Ssato 800, /* ac_50p */ 9198f091d6Ssato 740, /* ac_20p */ 9298f091d6Ssato 640, /* ac_critical */ 9398f091d6Ssato 1, /* main_flag */ 9498f091d6Ssato 9598f091d6Ssato 1, /* backup_port */ 9698f091d6Ssato 900, /* b_full */ 9798f091d6Ssato 880, /* b_low */ 9898f091d6Ssato 860, /* b_critical */ 9998f091d6Ssato 1, /* b_flag */ 10098f091d6Ssato 10198f091d6Ssato -1, /* nocharge_port */ 10298f091d6Ssato -1, /* n_low */ 10398f091d6Ssato 0, /* n_flag */ 10498f091d6Ssato 10598f091d6Ssato -1, /* dc_ac_port */ 10698f091d6Ssato -1, /* da_low */ 10798f091d6Ssato 0, /* da_flag */ 10898f091d6Ssato 10998f091d6Ssato -1, /* c_ac_port */ 11098f091d6Ssato -1, /* c_low */ 11198f091d6Ssato 0 /* c_flag */ 11298f091d6Ssato }; 11398f091d6Ssato 11498f091d6Ssato /* 11598f091d6Ssato * IBM WorkPad z50 11698f091d6Ssato */ 11798f091d6Ssato struct hpcbattery_spec hpcbattery_z50_spec = 11898f091d6Ssato { 11998f091d6Ssato 0, /* guess_charge */ 12098f091d6Ssato 0, /* guess_ac_dc */ 12198f091d6Ssato 0, /* main_port */ 12298f091d6Ssato 10, /* drift */ 12398f091d6Ssato 20, /* ac_bias */ 12498f091d6Ssato 945, /* dc_100p */ 12598f091d6Ssato 915, /* dc_80p */ 12698f091d6Ssato 880, /* dc_50p */ 12798f091d6Ssato 855, /* dc_20p */ 12898f091d6Ssato 820, /* dc_critical */ 12998f091d6Ssato -1, /* ac_charge_100p */ 13098f091d6Ssato -1, /* ac_100p */ 13198f091d6Ssato -1, /* ac_80p */ 13298f091d6Ssato -1, /* ac_50p */ 13398f091d6Ssato 969, /* ac_20p */ 13498f091d6Ssato -1, /* ac_critical */ 13598f091d6Ssato 1, /* main_flag */ 13698f091d6Ssato 13798f091d6Ssato 1, /* backup_port */ 13898f091d6Ssato 970, /* b_full */ 13998f091d6Ssato 900, /* b_low */ 14098f091d6Ssato 800, /* b_critical */ 14198f091d6Ssato 1, /* b_flag */ 14298f091d6Ssato 14398f091d6Ssato 2, /* nocharge_port */ 14498f091d6Ssato 800, /* n_low */ 14598f091d6Ssato 1, /* n_flag */ 14698f091d6Ssato 14798f091d6Ssato -1, /* dc_ac_port */ 14898f091d6Ssato -1, /* da_low */ 14998f091d6Ssato 0, /* da_flag */ 15098f091d6Ssato 15198f091d6Ssato -1, /* c_ac_port */ 15298f091d6Ssato -1, /* c_low */ 15398f091d6Ssato 0 /* c_flag */ 15498f091d6Ssato }; 1555215d667Ssato 1565215d667Ssato /* 1575215d667Ssato * NEC MC-R700/730 parameters 1585215d667Ssato */ 1595215d667Ssato struct hpcbattery_spec hpcbattery_mcr700_spec = 1605215d667Ssato { 1615215d667Ssato 0, /* guess_charge */ 1625215d667Ssato 0, /* guess_ac_dc */ 1635215d667Ssato 0, /* main_port */ 1645215d667Ssato 10, /* drift */ 1655215d667Ssato 20, /* ac_bias */ 1665215d667Ssato 840, /* dc_100p (100) */ 1675215d667Ssato 820, /* dc_80p (80) */ 1685215d667Ssato 790, /* dc_50p (50) */ 1695215d667Ssato 770, /* dc_20p (20) */ 1705215d667Ssato 760, /* dc_critical (0) */ 1715215d667Ssato 860, /* ac_charge_100p */ 1725215d667Ssato 850, /* ac_100p */ 1735215d667Ssato 840, /* ac_80p */ 1745215d667Ssato 830, /* ac_50p */ 1755215d667Ssato 810, /* ac_20p */ 1765215d667Ssato 800, /* ac_critical */ 1775215d667Ssato 1, /* main_flag */ 1785215d667Ssato 1795215d667Ssato 1, /* backup_port */ 1805215d667Ssato 900, /* b_full */ 1815215d667Ssato 720, /* b_low */ 1825215d667Ssato 640, /* b_critical */ 1835215d667Ssato 1, /* b_flag */ 1845215d667Ssato 1855215d667Ssato -1, /* nocharge_port */ 1865215d667Ssato -1, /* n_low */ 1875215d667Ssato 0, /* n_flag */ 1885215d667Ssato 1895215d667Ssato -1, /* dc_ac_port */ 1905215d667Ssato -1, /* da_low */ 1915215d667Ssato 0, /* da_flag */ 1925215d667Ssato 1935215d667Ssato -1, /* c_ac_port */ 1945215d667Ssato -1, /* c_low */ 1955215d667Ssato 0 /* c_flag */ 1965215d667Ssato }; 1975215d667Ssato 19898f091d6Ssato #endif /* hpcmips */ 19998f091d6Ssato 20098f091d6Ssato /* parameter table */ 20198f091d6Ssato 20298f091d6Ssato struct platid_data hpcbattery_parameters[] = { 20398f091d6Ssato #ifdef hpcmips 20498f091d6Ssato { &platid_mask_MACH_NEC_MCR_510, &hpcbattery_mcr530_spec }, /* XXX */ 20598f091d6Ssato { &platid_mask_MACH_NEC_MCR_520, &hpcbattery_mcr530_spec }, /* XXX */ 20698f091d6Ssato { &platid_mask_MACH_NEC_MCR_520A, &hpcbattery_mcr530_spec }, /* XXX */ 20798f091d6Ssato { &platid_mask_MACH_NEC_MCR_530, &hpcbattery_mcr530_spec }, 20898f091d6Ssato { &platid_mask_MACH_NEC_MCR_530A, &hpcbattery_mcr530_spec }, 20998f091d6Ssato { &platid_mask_MACH_NEC_MCR_SIGMARION, &hpcbattery_sigmarion_spec }, 21098f091d6Ssato { &platid_mask_MACH_IBM_WORKPAD_Z50, &hpcbattery_z50_spec }, 2115215d667Ssato { &platid_mask_MACH_NEC_MCR_700, &hpcbattery_mcr700_spec }, 2125215d667Ssato { &platid_mask_MACH_NEC_MCR_700A, &hpcbattery_mcr700_spec }, /* XXX */ 2135215d667Ssato { &platid_mask_MACH_NEC_MCR_730, &hpcbattery_mcr700_spec }, /* XXX */ 21488d334ffSshin { &platid_mask_MACH_NEC_MCR_730A, &hpcbattery_mcr700_spec }, /* XXX */ 21598f091d6Ssato #endif /* hpcmips */ 2162ddad1a1Ssato { NULL, NULL } /* terminator, don't delete */ 21798f091d6Ssato }; 21898f091d6Ssato /* end */ 219