Lines Matching +full:tsi +full:- +full:channel +full:- +full:mask
1 // SPDX-License-Identifier: GPL-2.0
3 * nct6775-i2c - I2C driver for the hardware monitoring functionality of
4 * Nuvoton NCT677x Super-I/O chips
13 * operates in a strictly read-only fashion, with the only exception being the
14 * bank-select register (which seems, thankfully, to be replicated for the i2c
22 #include <linux/hwmon-sysfs.h>
34 struct i2c_client *client = data->driver_data; in nct6775_i2c_read()
36 if (bank != data->bank) { in nct6775_i2c_read()
40 data->bank = bank; in nct6775_i2c_read()
66 struct i2c_client *client = data->driver_data; in nct6775_i2c_write()
68 dev_dbg(&client->dev, "skipping attempted write: %02x -> %03x\n", value, reg); in nct6775_i2c_write()
71 * This is a lie, but writing anything but the bank-select register is in nct6775_i2c_write()
116 struct i2c_client *client = data->driver_data; in nct6775_i2c_probe_init()
126 * controlling/monitoring the fans -- these are thus unlikely to be in nct6775_i2c_probe_init()
129 data->has_fan = 0x03; in nct6775_i2c_probe_init()
130 data->has_fan_min = 0x03; in nct6775_i2c_probe_init()
131 data->has_pwm = 0x03; in nct6775_i2c_probe_init()
135 * is first applied to the device, the automatic TSI channel detection in nct6775_i2c_probe_init()
137 * not find anything if a channel hasn't yet produced a temperature in nct6775_i2c_probe_init()
141 if (!of_property_read_u32(client->dev.of_node, "nuvoton,tsi-channel-mask", in nct6775_i2c_probe_init()
143 data->have_tsi_temp |= tsi_channel_mask & GENMASK(NUM_TSI_TEMP - 1, 0); in nct6775_i2c_probe_init()
160 struct device *dev = &client->dev; in nct6775_i2c_probe()
165 if (of_id && (unsigned long)of_id->data != i2c_id->driver_data) in nct6775_i2c_probe()
167 of_id->name, i2c_id->name); in nct6775_i2c_probe()
169 data = devm_kzalloc(&client->dev, sizeof(*data), GFP_KERNEL); in nct6775_i2c_probe()
171 return -ENOMEM; in nct6775_i2c_probe()
173 data->kind = i2c_id->driver_data; in nct6775_i2c_probe()
175 data->read_only = true; in nct6775_i2c_probe()
176 data->driver_data = client; in nct6775_i2c_probe()
177 data->driver_init = nct6775_i2c_probe_init; in nct6775_i2c_probe()
185 .name = "nct6775-i2c",