History

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.

Andy Shevchenko committed 7 years ago

Commit fed70261 parent 40505865 files · +28 −27Browse files

Showing the changes to include/linux (1 of 5 files). Show all

Unified · Split

include/linux/gpio/machine.h+4−4
@@ -22,7 +22,7 @@ enum gpio_lookup_flags { · 21 unmodified lines
22 * @chip_hwnum: hardware number (i.e. relative to the chip) of the GPIO22 * @chip_hwnum: hardware number (i.e. relative to the chip) of the GPIO
23 * @con_id: name of the GPIO from the device's point of view23 * @con_id: name of the GPIO from the device's point of view
24 * @idx: index of the GPIO in case several GPIOs share the same name24 * @idx: index of the GPIO in case several GPIOs share the same name
25 * @flags: mask of GPIO_* values25 * @flags: bitmask of gpio_lookup_flags GPIO_* values
26 *26 *
27 * gpiod_lookup is a lookup table for associating GPIOs to specific devices and27 * gpiod_lookup is a lookup table for associating GPIOs to specific devices and
28 * functions using platform data.28 * functions using platform data.
@@ -32,7 +32,7 @@ struct gpiod_lookup { · 3 unmodified lines
32 u16 chip_hwnum;32 u16 chip_hwnum;
33 const char *con_id;33 const char *con_id;
34 unsigned int idx;34 unsigned int idx;
35 enum gpio_lookup_flags flags;35 unsigned long flags;
36};36};
37 37
38struct gpiod_lookup_table {38struct gpiod_lookup_table {
@@ -46,7 +46,7 @@ struct gpiod_lookup_table { · 7 unmodified lines
46 * @chip_label: name of the chip the GPIO belongs to46 * @chip_label: name of the chip the GPIO belongs to
47 * @chip_hwnum: hardware number (i.e. relative to the chip) of the GPIO47 * @chip_hwnum: hardware number (i.e. relative to the chip) of the GPIO
48 * @line_name: consumer name for the hogged line48 * @line_name: consumer name for the hogged line
49 * @lflags: mask of GPIO lookup flags49 * @lflags: bitmask of gpio_lookup_flags GPIO_* values
50 * @dflags: GPIO flags used to specify the direction and value50 * @dflags: GPIO flags used to specify the direction and value
51 */51 */
52struct gpiod_hog {52struct gpiod_hog {
@@ -54,7 +54,7 @@ struct gpiod_hog { · 1 unmodified line
54 const char *chip_label;54 const char *chip_label;
55 u16 chip_hwnum;55 u16 chip_hwnum;
56 const char *line_name;56 const char *line_name;
57 enum gpio_lookup_flags lflags;57 unsigned long lflags;
58 int dflags;58 int dflags;
59};59};
60 60

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t