drivers/gpu/drm/panel/panel-samsung-s6e3ha2.c
Source file repositories/reference/linux-study-clean/drivers/gpu/drm/panel/panel-samsung-s6e3ha2.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/gpu/drm/panel/panel-samsung-s6e3ha2.c- Extension
.c- Size
- 25789 bytes
- Lines
- 784
- 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.
- 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.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/backlight.hlinux/delay.hlinux/gpio/consumer.hlinux/module.hlinux/of.hlinux/regulator/consumer.hdrm/drm_mipi_dsi.hdrm/drm_modes.hdrm/drm_panel.h
Detected Declarations
struct s6e3ha2_panel_descstruct s6e3ha2enum s6e3ha2_typefunction s6e3ha2_dcs_writefunction s6e3ha2_test_key_on_f0function s6e3ha2_test_key_off_f0function s6e3ha2_test_key_on_fcfunction s6e3ha2_test_key_off_fcfunction s6e3ha2_single_dsi_setfunction s6e3ha2_freq_calibrationfunction s6e3ha2_aor_controlfunction s6e3ha2_caps_elvss_setfunction s6e3ha2_acl_offfunction s6e3ha2_acl_off_oprfunction s6e3ha2_test_globalfunction s6e3ha2_testfunction s6e3ha2_touch_hsync_on1function s6e3ha2_pentile_controlfunction s6e3ha2_poc_globalfunction s6e3ha2_poc_settingfunction s6e3ha2_pcd_set_offfunction s6e3ha2_err_fg_setfunction s6e3ha2_hbm_offfunction s6e3ha2_te_start_settingfunction s6e3ha2_gamma_updatefunction s6e3ha2_get_brightnessfunction s6e3ha2_set_vintfunction s6e3ha2_get_brightness_indexfunction s6e3ha2_update_gammafunction s6e3ha2_set_brightnessfunction s6e3ha2_panel_initfunction s6e3ha2_power_offfunction s6e3ha2_disablefunction s6e3ha2_unpreparefunction s6e3ha2_power_onfunction s6e3ha2_preparefunction s6e3ha2_enablefunction s6e3ha2_get_modesfunction s6e3ha2_probefunction s6e3ha2_remove
Annotated Snippet
struct s6e3ha2_panel_desc {
const struct drm_display_mode *mode;
enum s6e3ha2_type type;
};
struct s6e3ha2 {
struct device *dev;
struct drm_panel panel;
struct backlight_device *bl_dev;
struct regulator_bulk_data supplies[2];
struct gpio_desc *reset_gpio;
struct gpio_desc *enable_gpio;
const struct s6e3ha2_panel_desc *desc;
};
static int s6e3ha2_dcs_write(struct s6e3ha2 *ctx, const void *data, size_t len)
{
struct mipi_dsi_device *dsi = to_mipi_dsi_device(ctx->dev);
return mipi_dsi_dcs_write_buffer(dsi, data, len);
}
#define s6e3ha2_dcs_write_seq_static(ctx, seq...) do { \
static const u8 d[] = { seq }; \
int ret; \
ret = s6e3ha2_dcs_write(ctx, d, ARRAY_SIZE(d)); \
if (ret < 0) \
return ret; \
} while (0)
#define s6e3ha2_call_write_func(ret, func) do { \
ret = (func); \
if (ret < 0) \
return ret; \
} while (0)
static int s6e3ha2_test_key_on_f0(struct s6e3ha2 *ctx)
{
s6e3ha2_dcs_write_seq_static(ctx, 0xf0, 0x5a, 0x5a);
return 0;
}
static int s6e3ha2_test_key_off_f0(struct s6e3ha2 *ctx)
{
s6e3ha2_dcs_write_seq_static(ctx, 0xf0, 0xa5, 0xa5);
return 0;
}
static int s6e3ha2_test_key_on_fc(struct s6e3ha2 *ctx)
{
s6e3ha2_dcs_write_seq_static(ctx, 0xfc, 0x5a, 0x5a);
return 0;
}
static int s6e3ha2_test_key_off_fc(struct s6e3ha2 *ctx)
{
s6e3ha2_dcs_write_seq_static(ctx, 0xfc, 0xa5, 0xa5);
return 0;
}
static int s6e3ha2_single_dsi_set(struct s6e3ha2 *ctx)
{
s6e3ha2_dcs_write_seq_static(ctx, 0xf2, 0x67);
s6e3ha2_dcs_write_seq_static(ctx, 0xf9, 0x09);
return 0;
}
static int s6e3ha2_freq_calibration(struct s6e3ha2 *ctx)
{
s6e3ha2_dcs_write_seq_static(ctx, 0xfd, 0x1c);
if (ctx->desc->type == HF2_TYPE)
s6e3ha2_dcs_write_seq_static(ctx, 0xf2, 0x67, 0x40, 0xc5);
s6e3ha2_dcs_write_seq_static(ctx, 0xfe, 0x20, 0x39);
s6e3ha2_dcs_write_seq_static(ctx, 0xfe, 0xa0);
s6e3ha2_dcs_write_seq_static(ctx, 0xfe, 0x20);
if (ctx->desc->type == HA2_TYPE)
s6e3ha2_dcs_write_seq_static(ctx, 0xce, 0x03, 0x3b, 0x12, 0x62,
0x40, 0x80, 0xc0, 0x28, 0x28,
0x28, 0x28, 0x39, 0xc5);
else
s6e3ha2_dcs_write_seq_static(ctx, 0xce, 0x03, 0x3b, 0x14, 0x6d,
0x40, 0x80, 0xc0, 0x28, 0x28,
0x28, 0x28, 0x39, 0xc5);
return 0;
}
Annotation
- Immediate include surface: `linux/backlight.h`, `linux/delay.h`, `linux/gpio/consumer.h`, `linux/module.h`, `linux/of.h`, `linux/regulator/consumer.h`, `drm/drm_mipi_dsi.h`, `drm/drm_modes.h`.
- Detected declarations: `struct s6e3ha2_panel_desc`, `struct s6e3ha2`, `enum s6e3ha2_type`, `function s6e3ha2_dcs_write`, `function s6e3ha2_test_key_on_f0`, `function s6e3ha2_test_key_off_f0`, `function s6e3ha2_test_key_on_fc`, `function s6e3ha2_test_key_off_fc`, `function s6e3ha2_single_dsi_set`, `function s6e3ha2_freq_calibration`.
- Atlas domain: Driver Families / drivers/gpu.
- Implementation status: source implementation candidate.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.