data->vrm = i2c_which_vrm(); 
data->vrm = vid_which_vrm(); 
static void w83627hf_init_client(struct i2c_client *client){	struct w83627hf_data *data = i2c_get_clientdata(client);	int i;	int type = data->type;	u8 tmp;	if(init) {		/* save this register */		i = w83627hf_read_value(client, W83781D_REG_BEEP_CONFIG);		/* Reset all except Watchdog values and last conversion values		   This sets fan-divs to 2, among others */		w83627hf_write_value(client, W83781D_REG_CONFIG, 0x80);		/* Restore the register and disable power-on abnormal beep.		   This saves FAN 1/2/3 input/output values set by BIOS. */		w83627hf_write_value(client, W83781D_REG_BEEP_CONFIG, i | 0x80);		/* Disable master beep-enable (reset turns it on).		   Individual beeps should be reset to off but for some reason		   disabling this bit helps some people not get beeped */		w83627hf_write_value(client, W83781D_REG_BEEP_INTS2, 0);	}	/* Minimize conflicts with other winbond i2c-only clients...  */	/* disable i2c subclients... how to disable main i2c client?? */	/* force i2c address to relatively uncommon address */	w83627hf_write_value(client, W83781D_REG_I2C_SUBADDR, 0x89);	w83627hf_write_value(client, W83781D_REG_I2C_ADDR, force_i2c);	/* Read VID only once */	if (w83627hf == data->type || w83637hf == data->type) {		int lo = w83627hf_read_value(client, W83781D_REG_VID_FANDIV);		int hi = w83627hf_read_value(client, W83781D_REG_CHIPID);		data->vid = (lo & 0x0f) | ((hi & 0x01) << 4);	} else if (w83627thf == data->type) {		data->vid = w83627thf_read_gpio5(client) & 0x3f;	}	/* Read VRM & OVT Config only once */	if (w83627thf == data->type || w83637hf == data->type) {		data->vrm_ovt = 			w83627hf_read_value(client, W83627THF_REG_VRM_OVT_CFG);		data->vrm = (data->vrm_ovt & 0x01) ? 90 : 82;	} else {		/* Convert VID to voltage based on default VRM */		data->vrm = i2c_which_vrm();	}	tmp = w83627hf_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 (w83627hf_read_value			    (client,			     W83781D_REG_SCFG2) & BIT_SCFG2[i - 1])				data->sens[i - 1] = 1;			else				data->sens[i - 1] = 2;		}		if ((type == w83697hf) && (i == 2))			break;	}	if(init) {		/* Enable temp2 */		tmp = w83627hf_read_value(client, W83781D_REG_TEMP2_CONFIG);		if (tmp & 0x01) {			dev_warn(&client->dev, "Enabling temp2, readings "				 "might not make sense\n");			w83627hf_write_value(client, W83781D_REG_TEMP2_CONFIG,				tmp & 0xfe);		}		/* Enable temp3 */		if (type != w83697hf) {			tmp = w83627hf_read_value(client,				W83781D_REG_TEMP3_CONFIG);			if (tmp & 0x01) {				dev_warn(&client->dev, "Enabling temp3, "					 "readings might not make sense\n");				w83627hf_write_value(client,					W83781D_REG_TEMP3_CONFIG, tmp & 0xfe);			}		}		if (type == w83627hf) {			/* enable PWM2 control (can't hurt since PWM reg		           should have been reset to 0xff) */			w83627hf_write_value(client, W83627HF_REG_PWMCLK12,					    0x19);		}		/* enable comparator mode for temp2 and temp3 so	           alarm indication will work correctly */		i = w83627hf_read_value(client, W83781D_REG_IRQ);		if (!(i & 0x40))			w83627hf_write_value(client, W83781D_REG_IRQ,					    i | 0x40);	}	/* Start monitoring */	w83627hf_write_value(client, W83781D_REG_CONFIG,			    (w83627hf_read_value(client,						W83781D_REG_CONFIG) & 0xf7)			    | 0x01);}
4520	/local/tlutelli/issta_data/temp/c/2005_temp/2005/4520/303760b44a7a142cb9f4c9df4609fb63bbda98db/w83627hf.c/buggy/drivers/hwmon/w83627hf.c