本帖最后由 mobz 于 2015-10-22 20:15 编辑
如何在DT里配置DI0_PIN15这个管脚为LCD使能脚?我的配置如下,可是行不通
FB里添加GPIO:
mxcfb1: fb@0 {
compatible = "fsl,mxc_sdc_fb";
disp_dev = "ldb";
interface_pix_fmt = "RGB24";
mode_str ="1280x800@60";
default_bpp = <18>;
int_clk = <0>;
late_init = <0>;
pinctrl-names = "default";
my_lcd_pin = <&pinctrl_mylcd>;
status = "ok";
};
管脚配置:
mylcdmux {
pinctrl_mylcd: mylcd {
fsl,pins = <
MX6QDL_PAD_DI0_PIN15__LCD_ENABLE 0x1b0b1
>;
};
};
驱动中使用:(主要是在这里调用的时候有问题)
plat_data->gpio_int = of_get_named_gpio(np, "my_lcd_pin", 0);
if (plat_data->gpio_int == -EPROBE_DEFER)
return -1;
if (!gpio_is_valid(plat_data->gpio_int)) {
printk("ERROR, emmmxxoo--->failed to get interrupt gpio\n");
return 1;
}
lcd_enable = gpio_get_value(plat_data->gpio_int);
printk("shady---->lcd_eanble = %d\n", lcd_enable);
错误日志:
[ 0.393015] /fb@0: could not get #gpio-cells for /soc/aips-bus@02000000/iomuxc@020e0000/mylcdmux/mylcd
[ 0.393024] ERROR, emmmxxoo--->failed to get interrupt gpio
|