Lines Matching +full:data +full:- +full:bus
25 #include "bus.h"
32 u32 data; member
38 struct nv50_i2c_bus *bus = nv50_i2c_bus(base); in nv50_i2c_bus_drive_scl() local
39 struct nvkm_device *device = bus->base.pad->i2c->subdev.device; in nv50_i2c_bus_drive_scl()
40 if (state) bus->data |= 0x01; in nv50_i2c_bus_drive_scl()
41 else bus->data &= 0xfe; in nv50_i2c_bus_drive_scl()
42 nvkm_wr32(device, bus->addr, bus->data); in nv50_i2c_bus_drive_scl()
48 struct nv50_i2c_bus *bus = nv50_i2c_bus(base); in nv50_i2c_bus_drive_sda() local
49 struct nvkm_device *device = bus->base.pad->i2c->subdev.device; in nv50_i2c_bus_drive_sda()
50 if (state) bus->data |= 0x02; in nv50_i2c_bus_drive_sda()
51 else bus->data &= 0xfd; in nv50_i2c_bus_drive_sda()
52 nvkm_wr32(device, bus->addr, bus->data); in nv50_i2c_bus_drive_sda()
58 struct nv50_i2c_bus *bus = nv50_i2c_bus(base); in nv50_i2c_bus_sense_scl() local
59 struct nvkm_device *device = bus->base.pad->i2c->subdev.device; in nv50_i2c_bus_sense_scl()
60 return !!(nvkm_rd32(device, bus->addr) & 0x00000001); in nv50_i2c_bus_sense_scl()
66 struct nv50_i2c_bus *bus = nv50_i2c_bus(base); in nv50_i2c_bus_sense_sda() local
67 struct nvkm_device *device = bus->base.pad->i2c->subdev.device; in nv50_i2c_bus_sense_sda()
68 return !!(nvkm_rd32(device, bus->addr) & 0x00000002); in nv50_i2c_bus_sense_sda()
74 struct nv50_i2c_bus *bus = nv50_i2c_bus(base); in nv50_i2c_bus_init() local
75 struct nvkm_device *device = bus->base.pad->i2c->subdev.device; in nv50_i2c_bus_init()
76 nvkm_wr32(device, bus->addr, (bus->data = 0x00000007)); in nv50_i2c_bus_init()
98 struct nv50_i2c_bus *bus; in nv50_i2c_bus_new() local
101 nvkm_warn(&pad->i2c->subdev, "bus %d unknown\n", drive); in nv50_i2c_bus_new()
102 return -ENODEV; in nv50_i2c_bus_new()
105 if (!(bus = kzalloc(sizeof(*bus), GFP_KERNEL))) in nv50_i2c_bus_new()
106 return -ENOMEM; in nv50_i2c_bus_new()
107 *pbus = &bus->base; in nv50_i2c_bus_new()
109 nvkm_i2c_bus_ctor(&nv50_i2c_bus_func, pad, id, &bus->base); in nv50_i2c_bus_new()
110 bus->addr = addr[drive]; in nv50_i2c_bus_new()
111 bus->data = 0x00000007; in nv50_i2c_bus_new()