Home | History | Annotate | Download | only in power

Lines Matching defs:hikey

114 static void interactive_power_init(struct hikey_power_module __unused *hikey)
162 static int interactive_boostpulse(struct hikey_power_module *hikey)
167 if (hikey->boostpulse_fd < 0)
168 hikey->boostpulse_fd = open(INTERACTIVE_BOOSTPULSE_PATH, O_WRONLY);
170 if (hikey->boostpulse_fd < 0) {
171 if (!hikey->boostpulse_warned) {
175 hikey->boostpulse_warned = 1;
177 return hikey->boostpulse_fd;
180 len = write(hikey->boostpulse_fd, "1", 1);
192 int schedtune_sysfs_boost(struct hikey_power_module *hikey, char* booststr)
197 if (hikey->schedtune_boost_fd < 0)
198 return hikey->schedtune_boost_fd;
200 len = write(hikey->schedtune_boost_fd, booststr, 2);
210 struct hikey_power_module *hikey = (struct hikey_power_module *)arg;
213 sem_wait(&hikey->signal_lock);
217 pthread_mutex_lock(&hikey->lock);
219 if (hikey->deboost_time > now) {
220 sleeptime = hikey->deboost_time - now;
221 pthread_mutex_unlock(&hikey->lock);
226 schedtune_sysfs_boost(hikey, SCHEDTUNE_BOOST_NORM);
227 hikey->deboost_time = 0;
228 pthread_mutex_unlock(&hikey->lock);
235 static int schedtune_boost(struct hikey_power_module *hikey)
239 if (hikey->schedtune_boost_fd < 0)
240 return hikey->schedtune_boost_fd;
243 if (!hikey->deboost_time) {
244 schedtune_sysfs_boost(hikey, SCHEDTUNE_BOOST_INTERACTIVE);
245 sem_post(&hikey->signal_lock);
247 hikey->deboost_time = now + SCHEDTUNE_BOOST_TIME_NS;
252 static void schedtune_power_init(struct hikey_power_module *hikey)
258 hikey->deboost_time = 0;
259 sem_init(&hikey->signal_lock, 0, 1);
261 hikey->schedtune_boost_fd = open(SCHEDTUNE_BOOST_PATH, O_WRONLY);
262 if (hikey->schedtune_boost_fd < 0) {
267 pthread_create(&tid, NULL, schedtune_deboost_thread, hikey);
273 struct hikey_power_module *hikey = container_of(module,
275 interactive_power_init(hikey);
276 schedtune_power_init(hikey);
292 struct hikey_power_module *hikey = container_of(module,
295 pthread_mutex_lock(&hikey->lock);
298 hikey_hint_interaction(hikey);
316 pthread_mutex_unlock(&hikey->lock);
321 struct hikey_power_module *hikey = container_of(module,
374 .name = "HiKey Power HAL",