X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=drivers%2Fhwmon%2Flm75.c;h=462f902dad49394306889335a04bfd874e38a7ff;hb=1c87dd76c490041fce01e3dbfe29d993eadd693b;hp=81198215ff6cdf867df3ffd1ac88a06d6fd6b772;hpb=50bd0057ba8fceeb48533f8b1a652ccd0e170838;p=oweals%2Fu-boot.git diff --git a/drivers/hwmon/lm75.c b/drivers/hwmon/lm75.c index 81198215ff..462f902dad 100644 --- a/drivers/hwmon/lm75.c +++ b/drivers/hwmon/lm75.c @@ -2,23 +2,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+ */ /* @@ -119,7 +103,7 @@ int dtt_write(int sensor, int reg, int val) } /* dtt_write() */ -static int _dtt_init(int sensor) +int dtt_init_one(int sensor) { int val; @@ -145,32 +129,7 @@ static int _dtt_init(int sensor) return 1; return 0; -} /* _dtt_init() */ - - -int dtt_init (void) -{ - int i; - unsigned char sensors[] = CONFIG_DTT_SENSORS; - const char *const header = "DTT: "; - int old_bus; - - /* switch to correct I2C bus */ - old_bus = I2C_GET_BUS(); - I2C_SET_BUS(CONFIG_SYS_DTT_BUS_NUM); - - 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])); - } - /* switch back to original I2C bus */ - I2C_SET_BUS(old_bus); - - return (0); -} /* dtt_init() */ +} /* dtt_init_one() */ int dtt_get_temp(int sensor) {