Beispiel #1
0
static void snd_h4000_audio_set_speaker_power(int mode) {
	if (mode == 1) {
		DPM_DEBUG("h4000_audio: Turning speaker on\n");
		asic3_set_gpio_out_d(asic3, GPIOD_SPK_EN, GPIOD_SPK_EN);
	} else {
		DPM_DEBUG("h4000_audio: Turning speaker off\n");
		asic3_set_gpio_out_d(asic3, GPIOD_SPK_EN, 0);
	}
}
Beispiel #2
0
static void snd_h4000_audio_set_codec_reset(int mode) {
	if (mode == 1) {
		DPM_DEBUG("h4000_audio: Codec reset on\n");
		GPSR(GPIO_NR_H4000_CODEC_RST) = GPIO_bit(GPIO_NR_H4000_CODEC_RST);
	} else {
		DPM_DEBUG("h4000_audio: Codec reset off\n");
		GPCR(GPIO_NR_H4000_CODEC_RST) = GPIO_bit(GPIO_NR_H4000_CODEC_RST);
	}
}
Beispiel #3
0
static void snd_h4000_audio_set_codec_power(int mode) {
	if (mode == 1) {
		DPM_DEBUG("h4000_audio: Turning codec on\n");
		asic3_set_gpio_out_c(asic3, GPIOC_AUD_POWER_ON, GPIOC_AUD_POWER_ON);
	} else {
		DPM_DEBUG("h4000_audio: Turning codec off\n");
		asic3_set_gpio_out_c(asic3, GPIOC_AUD_POWER_ON, 0);
	}
}
Beispiel #4
0
static void serial_detect(struct rs232_serial_pdata *pdata)
{
	int connected = gpiodev_get_value(&pdata->detect_gpio);
	if (!connected)
		DPM_DEBUG("rs232-serial: Turning off port\n");
	dpm_power(&pdata->power_ctrl, connected);
	if (connected)
		DPM_DEBUG("rs232-serial: Turning on port\n");
}
Beispiel #5
0
static void pda_udc_command(int cmd)
{
	switch (cmd) {
		case PXA2XX_UDC_CMD_DISCONNECT:
			DPM_DEBUG("pda_udc: Turning off port\n");
			dpm_power(&pdata->power_ctrl, 0);
			break;
		case PXA2XX_UDC_CMD_CONNECT:
			DPM_DEBUG("pda_udc: Turning on port\n");
			dpm_power(&pdata->power_ctrl, 1);
			break;
		default:
			printk("pda_udc: unknown command!\n");
			break;
	}
}
Beispiel #6
0
static void rx3000_udc_pullup(enum s3c2410_udc_cmd_e cmd)
{
        switch (cmd)
        {
                case S3C2410_UDC_P_ENABLE :
			DPM_DEBUG("rx3000_udc: Turning on port\n");        
                        asic3_set_gpio_out_a(&s3c_device_asic3.dev, ASIC3_GPA3, ASIC3_GPA3);
                        break;
                case S3C2410_UDC_P_DISABLE :
			DPM_DEBUG("rx3000_udc: Turning off port\n");        
                        asic3_set_gpio_out_a(&s3c_device_asic3.dev, ASIC3_GPA3, 0);
                        break;
                case S3C2410_UDC_P_RESET :
                        break;
                default:
                        break;
        }
}
static void rx3000_serial_power(int power)
{
	if (power) {
		DPM_DEBUG("rx3000_serial: Turning on\n");
		/* configure uart1 gpios */
		s3c2410_gpio_cfgpin(S3C2410_GPH4, S3C2410_GPH4_TXD1);
		s3c2410_gpio_cfgpin(S3C2410_GPH5, S3C2410_GPH5_RXD1);

		/* power on */
    		asic3_set_gpio_out_b(&s3c_device_asic3.dev, ASIC3_GPB2, ASIC3_GPB2);
	} else {
		DPM_DEBUG("rx3000_serial: Turning off\n");
		/* power off */
    		asic3_set_gpio_out_b(&s3c_device_asic3.dev, ASIC3_GPB2, 0);

		/* configure uart1 gpios */
		s3c2410_gpio_cfgpin(S3C2410_GPH4, S3C2410_GPH4_OUTP);
		s3c2410_gpio_cfgpin(S3C2410_GPH5, S3C2410_GPH5_OUTP);
	}
}