Lines Matching refs:regs

62 	struct sandbox_emul_fake_regs *regs;  in sandbox_spmi_write()  local
67 regs = priv->gpios[pid & 0x3].r; /* Last 3 bits of pid are gpio # */ in sandbox_spmi_write()
71 val &= regs[off].access_mask; in sandbox_spmi_write()
74 regs[0x8].value &= ~0x1; in sandbox_spmi_write()
75 regs[0x8].value |= val & 0x1; in sandbox_spmi_write()
79 if (regs[off].perms & EMUL_PERM_W) in sandbox_spmi_write()
80 regs[off].value = val & regs[off].access_mask; in sandbox_spmi_write()
88 struct sandbox_emul_fake_regs *regs; in sandbox_spmi_read() local
93 regs = priv->gpios[pid & 0x3].r; /* Last 3 bits of pid are gpio # */ in sandbox_spmi_read()
95 if (regs[0x46].value == 0) /* Block disabled */ in sandbox_spmi_read()
100 if (regs[0x46].value == 0) /* Block disabled */ in sandbox_spmi_read()
102 return regs[off].value; in sandbox_spmi_read()
104 if (regs[off].perms & EMUL_PERM_R) in sandbox_spmi_read()
105 return regs[off].value; in sandbox_spmi_read()
122 struct sandbox_emul_fake_regs *regs = priv->gpios[i].r; in sandbox_spmi_probe() local
123 regs[4].perms = EMUL_PERM_R; in sandbox_spmi_probe()
124 regs[4].value = 0x10; in sandbox_spmi_probe()
125 regs[5].perms = EMUL_PERM_R; in sandbox_spmi_probe()
126 regs[5].value = 0x5; in sandbox_spmi_probe()
127 regs[8].access_mask = 0x81; in sandbox_spmi_probe()
128 regs[8].perms = EMUL_PERM_RW; in sandbox_spmi_probe()
129 regs[0x40].access_mask = 0x7F; in sandbox_spmi_probe()
130 regs[0x40].perms = EMUL_PERM_RW; in sandbox_spmi_probe()
131 regs[0x41].access_mask = 7; in sandbox_spmi_probe()
132 regs[0x41].perms = EMUL_PERM_RW; in sandbox_spmi_probe()
133 regs[0x42].access_mask = 7; in sandbox_spmi_probe()
134 regs[0x42].perms = EMUL_PERM_RW; in sandbox_spmi_probe()
135 regs[0x42].value = 0x4; in sandbox_spmi_probe()
136 regs[0x45].access_mask = 0x3F; in sandbox_spmi_probe()
137 regs[0x45].perms = EMUL_PERM_RW; in sandbox_spmi_probe()
138 regs[0x45].value = 0x1; in sandbox_spmi_probe()
139 regs[0x46].access_mask = 0x80; in sandbox_spmi_probe()
140 regs[0x46].perms = EMUL_PERM_RW; in sandbox_spmi_probe()
141 regs[0x46].value = 0x80; in sandbox_spmi_probe()