Lines Matching +full:data +full:- +full:shift

29 	struct nvkm_device *device = gpio->subdev.device;  in nv50_gpio_reset()
30 struct nvkm_bios *bios = device->bios; in nv50_gpio_reset()
33 int ent = -1; in nv50_gpio_reset()
37 u32 data = nvbios_rd32(bios, entry); in nv50_gpio_reset() local
38 u8 line = (data & 0x0000001f); in nv50_gpio_reset()
39 u8 func = (data & 0x0000ff00) >> 8; in nv50_gpio_reset()
40 u8 defs = !!(data & 0x01000000); in nv50_gpio_reset()
41 u8 unk0 = !!(data & 0x02000000); in nv50_gpio_reset()
42 u8 unk1 = !!(data & 0x04000000); in nv50_gpio_reset()
58 nv50_gpio_location(int line, u32 *reg, u32 *shift) in nv50_gpio_location() argument
63 return -EINVAL; in nv50_gpio_location()
66 *shift = (line & 7) << 2; in nv50_gpio_location()
73 struct nvkm_device *device = gpio->subdev.device; in nv50_gpio_drive()
74 u32 reg, shift; in nv50_gpio_drive() local
76 if (nv50_gpio_location(line, &reg, &shift)) in nv50_gpio_drive()
77 return -EINVAL; in nv50_gpio_drive()
79 nvkm_mask(device, reg, 3 << shift, (((dir ^ 1) << 1) | out) << shift); in nv50_gpio_drive()
86 struct nvkm_device *device = gpio->subdev.device; in nv50_gpio_sense()
87 u32 reg, shift; in nv50_gpio_sense() local
89 if (nv50_gpio_location(line, &reg, &shift)) in nv50_gpio_sense()
90 return -EINVAL; in nv50_gpio_sense()
92 return !!(nvkm_rd32(device, reg) & (4 << shift)); in nv50_gpio_sense()
98 struct nvkm_device *device = gpio->subdev.device; in nv50_gpio_intr_stat()
107 nv50_gpio_intr_mask(struct nvkm_gpio *gpio, u32 type, u32 mask, u32 data) in nv50_gpio_intr_mask() argument
109 struct nvkm_device *device = gpio->subdev.device; in nv50_gpio_intr_mask()
112 inte = (inte & ~(mask << 16)) | (data << 16); in nv50_gpio_intr_mask()
114 inte = (inte & ~mask) | data; in nv50_gpio_intr_mask()