blob: 839c04ffc44d6a016e0612f2161f901990da7ad3 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
|
/* SPDX-License-Identifier: GPL-2.0-only */
/*
* Copyright (c) 2019, The Linux Foundation. All rights reserved.
*/
#ifndef _KGSL_UTIL_H_
#define _KGSL_UTIL_H_
struct regulator;
struct clk_bulk_data;
/**
* kgsl_regulator_disable_wait - Disable a regulator and wait for it
* @reg: A &struct regulator handle
* @timeout: Time to wait (in milliseconds)
*
* Disable the regulator and wait @timeout milliseconds for it to enter the
* disabled state.
*
* Return: True if the regulator was disabled or false if it timed out
*/
bool kgsl_regulator_disable_wait(struct regulator *reg, u32 timeout);
/**
* kgsl_of_clk_by_name - Return a clock device for a given name
* @clks: Pointer to an array of bulk clk data
* @count: Number of entries in the array
* @id: Name of the clock to search for
*
* Returns: A pointer to the clock device for the given name or NULL if not
* found
*/
struct clk *kgsl_of_clk_by_name(struct clk_bulk_data *clks, int count,
const char *id);
#endif
|