Skip to content

Commit e20dc9a

Browse files
Lyle_Linalex3788
authored andcommitted
Free gpio pin for project id, ram id and pcb id
Change-Id: Ice209bb06c12a38a8c6110d28683dcfa79951511 Reviewed-on: https://tp-biosrd-v02/gerrit/80754 Reviewed-by: Alex Cheng(鄭富元) <Alex_Cheng@asus.com> Tested-by: Alex Cheng(鄭富元) <Alex_Cheng@asus.com>
1 parent efb9a96 commit e20dc9a

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

drivers/board-info/board-info.c

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,9 @@ static void read_project_id(void)
6767
gpio_direction_input(GPIO2_A3);
6868
project_id_2 = gpio_get_value(GPIO2_A3);
6969
}
70+
gpio_free(GPIO2_A1);
71+
gpio_free(GPIO2_A2);
72+
gpio_free(GPIO2_A3);
7073

7174
printk("project_id_2:0x%x, project_id_1:0x%x, project_id_0:0x%x \n",
7275
project_id_2, project_id_1, project_id_0);
@@ -105,6 +108,9 @@ static void read_ram_id(void)
105108
gpio_direction_input(GPIO2_B6);
106109
ram_id_2 = gpio_get_value(GPIO2_B6);
107110
}
111+
gpio_free(GPIO2_B4);
112+
gpio_free(GPIO2_B5);
113+
gpio_free(GPIO2_B6);
108114

109115
printk("ram_id_2:0x%x, ram_id_1:0x%x, ram_id_0:0x%x \n",
110116
ram_id_2, ram_id_1, ram_id_0);
@@ -145,6 +151,9 @@ static void read_pcb_id(void)
145151
gpio_direction_input(GPIO2_B2);
146152
pcb_id_2 = gpio_get_value(GPIO2_B2);
147153
}
154+
gpio_free(GPIO2_B0);
155+
gpio_free(GPIO2_B1);
156+
gpio_free(GPIO2_B2);
148157

149158
printk("pcb_id_2:0x%x, pcb_id_1:0x%x, pcb_id_0:0x%x \n",
150159
pcb_id_2, pcb_id_1, pcb_id_0);

0 commit comments

Comments
 (0)