mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-22 22:51:37 +00:00
gpiolib: Make use of enum gpio_lookup_flags consistent
The library uses enum gpio_lookup_flags to define the possible characteristics of GPIO pin. Since enumerator listed only individual bits the common use of it is in a form of a bitmask of gpio_lookup_flags GPIO_* values. The more correct type for this is unsigned long. Due to above convert all users to use unsigned long instead of enum gpio_lookup_flags except enumerator definition. While here, make field and parameter descriptions consistent as well. Suggested-by: Mika Westerberg <mika.westerberg@linux.intel.com> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Mika Westerberg <mika.westerberg@linux.intel.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
This commit is contained in:
parent
4050586b2b
commit
fed7026adc
5 changed files with 28 additions and 27 deletions
|
@ -22,7 +22,7 @@ enum gpio_lookup_flags {
|
|||
* @chip_hwnum: hardware number (i.e. relative to the chip) of the GPIO
|
||||
* @con_id: name of the GPIO from the device's point of view
|
||||
* @idx: index of the GPIO in case several GPIOs share the same name
|
||||
* @flags: mask of GPIO_* values
|
||||
* @flags: bitmask of gpio_lookup_flags GPIO_* values
|
||||
*
|
||||
* gpiod_lookup is a lookup table for associating GPIOs to specific devices and
|
||||
* functions using platform data.
|
||||
|
@ -32,7 +32,7 @@ struct gpiod_lookup {
|
|||
u16 chip_hwnum;
|
||||
const char *con_id;
|
||||
unsigned int idx;
|
||||
enum gpio_lookup_flags flags;
|
||||
unsigned long flags;
|
||||
};
|
||||
|
||||
struct gpiod_lookup_table {
|
||||
|
@ -46,7 +46,7 @@ struct gpiod_lookup_table {
|
|||
* @chip_label: name of the chip the GPIO belongs to
|
||||
* @chip_hwnum: hardware number (i.e. relative to the chip) of the GPIO
|
||||
* @line_name: consumer name for the hogged line
|
||||
* @lflags: mask of GPIO lookup flags
|
||||
* @lflags: bitmask of gpio_lookup_flags GPIO_* values
|
||||
* @dflags: GPIO flags used to specify the direction and value
|
||||
*/
|
||||
struct gpiod_hog {
|
||||
|
@ -54,7 +54,7 @@ struct gpiod_hog {
|
|||
const char *chip_label;
|
||||
u16 chip_hwnum;
|
||||
const char *line_name;
|
||||
enum gpio_lookup_flags lflags;
|
||||
unsigned long lflags;
|
||||
int dflags;
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue