Navigation

    全志在线开发者论坛

    • Register
    • Login
    • Search
    • Categories
    • Tags
    • 在线文档
    • 社区主页

    请问为什么D1设备树里面的 lcd0 对应的 "allwinner,sunxi-lcd0" 驱动,在源码里面为什么找不到?

    MR Series
    2
    3
    1649
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • U
      uuuuid LV 6 last edited by

      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"
      $
      $
      
      1 Reply Last reply Reply Quote Share 0
      • BedRock
        BedRock LV 6 last edited by

        刚才问了一下,在dts 钟进行设置,可以配置屏幕参数
        d6a5bba5-d469-410c-bc8a-f544ce161b3f-image.png

        源码在:
        9533c90d-572a-4bc0-8a20-830f2d52fa48-image.png

        1 Reply Last reply Reply Quote Share 0
        • U
          uuuuid LV 6 last edited by

          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");
          ....
          }
          

          找到了,貌似调用过程有点曲折。

          1 Reply Last reply Reply Quote Share 0
          • 1 / 1
          • First post
            Last post

          Copyright © 2024 深圳全志在线有限公司 粤ICP备2021084185号 粤公网安备44030502007680号

          行为准则 | 用户协议 | 隐私权政策