drivers/gpu/drm/nouveau/nvkm/subdev/i2c/bit.c

Source file repositories/reference/linux-study-clean/drivers/gpu/drm/nouveau/nvkm/subdev/i2c/bit.c

File Facts

System
Linux kernel
Corpus path
drivers/gpu/drm/nouveau/nvkm/subdev/i2c/bit.c
Extension
.c
Size
4638 bytes
Lines
217
Domain
Driver Families
Bucket
drivers/gpu
Inferred role
Driver Families: implementation source
Status
source implementation candidate

Why This File Exists

Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.

Dependency Surface

Detected Declarations

Annotated Snippet

if (msg->flags & I2C_M_RD) {
			while (!ret && remaining--)
				ret = nvkm_i2c_get_byte(bus, ptr++, !remaining);
		} else {
			while (!ret && remaining--)
				ret = nvkm_i2c_put_byte(bus, *ptr++);
		}

		msg++;
	}

	i2c_stop(bus);
	return (ret < 0) ? ret : num;
}
#else
int
nvkm_i2c_bit_xfer(struct nvkm_i2c_bus *bus, struct i2c_msg *msgs, int num)
{
	return -ENODEV;
}
#endif

Annotation

Implementation Notes