完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
1,修改/kernel/arch/arm/boot/dts/rk3288-box.dts
u***_control { compatible = "rockchip,rk3288-u***-control"; host_drv_gpio = <&gpio0 GPIO_B6 GPIO_ACTIVE_LOW>;//modify by jiangdou otg_drv_gpio = <&gpio0 GPIO_B4 GPIO_ACTIVE_LOW>; ++ 3G_VCC_33_POWER = <&gpio7 GPIO_A5 GPIO_ACTIVE_HIGH>;//modify by jiangdou for 3G_POWER 2,修改/kernel/drivers/u***/dwc_otg_310/u***dev_rk32.c ++#define INVALID_GPIO -1 //add for 3G_power by jiangdou ++int power_3g_en = INVALID_GPIO;//add for 3G_power by jiangdou static int rk_u***_control_probe(struct platform_device *pdev) { int gpio, err; struct device_node *np = pdev->dev.of_node; int ret = 0; control_u*** = devm_kzalloc(&pdev->dev, sizeof(*control_u***), GFP_KERNEL); if (!control_u***) { dev_err(&pdev->dev, "unable to alloc memory for control u***n"); ret = -ENOMEM; goto out; } control_u***->chip_id = RK3288_USB_CTLR; control_u***->remote_wakeup = of_property_read_bool(np, "rockchip,remote_wakeup"); control_u***->u***_irq_wakeup = of_property_read_bool(np, "rockchip,u***_irq_wakeup"); INIT_DELAYED_WORK(&control_u***->u***_charger_det_work, u***_battery_charger_detect_work); control_u***->host_gpios = devm_kzalloc(&pdev->dev, sizeof(struct gpio), GFP_KERNEL); if (!control_u***->host_gpios) { dev_err(&pdev->dev, "unable to alloc memory for host_gpiosn"); ret = -ENOMEM; goto out; } ++/*------------------------------我是分割线----------------------------------*/ ++//add for 3G_power by jiangdou start ++ power_3g_en = of_get_named_gpio(np, "3G_VCC_33_POWER", 0); ++ if (!gpio_is_valid(power_3g_en)) { ++ dev_err(&pdev->dev, "invalid host gpio%dn", power_3g_en); ++ } else { ++ err = devm_gpio_request(&pdev->dev, power_3g_en, "3G_VCC_33_POWER"); ++ if (err) { ++ dev_err(&pdev->dev, ++ "failed to request GPIO%d for host_drvn", ++ power_3g_en); ++ ret = err; ++ //goto out; ++ } ++ gpio_direction_output(power_3g_en, 1); ++ } ++ ++//add for 3G_power by jiangdou end ++/*------------------------------我是分割线----------------------------------*/ gpio = of_get_named_gpio(np, "host_drv_gpio", 0); 3..by jiangdou QQ:344283973 |
|
|
|
你正在撰写答案
如果你是对答案或其他答案精选点评或询问,请使用“评论”功能。
1982 浏览 1 评论
synopsys 的design ware:DW_fpv_div,浮点数除法器,默认32位下,想提升覆盖率(TMAX),如果用功能case去提升覆盖率呢?
2482 浏览 1 评论
RK3588 GStreamer调试四路鱼眼摄像头四宫格显示报错
5264 浏览 1 评论
【飞凌嵌入式OK3576-C开发板体验】RKNN神经网络-YOLO图像识别
254 浏览 0 评论
【飞凌嵌入式OK3576-C开发板体验】SSH远程登录网络配置及CAN通讯
1336 浏览 0 评论
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2024-11-24 12:46 , Processed in 0.559055 second(s), Total 74, Slave 56 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号