Lines Matching +full:htpic +full:- +full:1

1 /*-
2 * SPDX-License-Identifier: BSD-2-Clause
9 * 1. Redistributions of source code must retain the above copyright
95 { addr, IIC_M_WR | IIC_M_NOSTOP, 1, &reg }, in ds1775_read_2()
110 return (-1); in ds1775_read_2()
128 if (strcmp(name, "temp-monitor") != 0 || in ds1775_probe()
134 sc->sc_dev = dev; in ds1775_probe()
135 sc->sc_addr = iicbus_get_addr(dev); in ds1775_probe()
137 device_set_desc(dev, "Temp-Monitor DS1775"); in ds1775_probe()
149 sc->enum_hook.ich_func = ds1775_start; in ds1775_attach()
150 sc->enum_hook.ich_arg = dev; in ds1775_attach()
154 * The unin/i2c is controlled by the htpic on unin. But this is not in ds1775_attach()
155 * the master. The openpic on mac-io is controlling the htpic. in ds1775_attach()
156 * This one gets attached after the mac-io probing and then the in ds1775_attach()
160 if (config_intrhook_establish(&sc->enum_hook) != 0) in ds1775_attach()
188 if (OF_getprop(child, "hwsensor-zone", &sc->sc_sensor.zone, in ds1775_start()
190 sc->sc_sensor.zone = 0; in ds1775_start()
192 plen = OF_getprop(child, "hwsensor-location", sc->sc_sensor.name, in ds1775_start()
193 sizeof(sc->sc_sensor.name)); in ds1775_start()
195 if (plen == -1) { in ds1775_start()
198 for (i = 0; i < strlen(sc->sc_sensor.name); i++) { in ds1775_start()
199 sysctl_name[i] = tolower(sc->sc_sensor.name[i]); in ds1775_start()
207 if (sc->sc_sensor.zone == 0) { in ds1775_start()
208 sc->sc_sensor.target_temp = 500 + ZERO_C_TO_K; in ds1775_start()
209 sc->sc_sensor.max_temp = 600 + ZERO_C_TO_K; in ds1775_start()
212 sc->sc_sensor.target_temp = 300 + ZERO_C_TO_K; in ds1775_start()
213 sc->sc_sensor.max_temp = 600 + ZERO_C_TO_K; in ds1775_start()
216 sc->sc_sensor.read = in ds1775_start()
218 pmac_thermal_sensor_register(&sc->sc_sensor); in ds1775_start()
220 sprintf(sysctl_desc,"%s %s", sc->sc_sensor.name, "(C)"); in ds1775_start()
228 config_intrhook_disestablish(&sc->enum_hook); in ds1775_start()
238 err = ds1775_read_2(sc->sc_dev, sc->sc_addr, DS1775_TEMP, buf); in ds1775_sensor_read()
240 return (-1); in ds1775_sensor_read()