drivers/gpu/drm/panel/panel-sony-acx565akm.c
Source file repositories/reference/linux-study-clean/drivers/gpu/drm/panel/panel-sony-acx565akm.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/gpu/drm/panel/panel-sony-acx565akm.c- Extension
.c- Size
- 15926 bytes
- Lines
- 683
- 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.
- Uses kernel synchronization; read lock ordering, sleepability, and interrupt context assumptions before translating.
- 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/jiffies.hlinux/module.hlinux/mutex.hlinux/sched.hlinux/spi/spi.hvideo/mipi_display.hdrm/drm_connector.hdrm/drm_modes.hdrm/drm_panel.h
Detected Declarations
struct acx565akm_panelfunction acx565akm_transferfunction acx565akm_cmdfunction acx565akm_writefunction acx565akm_readfunction acx565akm_get_cabc_modefunction acx565akm_set_cabc_modefunction acx565akm_get_hw_cabc_modefunction cabc_mode_showfunction cabc_mode_storefunction cabc_available_modes_showfunction acx565akm_get_actual_brightnessfunction acx565akm_set_brightnessfunction acx565akm_bl_update_status_lockedfunction acx565akm_bl_update_statusfunction acx565akm_bl_get_intensityfunction acx565akm_backlight_initfunction acx565akm_backlight_cleanupfunction acx565akm_set_sleep_modefunction acx565akm_set_display_statefunction acx565akm_power_onfunction acx565akm_power_offfunction acx565akm_disablefunction acx565akm_enablefunction acx565akm_get_modesfunction acx565akm_detectfunction acx565akm_probefunction acx565akm_remove
Annotated Snippet
struct acx565akm_panel {
struct drm_panel panel;
struct spi_device *spi;
struct gpio_desc *reset_gpio;
struct backlight_device *backlight;
struct mutex mutex;
const char *name;
u8 display_id[3];
int model;
int revision;
bool has_bc;
bool has_cabc;
bool enabled;
unsigned int cabc_mode;
/*
* Next value of jiffies when we can issue the next sleep in/out
* command.
*/
unsigned long hw_guard_end;
unsigned long hw_guard_wait; /* max guard time in jiffies */
};
#define to_acx565akm_device(p) container_of(p, struct acx565akm_panel, panel)
static void acx565akm_transfer(struct acx565akm_panel *lcd, int cmd,
const u8 *wbuf, int wlen, u8 *rbuf, int rlen)
{
struct spi_message m;
struct spi_transfer *x, xfer[5];
int ret;
spi_message_init(&m);
memset(xfer, 0, sizeof(xfer));
x = &xfer[0];
cmd &= 0xff;
x->tx_buf = &cmd;
x->bits_per_word = 9;
x->len = 2;
if (rlen > 1 && wlen == 0) {
/*
* Between the command and the response data there is a
* dummy clock cycle. Add an extra bit after the command
* word to account for this.
*/
x->bits_per_word = 10;
cmd <<= 1;
}
spi_message_add_tail(x, &m);
if (wlen) {
x++;
x->tx_buf = wbuf;
x->len = wlen;
x->bits_per_word = 9;
spi_message_add_tail(x, &m);
}
if (rlen) {
x++;
x->rx_buf = rbuf;
x->len = rlen;
spi_message_add_tail(x, &m);
}
ret = spi_sync(lcd->spi, &m);
if (ret < 0)
dev_dbg(&lcd->spi->dev, "spi_sync %d\n", ret);
}
static inline void acx565akm_cmd(struct acx565akm_panel *lcd, int cmd)
{
acx565akm_transfer(lcd, cmd, NULL, 0, NULL, 0);
}
static inline void acx565akm_write(struct acx565akm_panel *lcd,
int reg, const u8 *buf, int len)
{
acx565akm_transfer(lcd, reg, buf, len, NULL, 0);
}
static inline void acx565akm_read(struct acx565akm_panel *lcd,
int reg, u8 *buf, int len)
{
Annotation
- Immediate include surface: `linux/backlight.h`, `linux/delay.h`, `linux/gpio/consumer.h`, `linux/jiffies.h`, `linux/module.h`, `linux/mutex.h`, `linux/sched.h`, `linux/spi/spi.h`.
- Detected declarations: `struct acx565akm_panel`, `function acx565akm_transfer`, `function acx565akm_cmd`, `function acx565akm_write`, `function acx565akm_read`, `function acx565akm_get_cabc_mode`, `function acx565akm_set_cabc_mode`, `function acx565akm_get_hw_cabc_mode`, `function cabc_mode_show`, `function cabc_mode_store`.
- Atlas domain: Driver Families / drivers/gpu.
- Implementation status: source implementation candidate.
- Synchronization appears in or near this file; preserve lock ordering, sleepability, and interrupt-context constraints.
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.