.. | .. |
---|
42 | 42 | //static struct class *nk_class;
|
---|
43 | 43 |
|
---|
44 | 44 |
|
---|
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 | | -
|
---|
68 | 45 |
|
---|
69 | 46 | void Audio_SET(int i);
|
---|
70 | 47 |
|
---|
.. | .. |
---|
124 | 101 | //vcc3_io_en_gpio
|
---|
125 | 102 | ret = of_get_named_gpio_flags(node, "vcc3_io_en_gpio", 0, &flags);
|
---|
126 | 103 | 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__);
|
---|
128 | 105 | goto err;
|
---|
129 | 106 | } else {
|
---|
130 | 107 | pdata->vcc3_io_en_gpio = ret;
|
---|
.. | .. |
---|
162 | 139 | }
|
---|
163 | 140 |
|
---|
164 | 141 |
|
---|
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 | | -
|
---|
187 | 142 | //usb_en_oc_gpio
|
---|
188 | 143 | ret = of_get_named_gpio_flags(node, "usb_en_oc_gpio", 0, &flags);
|
---|
189 | 144 | if (ret < 0) {
|
---|
.. | .. |
---|
310 | 265 | ret = gpio_direction_output(pdata->reset_4g_gpio,0);
|
---|
311 | 266 | if(ret < 0){
|
---|
312 | 267 | printk("%s() gpio_direction_input reset_4g_gpio set ERROR\n", __FUNCTION__);
|
---|
| 268 | + goto err;
|
---|
313 | 269 | }
|
---|
| 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 | + }
|
---|
314 | 276 | }
|
---|
315 | 277 |
|
---|
316 | 278 | //en_4g_gpio
|
---|
.. | .. |
---|
326 | 288 | }
|
---|
327 | 289 | ret = gpio_direction_output(pdata->en_4g_gpio,1);
|
---|
328 | 290 | 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__);
|
---|
330 | 292 | }
|
---|
331 | 293 | }
|
---|
332 | 294 |
|
---|