drivers/gpu/drm/panel/panel-novatek-nt35560.c

Source file repositories/reference/linux-study-clean/drivers/gpu/drm/panel/panel-novatek-nt35560.c

File Facts

System
Linux kernel
Corpus path
drivers/gpu/drm/panel/panel-novatek-nt35560.c
Extension
.c
Size
11902 bytes
Lines
481
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

struct nt35560_config {
	const struct drm_display_mode *vid_mode;
	const struct drm_display_mode *cmd_mode;
};

struct nt35560 {
	const struct nt35560_config *conf;
	struct drm_panel panel;
	struct device *dev;
	struct regulator *supply;
	struct gpio_desc *reset_gpio;
	bool video_mode;
};

static const struct drm_display_mode sony_acx424akp_vid_mode = {
	.clock = 27234,
	.hdisplay = 480,
	.hsync_start = 480 + 15,
	.hsync_end = 480 + 15 + 0,
	.htotal = 480 + 15 + 0 + 15,
	.vdisplay = 864,
	.vsync_start = 864 + 14,
	.vsync_end = 864 + 14 + 1,
	.vtotal = 864 + 14 + 1 + 11,
	.width_mm = 48,
	.height_mm = 84,
	.flags = DRM_MODE_FLAG_PVSYNC,
};

/*
 * The timings are not very helpful as the display is used in
 * command mode using the maximum HS frequency.
 */
static const struct drm_display_mode sony_acx424akp_cmd_mode = {
	.clock = 35478,
	.hdisplay = 480,
	.hsync_start = 480 + 154,
	.hsync_end = 480 + 154 + 16,
	.htotal = 480 + 154 + 16 + 32,
	.vdisplay = 864,
	.vsync_start = 864 + 1,
	.vsync_end = 864 + 1 + 1,
	.vtotal = 864 + 1 + 1 + 1,
	/*
	 * Some desired refresh rate, experiments at the maximum "pixel"
	 * clock speed (HS clock 420 MHz) yields around 117Hz.
	 */
	.width_mm = 48,
	.height_mm = 84,
};

static const struct nt35560_config sony_acx424akp_data = {
	.vid_mode = &sony_acx424akp_vid_mode,
	.cmd_mode = &sony_acx424akp_cmd_mode,
};

static const struct drm_display_mode sony_acx424akm_vid_mode = {
	.clock = 27234,
	.hdisplay = 480,
	.hsync_start = 480 + 15,
	.hsync_end = 480 + 15 + 0,
	.htotal = 480 + 15 + 0 + 15,
	.vdisplay = 854,
	.vsync_start = 854 + 14,
	.vsync_end = 854 + 14 + 1,
	.vtotal = 854 + 14 + 1 + 11,
	.width_mm = 46,
	.height_mm = 82,
	.flags = DRM_MODE_FLAG_PVSYNC,
};

/*
 * The timings are not very helpful as the display is used in
 * command mode using the maximum HS frequency.
 */
static const struct drm_display_mode sony_acx424akm_cmd_mode = {
	.clock = 35478,
	.hdisplay = 480,
	.hsync_start = 480 + 154,
	.hsync_end = 480 + 154 + 16,
	.htotal = 480 + 154 + 16 + 32,
	.vdisplay = 854,
	.vsync_start = 854 + 1,
	.vsync_end = 854 + 1 + 1,
	.vtotal = 854 + 1 + 1 + 1,
	.width_mm = 46,
	.height_mm = 82,
};

static const struct nt35560_config sony_acx424akm_data = {

Annotation

Implementation Notes