void shextdev_SetFlipInformation(shextdet_form_position_result_t state)
{
#ifdef FLIP_USE
#if defined(CONFIG_SENSORS_AMI602) || defined(CONFIG_SENSORS_AMI603)
	switch(state)
	{
	case SHEXTDET_FORM_POSITION_OPEN:
		AMI602_SetFlipInformation(MS_POSITION_OPEN);
		break;
	case SHEXTDET_FORM_POSITION_CLOSE:
		AMI602_SetFlipInformation(MS_POSITION_CLOSE);
		break;
	case SHEXTDET_FORM_POSITION_SWIVEL:
		AMI602_SetFlipInformation(MS_POSITION_SWIVEL);
		break;
	}
#endif	/* CONFIG_SENSORS_AMI602 */

#ifdef CONFIG_SH_YAS530
	switch(state)
	{
	case SHEXTDET_FORM_POSITION_OPEN:
		YAS530_SetShape(YAS_POSITION_OPEN);
		break;
	case SHEXTDET_FORM_POSITION_CLOSE:
		YAS530_SetShape(YAS_POSITION_CLOSE);
		break;
	}
#endif	/* CONFIG_SH_YAS530 */

#if defined( CONFIG_SHTPS_SY3000_TM1918_001 ) | defined( CONFIG_SHTPS_SY3000_TM1963_001 ) | defined( CONFIG_SHTPS_TMA3XX_TMA340_005 )
	switch(state)
	{
	case SHEXTDET_FORM_POSITION_OPEN:
		shtps_setFlipInformation(TPS_POSITION_OPEN);
		break;
	case SHEXTDET_FORM_POSITION_CLOSE:
		shtps_setFlipInformation(TPS_POSITION_CLOSE);
		break;
	}
#endif /* #if defined( CONFIG_SHTPS_SY3000_TM1918_001 ) | defined( CONFIG_SHTPS_SY3000_TM1963_001 ) | defined( CONFIG_SHTPS_TMA3XX_TMA340_005 ) */

#ifdef CONFIG_PERF_LOCK_ENABLE
		perf_lock(&flip_perf_lock);
		perf_unlock(&flip_perf_lock);
#endif	/* CONFIG_PERF_LOCK_ENABLE */

#endif	/* FLIP_USE */
}
Esempio n. 2
0
void shextdev_SetFlipInformation(shextdet_form_position_result_t state)
{
#ifdef FLIP_USE
#ifdef CONFIG_SENSORS_AMI602
	switch(state)
	{
	case SHEXTDET_FORM_POSITION_OPEN:
		AMI602_SetFlipInformation(MS_POSITION_OPEN);
		break;
	case SHEXTDET_FORM_POSITION_CLOSE:
		AMI602_SetFlipInformation(MS_POSITION_CLOSE);
		break;
	case SHEXTDET_FORM_POSITION_SWIVEL:
		AMI602_SetFlipInformation(MS_POSITION_SWIVEL);
		break;
	}
#endif	/* CONFIG_SENSORS_AMI602 */

#ifdef CONFIG_SH_YAS530
	switch(state)
	{
	case SHEXTDET_FORM_POSITION_OPEN:
		YAS530_SetShape(YAS_POSITION_OPEN);
		break;
	case SHEXTDET_FORM_POSITION_CLOSE:
		YAS530_SetShape(YAS_POSITION_CLOSE);
		break;
	}
#endif	/* CONFIG_SH_YAS530 */

#ifdef CONFIG_PERF_LOCK_ENABLE
		perf_lock(&flip_perf_lock);
		perf_unlock(&flip_perf_lock);
#endif	/* CONFIG_PERF_LOCK_ENABLE */

#endif	/* FLIP_USE */
}