Lines Matching +full:spi +full:- +full:hv
5 * Copyright 2002-2003 Rusty Russell, IBM Corporation
14 #include "devicetable-offsets.h"
69 typeof(((struct devid *)0)->f) f = TO_NATIVE(*(typeof(f) *)((m) + OFF_##devid##_##f))
76 typeof(((struct devid *)0)->f) *v = ((m) + OFF_##devid##_##f)
103 if (str[len - 1] != '*') in add_wildcard()
111 sprintf(str + len, "%02x%02x%02x%02x-%02x%02x-%02x%02x-%02x%02x-%02x%02x%02x%02x%02x%02x", in add_uuid()
120 * in .o file. If in-consistent then userspace and kernel does not agree
141 if (*(uint8_t*)(symval+size-id_size+i)) { in device_id_check()
147 *(uint8_t*)(symval+size-id_size+i) ); in device_id_check()
190 "[%X-%X]", in do_usb_entry()
195 range_lo < 0x9 ? "[%X-9" : "[%X", in do_usb_entry()
198 range_hi > 0xA ? "A-%X]" : "%X]", in do_usb_entry()
202 if (bcdDevice_initial_digits < (sizeof(bcdDevice_lo) * 2 - 1)) in do_usb_entry()
221 buf_printf(&mod->dev_table_buf, in do_usb_entry()
226 /* Returns the previous value, so it works like i++ or i-- */
296 * run-time specification that results in catch-all alias in do_usb_entry_multi()
301 /* Convert numeric bcdDevice range into fnmatch-able pattern(s) */ in do_usb_entry_multi()
302 for (ndigits = sizeof(bcdDevice_lo) * 2 - 1; devlo <= devhi; ndigits--) { in do_usb_entry_multi()
323 incbcd(&devhi, -1, max, in do_usb_entry_multi()
335 device_id_check(mod->name, "usb", size, id_size, symval); in do_usb_table()
338 size -= id_size; in do_usb_table()
366 buf_printf(&mod->dev_table_buf, "MODULE_ALIAS(\"%s\");\n", alias); in do_of_entry_multi()
369 buf_printf(&mod->dev_table_buf, "MODULE_ALIAS(\"%s\");\n", alias); in do_of_entry_multi()
378 device_id_check(mod->name, "of", size, id_size, symval); in do_of_table()
381 size -= id_size; in do_of_table()
548 * "acpi:bbsspp" (bb=base-class, ss=sub-class, pp=prog-if)
570 byte_shift = 8 * (3-i); in do_acpi_entry()
589 const unsigned int count = (size / id_size)-1; in do_pnp_device_entry()
592 device_id_check(mod->name, "pnp", size, id_size, symval); in do_pnp_device_entry()
599 buf_printf(&mod->dev_table_buf, in do_pnp_device_entry()
605 buf_printf(&mod->dev_table_buf, in do_pnp_device_entry()
615 const unsigned int count = (size / id_size)-1; in do_pnp_card_entries()
618 device_id_check(mod->name, "pnp", size, id_size, symval); in do_pnp_card_entries()
657 buf_printf(&mod->dev_table_buf, in do_pnp_card_entries()
663 buf_printf(&mod->dev_table_buf, in do_pnp_card_entries()
740 /* input:b0v0p0e0-eXkXrXaXmXlXsXfXwX where X is comma-separated %02X. */
766 sprintf(alias + strlen(alias), "-e*"); in do_input_entry()
820 ADD(alias, "hv", hversion != PA_HVERSION_ANY_ID, hversion); in do_parisc_entry()
907 sprintf(&guid_name[i], "%02x", TO_NATIVE((guid->b)[i/2])); in do_vmbus_entry()
953 /* Looks like: spi:S */
1037 if (!((phy_id_mask >> (31-i)) & 1)) in do_mdio_entry()
1039 else if ((phy_id >> (31-i)) & 1) in do_mdio_entry()
1068 'A' + ((vendor >> 2) & 0x3f) - 1, in do_isapnp_entry()
1069 'A' + (((vendor & 3) << 3) | ((vendor >> 13) & 7)) - 1, in do_isapnp_entry()
1070 'A' + ((vendor >> 8) & 0x1f) - 1, in do_isapnp_entry()
1126 /* Ensure that the string remains NUL-terminated: */ in append_nibble_mask()
1129 /* Advance the caller's end-of-string pointer: */ in append_nibble_mask()
1136 * N is exactly 8 digits, where each is an upper-case hex digit, or
1148 fatal("%s: Masked-off bit(s) of AMBA device ID are non-zero: " in do_amba_entry()
1155 (id >> (4 * (7 - digit))) & 0xf, in do_amba_entry()
1156 (mask >> (4 * (7 - digit))) & 0xf); in do_amba_entry()
1164 * N is exactly 2 digits, where each is an upper-case hex digit, or
1292 /* Looks like: fsl-mc:vNdN */
1299 sprintf(alias, "fsl-mc:v%08Xd%s", vendor, *obj_type); in do_fsl_mc_entry()
1344 sprintf(alias, "tee:%02x%02x%02x%02x-%02x%02x-%02x%02x-%02x%02x-%02x%02x%02x%02x%02x%02x", in do_tee_entry()
1394 * N is exactly 2 digits, where each is an upper-case hex digit.
1443 device_id_check(mod->name, device_id, size, id_size, symval); in do_table()
1445 size -= id_size; in do_table()
1448 if (do_entry(mod->name, symval+i, alias)) { in do_table()
1449 buf_printf(&mod->dev_table_buf, in do_table()
1477 {"spi", SIZE_spi_device_id, do_spi_entry},
1506 * so we write into the mod->dev_table_buf buffer. */
1516 if (!sym->st_shndx || get_secindex(info, sym) >= info->num_sections) in handle_moddevtable()
1520 if (ELF_ST_TYPE(sym->st_info) != STT_OBJECT) in handle_moddevtable()
1530 if (strcmp(name + namelen - strlen("_device_table"), "_device_table")) in handle_moddevtable()
1535 namelen = identifier - name; in handle_moddevtable()
1537 /* Handle all-NULL symbols allocated into .bss */ in handle_moddevtable()
1538 if (info->sechdrs[get_secindex(info, sym)].sh_type & SHT_NOBITS) { in handle_moddevtable()
1539 zeros = calloc(1, sym->st_size); in handle_moddevtable()
1542 symval = (void *)info->hdr in handle_moddevtable()
1543 + info->sechdrs[get_secindex(info, sym)].sh_offset in handle_moddevtable()
1544 + sym->st_value; in handle_moddevtable()
1549 do_usb_table(symval, sym->st_size, mod); in handle_moddevtable()
1551 do_of_table(symval, sym->st_size, mod); in handle_moddevtable()
1553 do_pnp_device_entry(symval, sym->st_size, mod); in handle_moddevtable()
1555 do_pnp_card_entries(symval, sym->st_size, mod); in handle_moddevtable()
1562 if (sym_is(name, namelen, p->device_id)) { in handle_moddevtable()
1563 do_table(symval, sym->st_size, p->id_size, in handle_moddevtable()
1564 p->device_id, p->do_entry, mod); in handle_moddevtable()
1576 buf_write(buf, mod->dev_table_buf.p, mod->dev_table_buf.pos); in add_moddevtable()
1577 free(mod->dev_table_buf.p); in add_moddevtable()