Lines Matching refs:bus
17 static void cpld_gpio_bus_set_addr(struct cpld_gpio_bus *bus, unsigned addr) in cpld_gpio_bus_set_addr() argument
21 for (pin = 0; pin < bus->num_addr; pin++) in cpld_gpio_bus_set_addr()
22 kw_gpio_set_value(bus->addr[pin], (addr >> pin) & 1); in cpld_gpio_bus_set_addr()
25 static void cpld_gpio_bus_set_data(struct cpld_gpio_bus *bus, unsigned data) in cpld_gpio_bus_set_data() argument
29 for (pin = 0; pin < bus->num_data; pin++) in cpld_gpio_bus_set_data()
30 kw_gpio_set_value(bus->data[pin], (data >> pin) & 1); in cpld_gpio_bus_set_data()
33 static void cpld_gpio_bus_enable_select(struct cpld_gpio_bus *bus) in cpld_gpio_bus_enable_select() argument
36 kw_gpio_set_value(bus->enable, 0); in cpld_gpio_bus_enable_select()
37 kw_gpio_set_value(bus->enable, 1); in cpld_gpio_bus_enable_select()
40 void cpld_gpio_bus_write(struct cpld_gpio_bus *bus, in cpld_gpio_bus_write() argument
43 cpld_gpio_bus_set_addr(bus, addr); in cpld_gpio_bus_write()
44 cpld_gpio_bus_set_data(bus, value); in cpld_gpio_bus_write()
45 cpld_gpio_bus_enable_select(bus); in cpld_gpio_bus_write()