Skip to content

Commit fd7337f

Browse files
Markus Pargmannlinusw
authored andcommitted
gpiolib-of: Rename gpio_hog functions to be generic
The gpio hogging functions are currently only used for gpio-hogging. But these functions are widely generic ones which parse gpio device nodes in the DT. Signed-off-by: Markus Pargmann <[email protected]> Signed-off-by: Linus Walleij <[email protected]>
1 parent 1f93e4a commit fd7337f

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

drivers/gpio/gpiolib-of.c

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -119,20 +119,20 @@ int of_get_named_gpio_flags(struct device_node *np, const char *list_name,
119119
EXPORT_SYMBOL(of_get_named_gpio_flags);
120120

121121
/**
122-
* of_get_gpio_hog() - Get a GPIO hog descriptor, names and flags for GPIO API
122+
* of_parse_own_gpio() - Get a GPIO hog descriptor, names and flags for GPIO API
123123
* @np: device node to get GPIO from
124124
* @name: GPIO line name
125125
* @lflags: gpio_lookup_flags - returned from of_find_gpio() or
126-
* of_get_gpio_hog()
126+
* of_parse_own_gpio()
127127
* @dflags: gpiod_flags - optional GPIO initialization flags
128128
*
129129
* Returns GPIO descriptor to use with Linux GPIO API, or one of the errno
130130
* value on the error condition.
131131
*/
132-
static struct gpio_desc *of_get_gpio_hog(struct device_node *np,
133-
const char **name,
134-
enum gpio_lookup_flags *lflags,
135-
enum gpiod_flags *dflags)
132+
static struct gpio_desc *of_parse_own_gpio(struct device_node *np,
133+
const char **name,
134+
enum gpio_lookup_flags *lflags,
135+
enum gpiod_flags *dflags)
136136
{
137137
struct device_node *chip_np;
138138
enum of_gpio_flags xlate_flags;
@@ -196,13 +196,13 @@ static struct gpio_desc *of_get_gpio_hog(struct device_node *np,
196196
}
197197

198198
/**
199-
* of_gpiochip_scan_hogs - Scan gpio-controller and apply GPIO hog as requested
199+
* of_gpiochip_scan_gpios - Scan gpio-controller for gpio definitions
200200
* @chip: gpio chip to act on
201201
*
202202
* This is only used by of_gpiochip_add to request/set GPIO initial
203203
* configuration.
204204
*/
205-
static void of_gpiochip_scan_hogs(struct gpio_chip *chip)
205+
static void of_gpiochip_scan_gpios(struct gpio_chip *chip)
206206
{
207207
struct gpio_desc *desc = NULL;
208208
struct device_node *np;
@@ -214,7 +214,7 @@ static void of_gpiochip_scan_hogs(struct gpio_chip *chip)
214214
if (!of_property_read_bool(np, "gpio-hog"))
215215
continue;
216216

217-
desc = of_get_gpio_hog(np, &name, &lflags, &dflags);
217+
desc = of_parse_own_gpio(np, &name, &lflags, &dflags);
218218
if (IS_ERR(desc))
219219
continue;
220220

@@ -440,7 +440,7 @@ int of_gpiochip_add(struct gpio_chip *chip)
440440

441441
of_node_get(chip->of_node);
442442

443-
of_gpiochip_scan_hogs(chip);
443+
of_gpiochip_scan_gpios(chip);
444444

445445
return 0;
446446
}

0 commit comments

Comments
 (0)