Lines Matching +full:0 +full:x45

17 #define EMUL_GPIO_PID_START 0xC0
18 #define EMUL_GPIO_PID_END 0xC3
22 #define EMUL_GPIO_REG_END 0x46 /* Last valid register */
24 #define EMUL_PERM_R 0x1
25 #define EMUL_PERM_W 0x2
46 if (usid != 0) in check_address_valid()
64 regs = priv->gpios[pid & 0x3].r; /* Last 3 bits of pid are gpio # */ in sandbox_spmi_write()
67 case 0x40: /* Control */ in sandbox_spmi_write()
69 if (((val & 0x30) == 0x10) || ((val & 0x30) == 0x20)) { in sandbox_spmi_write()
71 regs[0x8].value &= ~0x1; in sandbox_spmi_write()
72 regs[0x8].value |= val & 0x1; in sandbox_spmi_write()
79 return 0; in sandbox_spmi_write()
90 regs = priv->gpios[pid & 0x3].r; /* Last 3 bits of pid are gpio # */ in sandbox_spmi_read()
92 if (regs[0x46].value == 0) /* Block disabled */ in sandbox_spmi_read()
93 return 0; in sandbox_spmi_read()
96 case 0x8: /* Status */ in sandbox_spmi_read()
97 if (regs[0x46].value == 0) /* Block disabled */ in sandbox_spmi_read()
98 return 0; in sandbox_spmi_read()
104 return 0; in sandbox_spmi_read()
118 for (i = 0; i < EMUL_GPIO_COUNT; ++i) { in sandbox_spmi_probe()
121 regs[4].value = 0x10; in sandbox_spmi_probe()
123 regs[5].value = 0x5; in sandbox_spmi_probe()
124 regs[8].access_mask = 0x81; in sandbox_spmi_probe()
126 regs[0x40].access_mask = 0x7F; in sandbox_spmi_probe()
127 regs[0x40].perms = EMUL_PERM_RW; in sandbox_spmi_probe()
128 regs[0x41].access_mask = 7; in sandbox_spmi_probe()
129 regs[0x41].perms = EMUL_PERM_RW; in sandbox_spmi_probe()
130 regs[0x42].access_mask = 7; in sandbox_spmi_probe()
131 regs[0x42].perms = EMUL_PERM_RW; in sandbox_spmi_probe()
132 regs[0x42].value = 0x4; in sandbox_spmi_probe()
133 regs[0x45].access_mask = 0x3F; in sandbox_spmi_probe()
134 regs[0x45].perms = EMUL_PERM_RW; in sandbox_spmi_probe()
135 regs[0x45].value = 0x1; in sandbox_spmi_probe()
136 regs[0x46].access_mask = 0x80; in sandbox_spmi_probe()
137 regs[0x46].perms = EMUL_PERM_RW; in sandbox_spmi_probe()
138 regs[0x46].value = 0x80; in sandbox_spmi_probe()
140 return 0; in sandbox_spmi_probe()