导航

    全志在线开发者论坛

    • 注册
    • 登录
    • 搜索
    • 版块
    • 话题
    • 在线文档
    • 社区主页

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

    MR Series
    2
    3
    1580
    正在加载更多帖子
    • 从旧到新
    • 从新到旧
    • 最多赞同
    回复
    • 在新帖中回复
    登录后回复
    此主题已被删除。只有拥有主题管理权限的用户可以查看。
    • U
      uuuuid LV 6 最后由 编辑

      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 条回复 最后回复 回复 引用 分享 0
      • BedRock
        BedRock LV 6 最后由 编辑

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

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

        1 条回复 最后回复 回复 引用 分享 0
        • U
          uuuuid LV 6 最后由 编辑

          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 条回复 最后回复 回复 引用 分享 0
          • 1 / 1
          • First post
            Last post

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

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