From e6ab316063efe269dbc459a0a7939fb55abd8c44 Mon Sep 17 00:00:00 2001
From: hc <hc@nodka.com>
Date: Wed, 15 Feb 2023 05:39:26 +0000
Subject: [PATCH] add wifi 4g uart0,3,4,5,7,9
---
kernel/drivers/misc/nkio/nk_io_core.c | 56 +++++++++-----------------------------------------------
1 files changed, 9 insertions(+), 47 deletions(-)
diff --git a/kernel/drivers/misc/nkio/nk_io_core.c b/kernel/drivers/misc/nkio/nk_io_core.c
index 4f770bb..46e2120 100755
--- a/kernel/drivers/misc/nkio/nk_io_core.c
+++ b/kernel/drivers/misc/nkio/nk_io_core.c
@@ -42,29 +42,6 @@
//static struct class *nk_class;
-void MODULE_SET(int i)
-{
- if(i==11){
- gpio_direction_output(NKpdata_info->en_4g_gpio, 1);
- }else{
- gpio_direction_output(NKpdata_info->en_4g_gpio, 0);
- }
-}
-
-EXPORT_SYMBOL_GPL(MODULE_SET);
-
-
-void LED_SET(int i)
-{
- if(i==11){
- gpio_direction_output(NKpdata_info->led_gpio, 1);
- }else{
- gpio_direction_output(NKpdata_info->led_gpio, 0);
- }
-}
-
-EXPORT_SYMBOL_GPL(LED_SET);
-
void Audio_SET(int i);
@@ -124,7 +101,7 @@
//vcc3_io_en_gpio
ret = of_get_named_gpio_flags(node, "vcc3_io_en_gpio", 0, &flags);
if (ret < 0) {
- printk("%s() Can not read property tp_enable\n", __FUNCTION__);
+ printk("%s() Can not read property vcc3_io_en_gpio\n", __FUNCTION__);
goto err;
} else {
pdata->vcc3_io_en_gpio = ret;
@@ -162,28 +139,6 @@
}
-
- //hub_host2_5v_gpio
- ret = of_get_named_gpio_flags(node, "hub_host2_5v_gpio", 0, &flags);
- if (ret < 0) {
- printk("%s() Can not read property hub_host2_5v_gpio\n", __FUNCTION__);
- goto err;
- } else {
- pdata->hub_host2_5v_gpio = ret;
- gpio_free(ret);
- ret = devm_gpio_request(&pdev->dev, pdata->hub_host2_5v_gpio, "hub_host2_5v_gpio");
- if (ret < 0){
- printk("%s() devm_gpio_request hub_host2_5v_gpio request ERROR\n", __FUNCTION__);
- goto err;
- }
-
- ret = gpio_direction_output(pdata->hub_host2_5v_gpio,1);
- if(ret < 0){
- printk("%s() gpio_direction_input hub_host2_5v_gpio set ERROR\n", __FUNCTION__);
- goto err;
- }
- }
-
//usb_en_oc_gpio
ret = of_get_named_gpio_flags(node, "usb_en_oc_gpio", 0, &flags);
if (ret < 0) {
@@ -310,7 +265,14 @@
ret = gpio_direction_output(pdata->reset_4g_gpio,0);
if(ret < 0){
printk("%s() gpio_direction_input reset_4g_gpio set ERROR\n", __FUNCTION__);
+ goto err;
}
+ msleep(800);
+ ret = gpio_direction_output(pdata->reset_4g_gpio,1);
+ if(ret < 0){
+ printk("%s() gpio_direction_input reset_4g_gpio set ERROR\n", __FUNCTION__);
+
+ }
}
//en_4g_gpio
@@ -326,7 +288,7 @@
}
ret = gpio_direction_output(pdata->en_4g_gpio,1);
if(ret < 0){
- printk("%s() gpio_direction_input en_4g_gpio set ERROR\n", __FUNCTION__);
+ printk("%s() gpio_direction_output en_4g_gpio set ERROR\n", __FUNCTION__);
}
}
--
Gitblit v1.6.2