|
35 | 35 |
|
36 | 36 | static int spitz_last_ac_status;
|
37 | 37 |
|
38 |
| -static struct gpio spitz_charger_gpios[] = { |
39 |
| - { SPITZ_GPIO_KEY_INT, GPIOF_IN, "Keyboard Interrupt" }, |
40 |
| - { SPITZ_GPIO_SYNC, GPIOF_IN, "Sync" }, |
41 |
| - { SPITZ_GPIO_AC_IN, GPIOF_IN, "Charger Detection" }, |
42 |
| - { SPITZ_GPIO_ADC_TEMP_ON, GPIOF_OUT_INIT_LOW, "ADC Temp On" }, |
43 |
| - { SPITZ_GPIO_JK_B, GPIOF_OUT_INIT_LOW, "JK B" }, |
44 |
| - { SPITZ_GPIO_CHRG_ON, GPIOF_OUT_INIT_LOW, "Charger On" }, |
45 |
| -}; |
46 |
| - |
47 | 38 | static void spitz_charger_init(void)
|
48 | 39 | {
|
49 |
| - gpio_request_array(ARRAY_AND_SIZE(spitz_charger_gpios)); |
| 40 | + gpio_request(SPITZ_GPIO_KEY_INT, "Keyboard Interrupt"); |
| 41 | + gpio_direction_input(SPITZ_GPIO_KEY_INT); |
| 42 | + gpio_request(SPITZ_GPIO_SYNC, "Sync"); |
| 43 | + gpio_direction_input(SPITZ_GPIO_SYNC); |
| 44 | + gpio_request(SPITZ_GPIO_AC_IN, "Charger Detection"); |
| 45 | + gpio_direction_input(SPITZ_GPIO_AC_IN); |
| 46 | + gpio_request(SPITZ_GPIO_ADC_TEMP_ON, "ADC Temp On"); |
| 47 | + gpio_direction_output(SPITZ_GPIO_ADC_TEMP_ON, 0); |
| 48 | + gpio_request(SPITZ_GPIO_JK_B, "JK B"); |
| 49 | + gpio_direction_output(SPITZ_GPIO_JK_B, 0); |
| 50 | + gpio_request(SPITZ_GPIO_CHRG_ON, "Charger On"); |
| 51 | + gpio_direction_output(SPITZ_GPIO_CHRG_ON, 0); |
50 | 52 | }
|
51 | 53 |
|
52 | 54 | static void spitz_measure_temp(int on)
|
|
0 commit comments