data->vrm = i2c_which_vrm(); 
data->vrm = vid_which_vrm(); 
w83781d_init_client(struct i2c_client *client){	struct w83781d_data *data = i2c_get_clientdata(client);	int i, p;	int type = data->type;	u8 tmp;	if (init && type != as99127f) {	/* this resets registers we don't have					   documentation for on the as99127f */		/* save these registers */		i = w83781d_read_value(client, W83781D_REG_BEEP_CONFIG);		p = w83781d_read_value(client, W83781D_REG_PWMCLK12);		/* Reset all except Watchdog values and last conversion values		   This sets fan-divs to 2, among others */		w83781d_write_value(client, W83781D_REG_CONFIG, 0x80);		/* Restore the registers and disable power-on abnormal beep.		   This saves FAN 1/2/3 input/output values set by BIOS. */		w83781d_write_value(client, W83781D_REG_BEEP_CONFIG, i | 0x80);		w83781d_write_value(client, W83781D_REG_PWMCLK12, p);		/* Disable master beep-enable (reset turns it on).		   Individual beep_mask should be reset to off but for some reason		   disabling this bit helps some people not get beeped */		w83781d_write_value(client, W83781D_REG_BEEP_INTS2, 0);	}	data->vrm = i2c_which_vrm();	if ((type != w83781d) && (type != as99127f)) {		tmp = w83781d_read_value(client, W83781D_REG_SCFG1);		for (i = 1; i <= 3; i++) {			if (!(tmp & BIT_SCFG1[i - 1])) {				data->sens[i - 1] = W83781D_DEFAULT_BETA;			} else {				if (w83781d_read_value				    (client,				     W83781D_REG_SCFG2) & BIT_SCFG2[i - 1])					data->sens[i - 1] = 1;				else					data->sens[i - 1] = 2;			}			if (type == w83783s && i == 2)				break;		}	}	if (init && type != as99127f) {		/* Enable temp2 */		tmp = w83781d_read_value(client, W83781D_REG_TEMP2_CONFIG);		if (tmp & 0x01) {			dev_warn(&client->dev, "Enabling temp2, readings "				 "might not make sense\n");			w83781d_write_value(client, W83781D_REG_TEMP2_CONFIG,				tmp & 0xfe);		}		/* Enable temp3 */		if (type != w83783s) {			tmp = w83781d_read_value(client,				W83781D_REG_TEMP3_CONFIG);			if (tmp & 0x01) {				dev_warn(&client->dev, "Enabling temp3, "					 "readings might not make sense\n");				w83781d_write_value(client,					W83781D_REG_TEMP3_CONFIG, tmp & 0xfe);			}		}		if (type != w83781d) {			/* enable comparator mode for temp2 and temp3 so			   alarm indication will work correctly */			i = w83781d_read_value(client, W83781D_REG_IRQ);			if (!(i & 0x40))				w83781d_write_value(client, W83781D_REG_IRQ,						    i | 0x40);		}	}	/* Start monitoring */	w83781d_write_value(client, W83781D_REG_CONFIG,			    (w83781d_read_value(client,						W83781D_REG_CONFIG) & 0xf7)			    | 0x01);}
4520	/local/tlutelli/issta_data/temp/c/2005_temp/2005/4520/303760b44a7a142cb9f4c9df4609fb63bbda98db/w83781d.c/clean/drivers/hwmon/w83781d.c