Lines Matching +full:cs +full:- +full:value +full:- +full:bit
1 /*-
58 sc->dev = dev; in spibus_attach()
71 retval += printf(" at cs %d", devi->cs); in spibus_print_child()
72 retval += printf(" mode %d", devi->mode); in spibus_print_child()
73 retval += resource_list_print_type(&devi->rl, "irq", in spibus_print_child()
85 device_printf(bus, "<unknown card> at cs %d mode %d\n", devi->cs, in spibus_probe_nomatch()
86 devi->mode); in spibus_probe_nomatch()
94 int cs; in spibus_child_location() local
96 cs = devi->cs & ~SPIBUS_CS_HIGH; /* trim 'cs high' bit */ in spibus_child_location()
97 sbuf_printf(sb, "bus=%d cs=%d", device_get_unit(bus), cs); in spibus_child_location()
110 *(uint32_t *)result = devi->cs; in spibus_read_ivar()
113 *(uint32_t *)result = devi->mode; in spibus_read_ivar()
116 *(uint32_t *)result = devi->clock; in spibus_read_ivar()
119 *(uint32_t *)result = devi->cs_delay; in spibus_read_ivar()
126 spibus_write_ivar(device_t bus, device_t child, int which, uintptr_t value) in spibus_write_ivar() argument
135 /* Any non-zero value is allowed for max clock frequency. */ in spibus_write_ivar()
136 if (value == 0) in spibus_write_ivar()
138 devi->clock = (uint32_t)value; in spibus_write_ivar()
144 /* Valid SPI modes are 0-3. */ in spibus_write_ivar()
145 if (value > 3) in spibus_write_ivar()
147 devi->mode = (uint32_t)value; in spibus_write_ivar()
150 devi->cs_delay = (uint32_t)value; in spibus_write_ivar()
174 resource_list_init(&devi->rl); in spibus_add_child_common()
187 resource_list_free(&devi->rl); in spibus_child_deleted()
207 devi->mode = SPIBUS_MODE_NONE; in spibus_hinted_child()
208 resource_int_value(dname, dunit, "clock", &devi->clock); in spibus_hinted_child()
209 resource_int_value(dname, dunit, "cs", &devi->cs); in spibus_hinted_child()
210 resource_int_value(dname, dunit, "mode", &devi->mode); in spibus_hinted_child()
224 return (&devi->rl); in spibus_get_resource_list()