请问为什么D1设备树里面的 lcd0 对应的 "allwinner,sunxi-lcd0" 驱动,在源码里面为什么找不到?
-
lichee/linux-5.4/arch/riscv/boot/dts/sunxi/sun20iw1p1.dtsi
lcd0: lcd0@1c0c000 { compatible = "allwinner,sunxi-lcd0"; reg = <0x0 0x1c0c000 0x0 0x0>; /* Fake registers to avoid dtc compiling warnings */ pinctrl-names = "active","sleep"; status = "okay"; };
根本搜索不到:
$ grep "allwinner,sunxi-lcd0" -r lichee/linux-5.4/ --include "*.c" --include "*.h" $ $
-
刚才问了一下,在dts 钟进行设置,可以配置屏幕参数
源码在:
-
lichee/linux-5.4/drivers/video/fbdev/sunxi/disp2/disp/de/disp_lcd.c
static s32 disp_lcd_pin_cfg(struct disp_device *lcd, u32 bon) { ... sprintf(dev_name, "lcd%d", lcd->disp); disp_sys_pin_set_state(dev_name, (bon == 1) ? DISP_PIN_STATE_ACTIVE : DISP_PIN_STATE_SLEEP); ... }
lichee/linux-5.4/drivers/video/fbdev/sunxi/disp2/disp/disp_sys_intf.c
int disp_sys_pin_set_state(char *dev_name, char *name) { ... len = sprintf(compat, "allwinner,sunxi-%s", dev_name); if (len > 32) __wrn("size of mian_name is out of range\n"); .... }
找到了,貌似调用过程有点曲折。
Copyright © 2023 深圳全志在线有限公司 粤ICP备2021084185号 粤公网安备44030502007680号