|
|
|
@ -155,49 +155,6 @@ static void iox74lv_init(void) |
|
|
|
|
gpio_direction_output(IOX_OE, 1); |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
void iox74lv_set(int index) |
|
|
|
|
{ |
|
|
|
|
int i; |
|
|
|
|
|
|
|
|
|
gpio_direction_output(IOX_OE, 0); |
|
|
|
|
|
|
|
|
|
for (i = 7; i >= 0; i--) { |
|
|
|
|
gpio_direction_output(IOX_SHCP, 0); |
|
|
|
|
|
|
|
|
|
if (i == index) |
|
|
|
|
gpio_direction_output(IOX_SDI, seq[qn_output[i]][0]); |
|
|
|
|
else |
|
|
|
|
gpio_direction_output(IOX_SDI, seq[qn_output[i]][1]); |
|
|
|
|
udelay(500); |
|
|
|
|
gpio_direction_output(IOX_SHCP, 1); |
|
|
|
|
udelay(500); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
gpio_direction_output(IOX_STCP, 0); |
|
|
|
|
udelay(500); |
|
|
|
|
/*
|
|
|
|
|
* shift register will be output to pins |
|
|
|
|
*/ |
|
|
|
|
gpio_direction_output(IOX_STCP, 1); |
|
|
|
|
|
|
|
|
|
for (i = 7; i >= 0; i--) { |
|
|
|
|
gpio_direction_output(IOX_SHCP, 0); |
|
|
|
|
gpio_direction_output(IOX_SDI, seq[qn_output[i]][1]); |
|
|
|
|
udelay(500); |
|
|
|
|
gpio_direction_output(IOX_SHCP, 1); |
|
|
|
|
udelay(500); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
gpio_direction_output(IOX_STCP, 0); |
|
|
|
|
udelay(500); |
|
|
|
|
/*
|
|
|
|
|
* shift register will be output to pins |
|
|
|
|
*/ |
|
|
|
|
gpio_direction_output(IOX_STCP, 1); |
|
|
|
|
|
|
|
|
|
gpio_direction_output(IOX_OE, 1); |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
#ifdef CONFIG_SYS_I2C_MXC |
|
|
|
|
#define PC MUX_PAD_CTRL(I2C_PAD_CTRL) |
|
|
|
|
/* I2C1 for PMIC and EEPROM */ |
|
|
|
|