/* This is the temperature compensated version as per section 4.2 of the data sheet.  */
static int sht15_calc_humid(struct sht15_data *data)
/* This is the temperature compensated version as per section 4.2 of the data sheet.  */
static int sht15_calc_humid(struct sht15_data *data)
{
	int RHlinear;
	int temp = sht15_calc_temp(data);
	const int c1 = -4;
	const int c2 = 40500;
	const int c3 = -2800;
	RHlinear = c1*1000
		+ c2 * data->val_humid/1000
		+ (data->val_humid * data->val_humid * c3)/1000000;
	return (temp - 25000) * (10000 + 80 * data->val_humid)
		/ 1000000 + RHlinear;
}