hc
2023-02-15 e6ab316063efe269dbc459a0a7939fb55abd8c44
kernel/drivers/misc/nkio/nk_io_core.c
....@@ -42,29 +42,6 @@
4242 //static struct class *nk_class;
4343
4444
45
-void MODULE_SET(int i)
46
-{
47
- if(i==11){
48
- gpio_direction_output(NKpdata_info->en_4g_gpio, 1);
49
- }else{
50
- gpio_direction_output(NKpdata_info->en_4g_gpio, 0);
51
- }
52
-}
53
-
54
-EXPORT_SYMBOL_GPL(MODULE_SET);
55
-
56
-
57
-void LED_SET(int i)
58
-{
59
- if(i==11){
60
- gpio_direction_output(NKpdata_info->led_gpio, 1);
61
- }else{
62
- gpio_direction_output(NKpdata_info->led_gpio, 0);
63
- }
64
-}
65
-
66
-EXPORT_SYMBOL_GPL(LED_SET);
67
-
6845
6946 void Audio_SET(int i);
7047
....@@ -124,7 +101,7 @@
124101 //vcc3_io_en_gpio
125102 ret = of_get_named_gpio_flags(node, "vcc3_io_en_gpio", 0, &flags);
126103 if (ret < 0) {
127
- printk("%s() Can not read property tp_enable\n", __FUNCTION__);
104
+ printk("%s() Can not read property vcc3_io_en_gpio\n", __FUNCTION__);
128105 goto err;
129106 } else {
130107 pdata->vcc3_io_en_gpio = ret;
....@@ -162,28 +139,6 @@
162139 }
163140
164141
165
-
166
- //hub_host2_5v_gpio
167
- ret = of_get_named_gpio_flags(node, "hub_host2_5v_gpio", 0, &flags);
168
- if (ret < 0) {
169
- printk("%s() Can not read property hub_host2_5v_gpio\n", __FUNCTION__);
170
- goto err;
171
- } else {
172
- pdata->hub_host2_5v_gpio = ret;
173
- gpio_free(ret);
174
- ret = devm_gpio_request(&pdev->dev, pdata->hub_host2_5v_gpio, "hub_host2_5v_gpio");
175
- if (ret < 0){
176
- printk("%s() devm_gpio_request hub_host2_5v_gpio request ERROR\n", __FUNCTION__);
177
- goto err;
178
- }
179
-
180
- ret = gpio_direction_output(pdata->hub_host2_5v_gpio,1);
181
- if(ret < 0){
182
- printk("%s() gpio_direction_input hub_host2_5v_gpio set ERROR\n", __FUNCTION__);
183
- goto err;
184
- }
185
- }
186
-
187142 //usb_en_oc_gpio
188143 ret = of_get_named_gpio_flags(node, "usb_en_oc_gpio", 0, &flags);
189144 if (ret < 0) {
....@@ -310,7 +265,14 @@
310265 ret = gpio_direction_output(pdata->reset_4g_gpio,0);
311266 if(ret < 0){
312267 printk("%s() gpio_direction_input reset_4g_gpio set ERROR\n", __FUNCTION__);
268
+ goto err;
313269 }
270
+ msleep(800);
271
+ ret = gpio_direction_output(pdata->reset_4g_gpio,1);
272
+ if(ret < 0){
273
+ printk("%s() gpio_direction_input reset_4g_gpio set ERROR\n", __FUNCTION__);
274
+
275
+ }
314276 }
315277
316278 //en_4g_gpio
....@@ -326,7 +288,7 @@
326288 }
327289 ret = gpio_direction_output(pdata->en_4g_gpio,1);
328290 if(ret < 0){
329
- printk("%s() gpio_direction_input en_4g_gpio set ERROR\n", __FUNCTION__);
291
+ printk("%s() gpio_direction_output en_4g_gpio set ERROR\n", __FUNCTION__);
330292 }
331293 }
332294