.. | .. |
---|
1 | 1 | /****************************************************************************** |
---|
2 | 2 | * |
---|
3 | | - * Copyright (C) 2019-2027 AIC Corporation |
---|
| 3 | + * Copyright (C) 2019-2021 Aicsemi Corporation |
---|
4 | 4 | * |
---|
5 | 5 | * Licensed under the Apache License, Version 2.0 (the "License"); |
---|
6 | 6 | * you may not use this file except in compliance with the License. |
---|
.. | .. |
---|
33 | 33 | #include <errno.h> |
---|
34 | 34 | #include <string.h> |
---|
35 | 35 | #include <cutils/properties.h> |
---|
36 | | -#include "bt_vendor_aicbt.h" |
---|
| 36 | +#include "bt_vendor_aic.h" |
---|
37 | 37 | #include "upio.h" |
---|
38 | 38 | #include "userial_vendor.h" |
---|
39 | 39 | #include <stdio.h> |
---|
.. | .. |
---|
77 | 77 | * the bluesleep LPM code. The current value used in bluesleep is 10sec. |
---|
78 | 78 | */ |
---|
79 | 79 | #ifndef PROC_BTWRITE_TIMER_TIMEOUT_MS |
---|
80 | | -#define PROC_BTWRITE_TIMER_TIMEOUT_MS 4000 |
---|
| 80 | +#define PROC_BTWRITE_TIMER_TIMEOUT_MS 0 |
---|
81 | 81 | #else |
---|
82 | 82 | #undef PROC_BTWRITE_TIMER_TIMEOUT_MS |
---|
83 | | -#define PROC_BTWRITE_TIMER_TIMEOUT_MS 4000 |
---|
| 83 | +#define PROC_BTWRITE_TIMER_TIMEOUT_MS 0 |
---|
84 | 84 | #endif |
---|
85 | 85 | |
---|
86 | 86 | /* lpm proc control block */ |
---|
87 | | -typedef struct |
---|
88 | | -{ |
---|
| 87 | +typedef struct { |
---|
89 | 88 | uint8_t btwrite_active; |
---|
90 | 89 | uint8_t timer_created; |
---|
91 | 90 | timer_t timer_id; |
---|
.. | .. |
---|
100 | 99 | ******************************************************************************/ |
---|
101 | 100 | |
---|
102 | 101 | static uint8_t upio_state[UPIO_MAX_COUNT]; |
---|
103 | | -static int rfkill_id = -1; |
---|
104 | 102 | static int bt_emul_enable = 0; |
---|
105 | 103 | static char *rfkill_state_path = NULL; |
---|
106 | 104 | |
---|
.. | .. |
---|
155 | 153 | char path[64]; |
---|
156 | 154 | char buf[16]; |
---|
157 | 155 | int fd, sz, id; |
---|
158 | | - const char *basepath = "/sys/devices/platform/aic-bt/rfkill"; |
---|
| 156 | + const char *basepath = "/sys/devices/platform/aic-bsp/rfkill"; |
---|
159 | 157 | |
---|
160 | 158 | DIR *d; |
---|
161 | 159 | struct dirent *de; |
---|
.. | .. |
---|
329 | 327 | return 0; |
---|
330 | 328 | #endif |
---|
331 | 329 | |
---|
332 | | - if (rfkill_id == -1) { |
---|
| 330 | + if (rfkill_state_path == NULL) { |
---|
333 | 331 | if (init_rfkill()) |
---|
334 | 332 | return ret; |
---|
335 | 333 | } |
---|