Lines Matching refs:client
127 struct i2c_client *client; member
152 w83l786ng_read_value(struct i2c_client *client, u8 reg) in w83l786ng_read_value() argument
154 return i2c_smbus_read_byte_data(client, reg); in w83l786ng_read_value()
158 w83l786ng_write_value(struct i2c_client *client, u8 reg, u8 value) in w83l786ng_write_value() argument
160 return i2c_smbus_write_byte_data(client, reg, value); in w83l786ng_write_value()
166 struct i2c_client *client = data->client; in w83l786ng_update_device() local
173 dev_dbg(&client->dev, "Updating w83l786ng data.\n"); in w83l786ng_update_device()
177 data->in[i] = w83l786ng_read_value(client, in w83l786ng_update_device()
179 data->in_min[i] = w83l786ng_read_value(client, in w83l786ng_update_device()
181 data->in_max[i] = w83l786ng_read_value(client, in w83l786ng_update_device()
187 data->fan[i] = w83l786ng_read_value(client, in w83l786ng_update_device()
189 data->fan_min[i] = w83l786ng_read_value(client, in w83l786ng_update_device()
194 reg_tmp = w83l786ng_read_value(client, W83L786NG_REG_FAN_DIV); in w83l786ng_update_device()
198 pwmcfg = w83l786ng_read_value(client, W83L786NG_REG_FAN_CFG); in w83l786ng_update_device()
206 (w83l786ng_read_value(client, W83L786NG_REG_PWM[i]) in w83l786ng_update_device()
214 data->temp[i][j] = w83l786ng_read_value(client, in w83l786ng_update_device()
220 reg_tmp = w83l786ng_read_value(client, W83L786NG_REG_TOLERANCE); in w83l786ng_update_device()
256 struct i2c_client *client = data->client; \
263 w83l786ng_write_value(client, W83L786NG_REG_IN_##REG(nr), \
309 struct i2c_client *client = data->client; in store_fan_min() local
319 w83l786ng_write_value(client, W83L786NG_REG_FAN_MIN(nr), in store_fan_min()
347 struct i2c_client *client = data->client; in store_fan_div() local
379 fan_div_reg = w83l786ng_read_value(client, W83L786NG_REG_FAN_DIV) in store_fan_div()
384 w83l786ng_write_value(client, W83L786NG_REG_FAN_DIV, in store_fan_div()
389 w83l786ng_write_value(client, W83L786NG_REG_FAN_MIN(nr), in store_fan_div()
438 struct i2c_client *client = data->client; in store_temp() local
448 w83l786ng_write_value(client, W83L786NG_REG_TEMP[nr][index], in store_temp()
493 struct i2c_client *client = data->client; in show_pwm_reg() local
506 reg = w83l786ng_read_value(client, W83L786NG_REG_FAN_CFG); in show_pwm_reg()
510 w83l786ng_write_value(client, W83L786NG_REG_FAN_CFG, reg); in show_pwm_reg()
521 struct i2c_client *client = data->client; in store_pwm() local
533 val |= w83l786ng_read_value(client, W83L786NG_REG_PWM[nr]) & 0xf0; in store_pwm()
534 w83l786ng_write_value(client, W83L786NG_REG_PWM[nr], val); in store_pwm()
545 struct i2c_client *client = data->client; in store_pwm_enable() local
558 reg = w83l786ng_read_value(client, W83L786NG_REG_FAN_CFG); in store_pwm_enable()
562 w83l786ng_write_value(client, W83L786NG_REG_FAN_CFG, reg); in store_pwm_enable()
601 struct i2c_client *client = data->client; in store_tolerance() local
611 tol_mask = w83l786ng_read_value(client, in store_tolerance()
619 w83l786ng_write_value(client, W83L786NG_REG_TOLERANCE, in store_tolerance()
674 w83l786ng_detect(struct i2c_client *client, struct i2c_board_info *info) in w83l786ng_detect() argument
676 struct i2c_adapter *adapter = client->adapter; in w83l786ng_detect()
684 if ((w83l786ng_read_value(client, W83L786NG_REG_CONFIG) & 0x80)) { in w83l786ng_detect()
686 client->addr); in w83l786ng_detect()
691 man_id = (w83l786ng_read_value(client, W83L786NG_REG_MAN_ID1) << 8) + in w83l786ng_detect()
692 w83l786ng_read_value(client, W83L786NG_REG_MAN_ID2); in w83l786ng_detect()
693 chip_id = w83l786ng_read_value(client, W83L786NG_REG_CHIP_ID); in w83l786ng_detect()
708 static void w83l786ng_init_client(struct i2c_client *client) in w83l786ng_init_client() argument
713 w83l786ng_write_value(client, W83L786NG_REG_CONFIG, 0x80); in w83l786ng_init_client()
716 tmp = w83l786ng_read_value(client, W83L786NG_REG_CONFIG); in w83l786ng_init_client()
718 w83l786ng_write_value(client, W83L786NG_REG_CONFIG, tmp | 0x01); in w83l786ng_init_client()
722 w83l786ng_probe(struct i2c_client *client, const struct i2c_device_id *id) in w83l786ng_probe() argument
724 struct device *dev = &client->dev; in w83l786ng_probe()
734 data->client = client; in w83l786ng_probe()
738 w83l786ng_init_client(client); in w83l786ng_probe()
742 data->fan_min[i] = w83l786ng_read_value(client, in w83l786ng_probe()
747 reg_tmp = w83l786ng_read_value(client, W83L786NG_REG_FAN_DIV); in w83l786ng_probe()
751 hwmon_dev = devm_hwmon_device_register_with_groups(dev, client->name, in w83l786ng_probe()