int read_gpio_values(const int start, const int count, const char *device, int *result) { int status = 0; int value; *result = 0; for (int i = 0; i < count; i++) { status |= read_gpio_value(start + i, GPIO_PIN_ID, &value); *result |= value << i; } return status; }
//&*&*&*SJ1_20110607, Add check 3G modem exist GPIO status for EVT3. int check_3G_exist(void) { gpio_t *gpio3_base = (gpio_t *)OMAP34XX_GPIO3_BASE; u32 value, reg; /** Get 3G-EXIST GPIO_93(EVT3) **/ value = read_gpio_value((u32)&gpio3_base->datain, 29); reg = __raw_readl(0x48002108); /* DSS_DATA23, GPIO_93 */ reg &= ~(1<<20); /* Set PullDown selected. */ __raw_writel(reg, 0x48002108); return (value); }