mirror of
https://github.com/linux-sunxi/u-boot-sunxi.git
synced 2024-02-12 11:16:03 +08:00
dm: Move the function for getting GPIO status into the uclass
This function can be more easily tested if it is in the uclass. Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
@ -95,6 +95,24 @@ enum gpio_func_t {
|
||||
|
||||
struct udevice;
|
||||
|
||||
/**
|
||||
* gpio_get_status() - get the current GPIO status as a string
|
||||
*
|
||||
* Obtain the current GPIO status as a string which can be presented to the
|
||||
* user. A typical string is:
|
||||
*
|
||||
* "b4: in: 1 [x] sdmmc_cd"
|
||||
*
|
||||
* which means this is GPIO bank b, offset 4, currently set to input, current
|
||||
* value 1, [x] means that it is requested and the owner is 'sdmmc_cd'
|
||||
*
|
||||
* @dev: Device to check
|
||||
* @offset: Offset of device GPIO to check
|
||||
* @buf: Place to put string
|
||||
* @buffsize: Size of string including \0
|
||||
*/
|
||||
int gpio_get_status(struct udevice *dev, int offset, char *buf, int buffsize);
|
||||
|
||||
/**
|
||||
* gpio_get_function() - get the current function for a GPIO pin
|
||||
*
|
||||
|
Reference in New Issue
Block a user