Exemplo n.º 1
0
/*
 * Read MAX1111 ADC
 */
int sharpsl_pm_pxa_read_max1111(int channel)
{
    if (machine_is_tosa()) // Ugly, better move this function into another module
        return 0;

    return corgi_ssp_max1111_get((channel << MAXCTRL_SEL_SH) | MAXCTRL_PD0 | MAXCTRL_PD1
            | MAXCTRL_SGL | MAXCTRL_UNI | MAXCTRL_STR);
}
Exemplo n.º 2
0
int sharpsl_pm_pxa_read_max1111(int channel)
{
	if (machine_is_tosa()) 
	    return 0;

#ifdef CONFIG_CORGI_SSP_DEPRECATED
	return corgi_ssp_max1111_get((channel << MAXCTRL_SEL_SH) | MAXCTRL_PD0 | MAXCTRL_PD1
			| MAXCTRL_SGL | MAXCTRL_UNI | MAXCTRL_STR);
#else
	extern int max1111_read_channel(int);

	
	return max1111_read_channel(channel >> 1);
#endif
}
Exemplo n.º 3
0
/*
 * Read MAX1111 ADC
 */
int sharpsl_pm_pxa_read_max1111(int channel)
{
	if (machine_is_tosa()) // Ugly, better move this function into another module
	    return 0;

#ifdef CONFIG_CORGI_SSP_DEPRECATED
	return corgi_ssp_max1111_get((channel << MAXCTRL_SEL_SH) | MAXCTRL_PD0 | MAXCTRL_PD1
			| MAXCTRL_SGL | MAXCTRL_UNI | MAXCTRL_STR);
#else
	extern int max1111_read_channel(int);

	/* max1111 accepts channels from 0-3, however,
	 * it is encoded from 0-7 here in the code.
	 */
	return max1111_read_channel(channel >> 1);
#endif
}
Exemplo n.º 4
0
/*
 * Read MAX1111 ADC
 */
static int read_max1111(int channel)
{
	return corgi_ssp_max1111_get((channel << MAXCTRL_SEL_SH) | MAXCTRL_PD0 | MAXCTRL_PD1
			| MAXCTRL_SGL | MAXCTRL_UNI | MAXCTRL_STR);
}