X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=drivers%2Fhwmon%2Flm81.c;h=c1fc42a83321d002f4c971844e956a447a88916b;hb=e4e251a94a8477d36fa61a9c219430fa4c83fb6b;hp=668ee9fb090aa250cf35c09e136f9659a3a16b83;hpb=50bd0057ba8fceeb48533f8b1a652ccd0e170838;p=u-boot diff --git a/drivers/hwmon/lm81.c b/drivers/hwmon/lm81.c index 668ee9fb09..c1fc42a833 100644 --- a/drivers/hwmon/lm81.c +++ b/drivers/hwmon/lm81.c @@ -7,23 +7,7 @@ * (C) Copyright 2001 * Bill Hunter, Wave 7 Optics, williamhunter@mediaone.net * - * See file CREDITS for list of people who contributed to this - * project. - * - * 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 program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, - * MA 02111-1307 USA + * SPDX-License-Identifier: GPL-2.0+ */ /* @@ -89,7 +73,7 @@ int dtt_write(int sensor, int reg, int val) #define DTT_CONFIG 0x40 #define DTT_ADR 0x48 -static int _dtt_init(int sensor) +int dtt_init_one(int sensor) { int man; int adr; @@ -109,28 +93,11 @@ static int _dtt_init(int sensor) if (adr < 0) return 1; - printf ("DTT: Found LM81@%x Rev: %d\n", adr, rev); + debug ("DTT: Found LM81@%x Rev: %d\n", adr, rev); return 0; -} /* _dtt_init() */ +} /* dtt_init_one() */ -int dtt_init (void) -{ - int i; - unsigned char sensors[] = CONFIG_DTT_SENSORS; - const char *const header = "DTT: "; - - for (i = 0; i < sizeof(sensors); i++) { - if (_dtt_init(sensors[i]) != 0) - printf("%s%d FAILED INIT\n", header, i+1); - else - printf("%s%d is %i C\n", header, i+1, - dtt_get_temp(sensors[i])); - } - - return (0); -} /* dtt_init() */ - #define TEMP_FROM_REG(temp) \ ((temp)<256?((((temp)&0x1fe) >> 1) * 10) + ((temp) & 1) * 5: \ ((((temp)&0x1fe) >> 1) -255) * 10 - ((temp) & 1) * 5) \