diff options
Diffstat (limited to 'drivers/pinctrl/core.h')
-rw-r--r-- | drivers/pinctrl/core.h | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/drivers/pinctrl/core.h b/drivers/pinctrl/core.h index 5f258b793400..0bc52ecaf710 100644 --- a/drivers/pinctrl/core.h +++ b/drivers/pinctrl/core.h | |||
@@ -82,7 +82,14 @@ struct pinctrl_setting { | |||
82 | * @name: a name for the pin, e.g. the name of the pin/pad/finger on a | 82 | * @name: a name for the pin, e.g. the name of the pin/pad/finger on a |
83 | * datasheet or such | 83 | * datasheet or such |
84 | * @dynamic_name: if the name of this pin was dynamically allocated | 84 | * @dynamic_name: if the name of this pin was dynamically allocated |
85 | * @owner: the device holding this pin or NULL of no device has claimed it | 85 | * @usecount: If zero, the pin is not claimed, and @owner should be NULL. |
86 | * If non-zero, this pin is claimed by @owner. This field is an integer | ||
87 | * rather than a boolean, since pinctrl_get() might process multiple | ||
88 | * mapping table entries that refer to, and hence claim, the same group | ||
89 | * or pin, and each of these will increment the @usecount. | ||
90 | * @owner: The name of the entity owning the pin. Typically, this is the name | ||
91 | * of the device that called pinctrl_get(). Alternatively, it may be the | ||
92 | * name of the GPIO passed to pinctrl_request_gpio(). | ||
86 | */ | 93 | */ |
87 | struct pin_desc { | 94 | struct pin_desc { |
88 | struct pinctrl_dev *pctldev; | 95 | struct pinctrl_dev *pctldev; |
@@ -90,6 +97,7 @@ struct pin_desc { | |||
90 | bool dynamic_name; | 97 | bool dynamic_name; |
91 | /* These fields only added when supporting pinmux drivers */ | 98 | /* These fields only added when supporting pinmux drivers */ |
92 | #ifdef CONFIG_PINMUX | 99 | #ifdef CONFIG_PINMUX |
100 | unsigned usecount; | ||
93 | const char *owner; | 101 | const char *owner; |
94 | #endif | 102 | #endif |
95 | }; | 103 | }; |