1
完善资料让更多小伙伴认识你,还能领取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 |
|
|
|
你正在撰写答案
如果你是对答案或其他答案精选点评或询问,请使用“评论”功能。
基于米尔瑞芯微RK3576核心板/开发板的人脸疲劳检测应用方案
678 浏览 0 评论
920 浏览 1 评论
814 浏览 1 评论
2030 浏览 1 评论
3275 浏览 1 评论
小黑屋| 手机版| Archiver| 德赢Vwin官网 ( 湘ICP备2023018690号 )
GMT+8, 2024-12-24 09:55 , Processed in 0.561784 second(s), Total 74, Slave 56 queries .
Powered by 德赢Vwin官网 网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
德赢Vwin官网 观察
版权所有 © 湖南华秋数字科技有限公司
德赢Vwin官网 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号