/* "Normalized" ADC value is one obtained with 400ms of integration time and 16x gain. This function returns the number of bits of shift needed to convert between normalized values and HW values obtained using given timing and gain settings.  */
static int adc_shiftbits(u8 timing)
/* "Normalized" ADC value is one obtained with 400ms of integration time and 16x gain. This function returns the number of bits of shift needed to convert between normalized values and HW values obtained using given timing and gain settings.  */
static int adc_shiftbits(u8 timing)
{
	int shift = 0;
	switch (timing & TSL2563_TIMING_MASK) {
	case TSL2563_TIMING_13MS:
		shift += 5;
		break;
	case TSL2563_TIMING_100MS:
		shift += 2;
		break;
	case TSL2563_TIMING_400MS:
		break;
	}
	if (!(timing & TSL2563_TIMING_GAIN16))
		shift += 4;
	return shift;
}