hc
2023-11-06 e3e12f52b214121840b44c91de5b3e5af5d3eb84
kernel/drivers/headset_observe/rockchip_headset_core.c
....@@ -73,35 +73,6 @@
7373 HEADSET_IN_LOW :
7474 HEADSET_IN_HIGH;
7575 }
76
-
77
- /* spk-ctl */
78
- ret = of_get_named_gpio_flags(node, "spk_ctl_gpio", 0, &flags);
79
- if (ret < 0) {
80
- dev_err(&pdev->dev, "Can not read property headset_gpio\n");
81
- goto err;
82
- } else {
83
- pdata->spk_ctl_gpio = ret;
84
- ret = devm_gpio_request(&pdev->dev, pdata->spk_ctl_gpio,
85
- "spk_ctl_gpio");
86
- if (ret < 0) {
87
- dev_err(&pdev->dev, "spk_ctl_gpio request fail\n");
88
- goto err;
89
- }
90
-
91
- ret = gpio_get_value(pdata->headset_gpio);
92
- printk(" headset_gpio value : %d\n",ret);
93
- if (ret == 0)
94
- ret = gpio_direction_output(pdata->spk_ctl_gpio,0);
95
- else
96
- ret = gpio_direction_output(pdata->spk_ctl_gpio,1);
97
- if (ret < 0) {
98
- dev_err(&pdev->dev,
99
- "spk_ctl_gpio set direction fail\n");
100
- goto err;
101
- }
102
- }
103
-
104
-
10576 /* hook */
10677 ret = of_get_named_gpio_flags(node, "hook_gpio", 0, &pdata->hook_gpio);
10778 if (ret < 0) {