History

Merge tag 'pinctrl-v5.3-1' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl

Pull pin control updates from Linus Walleij: "This is the bulk of pin control changes for the v5.3 kernel cycle: Core changes: - Device links can optionally be added between a pin control producer and its consumers. This will affect how the system power management is handled: a pin controller will not suspend before all of its consumers have been suspended. This was necessary for the ST Microelectronics STMFX expander and need to be tested on other systems as well: it makes sense to make this default in the long run. Right now it is opt-in per driver. - Drive strength can be specified in microamps. With decreases in silicon technology, milliamps isn't granular enough, let's make it possible to select drive strengths in microamps. Right now the Meson (AMlogic) driver needs this. New drivers: - New subdriver for the Tegra 194 SoC. - New subdriver for the Qualcomm SDM845. - New subdriver for the Qualcomm SM8150. - New subdriver for the Freescale i.MX8MN (Freescale is now a product line of NXP). - New subdriver for Marvell MV98DX1135. Driver improvements: - The Bitmain BM1880 driver now supports pin config in addition to muxing. - The Qualcomm drivers can now reserve some GPIOs as taken aside and not usable for users. This is used in ACPI systems to take out some GPIO lines used by the BIOS so that noone else (neither kernel nor userspace) will play with them by mistake and crash the machine. - A slew of refurbishing around the Aspeed drivers (board management controllers for servers) in preparation for the new Aspeed AST2600 SoC. - A slew of improvements over the SH PFC drivers as usual. - Misc cleanups and fixes" * tag 'pinctrl-v5.3-1' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl: (106 commits) pinctrl: aspeed: Strip moved macros and structs from private header pinctrl: aspeed: Fix missed include pinctrl: baytrail: Use GENMASK() consistently pinctrl: baytrail: Re-use data structures from pinctrl-intel.h pinctrl: baytrail: Use defined macro instead of magic in byt_get_gpio_mux() pinctrl: qcom: Add SM8150 pinctrl driver dt-bindings: pinctrl: qcom: Add SM8150 pinctrl binding dt-bindings: pinctrl: qcom: Document missing gpio nodes pinctrl: aspeed: Add implementation-related documentation pinctrl: aspeed: Split out pinmux from general pinctrl pinctrl: aspeed: Clarify comment about strapping W1C pinctrl: aspeed: Correct comment that is no longer true MAINTAINERS: Add entry for ASPEED pinctrl drivers dt-bindings: pinctrl: aspeed: Convert AST2500 bindings to json-schema dt-bindings: pinctrl: aspeed: Convert AST2400 bindings to json-schema dt-bindings: pinctrl: aspeed: Split bindings document in two pinctrl: qcom: Add irq_enable callback for msm gpio pinctrl: madera: Fixup SPDX headers pinctrl: qcom: sdm845: Fix CONFIG preprocessor guard pinctrl: tegra: Add bitmask support for parked bits ...

Linus Torvalds committed 7 years ago

Commit 43c95d32 parents 073c916 4c10576109 files · +7689 −3198Browse files

Showing the changes to include/linux (7 of 109 files). Show all

Unified · Split

7 files
  1. include/linux/gpio.h +1 −0
  2. include/linux/gpio/driver.h +2 −0
  3. include/linux/pinctrl/pinconf-generic.h +9 −14
  4. include/linux/pinctrl/pinconf.h +1 −3
  5. include/linux/pinctrl/pinctrl-state.h +5 −0
  6. include/linux/pinctrl/pinctrl.h +5 −14
  7. include/linux/pinctrl/pinmux.h +0 −4
include/linux/gpio.h+1−0
@@ -106,6 +106,7 @@ void devm_gpio_free(struct device *dev, unsigned int gpio); · 105 unmodified lines
106 106
107struct device;107struct device;
108struct gpio_chip;108struct gpio_chip;
109struct pinctrl_dev;
109 110
110static inline bool gpio_is_valid(int number)111static inline bool gpio_is_valid(int number)
111{112{
include/linux/gpio/driver.h+2−0
@@ -586,6 +586,8 @@ void gpiochip_remove_pin_ranges(struct gpio_chip *chip); · 585 unmodified lines
586 586
587#else /* ! CONFIG_PINCTRL */587#else /* ! CONFIG_PINCTRL */
588 588
589struct pinctrl_dev;
590
589static inline int591static inline int
590gpiochip_add_pin_range(struct gpio_chip *chip, const char *pinctl_name,592gpiochip_add_pin_range(struct gpio_chip *chip, const char *pinctl_name,
591 unsigned int gpio_offset, unsigned int pin_offset,593 unsigned int gpio_offset, unsigned int pin_offset,
include/linux/pinctrl/pinconf-generic.h+9−14
@@ -11,6 +11,12 @@ · 10 unmodified lines
11#ifndef __LINUX_PINCTRL_PINCONF_GENERIC_H11#ifndef __LINUX_PINCTRL_PINCONF_GENERIC_H
12#define __LINUX_PINCTRL_PINCONF_GENERIC_H12#define __LINUX_PINCTRL_PINCONF_GENERIC_H
13 13
14#include <linux/device.h>
15#include <linux/pinctrl/machine.h>
16
17struct pinctrl_dev;
18struct pinctrl_map;
19
14/**20/**
15 * enum pin_config_param - possible pin configuration parameters21 * enum pin_config_param - possible pin configuration parameters
16 * @PIN_CONFIG_BIAS_BUS_HOLD: the pin will be set to weakly latch so that it22 * @PIN_CONFIG_BIAS_BUS_HOLD: the pin will be set to weakly latch so that it
@@ -54,6 +60,8 @@ · 37 unmodified lines
54 * push-pull mode, the argument is ignored.60 * push-pull mode, the argument is ignored.
55 * @PIN_CONFIG_DRIVE_STRENGTH: the pin will sink or source at most the current61 * @PIN_CONFIG_DRIVE_STRENGTH: the pin will sink or source at most the current
56 * passed as argument. The argument is in mA.62 * passed as argument. The argument is in mA.
63 * @PIN_CONFIG_DRIVE_STRENGTH_UA: the pin will sink or source at most the current
64 * passed as argument. The argument is in uA.
57 * @PIN_CONFIG_INPUT_DEBOUNCE: this will configure the pin to debounce mode,65 * @PIN_CONFIG_INPUT_DEBOUNCE: this will configure the pin to debounce mode,
58 * which means it will wait for signals to settle when reading inputs. The66 * which means it will wait for signals to settle when reading inputs. The
59 * argument gives the debounce time in usecs. Setting the67 * argument gives the debounce time in usecs. Setting the
@@ -111,6 +119,7 @@ enum pin_config_param { · 51 unmodified lines
111 PIN_CONFIG_DRIVE_OPEN_SOURCE,119 PIN_CONFIG_DRIVE_OPEN_SOURCE,
112 PIN_CONFIG_DRIVE_PUSH_PULL,120 PIN_CONFIG_DRIVE_PUSH_PULL,
113 PIN_CONFIG_DRIVE_STRENGTH,121 PIN_CONFIG_DRIVE_STRENGTH,
122 PIN_CONFIG_DRIVE_STRENGTH_UA,
114 PIN_CONFIG_INPUT_DEBOUNCE,123 PIN_CONFIG_INPUT_DEBOUNCE,
115 PIN_CONFIG_INPUT_ENABLE,124 PIN_CONFIG_INPUT_ENABLE,
116 PIN_CONFIG_INPUT_SCHMITT,125 PIN_CONFIG_INPUT_SCHMITT,
@@ -155,9 +164,6 @@ static inline unsigned long pinconf_to_config_packed(enum pin_config_param param · 38 unmodified lines
155 return PIN_CONF_PACKED(param, argument);164 return PIN_CONF_PACKED(param, argument);
156}165}
157 166
158#ifdef CONFIG_GENERIC_PINCONF
159
160#ifdef CONFIG_DEBUG_FS
161#define PCONFDUMP(a, b, c, d) { \167#define PCONFDUMP(a, b, c, d) { \
162 .param = a, .display = b, .format = c, .has_arg = d \168 .param = a, .display = b, .format = c, .has_arg = d \
163 }169 }
@@ -168,14 +174,6 @@ struct pin_config_item { · 4 unmodified lines
168 const char * const format;174 const char * const format;
169 bool has_arg;175 bool has_arg;
170};176};
171#endif /* CONFIG_DEBUG_FS */
172
173#ifdef CONFIG_OF
174
175#include <linux/device.h>
176#include <linux/pinctrl/machine.h>
177struct pinctrl_dev;
178struct pinctrl_map;
179 177
180struct pinconf_generic_params {178struct pinconf_generic_params {
181 const char * const property;179 const char * const property;
@@ -220,8 +218,5 @@ static inline int pinconf_generic_dt_node_to_map_all( · 38 unmodified lines
220 return pinconf_generic_dt_node_to_map(pctldev, np_config, map, num_maps,218 return pinconf_generic_dt_node_to_map(pctldev, np_config, map, num_maps,
221 PIN_MAP_TYPE_INVALID);219 PIN_MAP_TYPE_INVALID);
222}220}
223#endif
224
225#endif /* CONFIG_GENERIC_PINCONF */
226 221
227#endif /* __LINUX_PINCTRL_PINCONF_GENERIC_H */222#endif /* __LINUX_PINCTRL_PINCONF_GENERIC_H */
include/linux/pinctrl/pinconf.h+1−3
@@ -11,7 +11,7 @@ · 10 unmodified lines
11#ifndef __LINUX_PINCTRL_PINCONF_H11#ifndef __LINUX_PINCTRL_PINCONF_H
12#define __LINUX_PINCTRL_PINCONF_H12#define __LINUX_PINCTRL_PINCONF_H
13 13
14#ifdef CONFIG_PINCONF14#include <linux/types.h>
15 15
16struct pinctrl_dev;16struct pinctrl_dev;
17struct seq_file;17struct seq_file;
@@ -64,6 +64,4 @@ struct pinconf_ops { · 46 unmodified lines
64 unsigned long config);64 unsigned long config);
65};65};
66 66
67#endif
68
69#endif /* __LINUX_PINCTRL_PINCONF_H */67#endif /* __LINUX_PINCTRL_PINCONF_H */
include/linux/pinctrl/pinctrl-state.h+5−0
@@ -3,6 +3,9 @@ · 2 unmodified lines
3 * Standard pin control state definitions3 * Standard pin control state definitions
4 */4 */
5 5
6#ifndef __LINUX_PINCTRL_PINCTRL_STATE_H
7#define __LINUX_PINCTRL_PINCTRL_STATE_H
8
6/**9/**
7 * @PINCTRL_STATE_DEFAULT: the state the pinctrl handle shall be put10 * @PINCTRL_STATE_DEFAULT: the state the pinctrl handle shall be put
8 * into as default, usually this means the pins are up and ready to11 * into as default, usually this means the pins are up and ready to
@@ -31,3 +34,5 @@ · 22 unmodified lines
31#define PINCTRL_STATE_INIT "init"34#define PINCTRL_STATE_INIT "init"
32#define PINCTRL_STATE_IDLE "idle"35#define PINCTRL_STATE_IDLE "idle"
33#define PINCTRL_STATE_SLEEP "sleep"36#define PINCTRL_STATE_SLEEP "sleep"
37
38#endif /* __LINUX_PINCTRL_PINCTRL_STATE_H */
include/linux/pinctrl/pinctrl.h+5−14
@@ -11,8 +11,6 @@ · 10 unmodified lines
11#ifndef __LINUX_PINCTRL_PINCTRL_H11#ifndef __LINUX_PINCTRL_PINCTRL_H
12#define __LINUX_PINCTRL_PINCTRL_H12#define __LINUX_PINCTRL_PINCTRL_H
13 13
14#ifdef CONFIG_PINCTRL
15
16#include <linux/radix-tree.h>14#include <linux/radix-tree.h>
17#include <linux/list.h>15#include <linux/list.h>
18#include <linux/seq_file.h>16#include <linux/seq_file.h>
@@ -124,6 +122,10 @@ struct pinctrl_ops { · 105 unmodified lines
124 * the hardware description122 * the hardware description
125 * @custom_conf_items: Information how to print @params in debugfs, must be123 * @custom_conf_items: Information how to print @params in debugfs, must be
126 * the same size as the @custom_params, i.e. @num_custom_params124 * the same size as the @custom_params, i.e. @num_custom_params
125 * @link_consumers: If true create a device link between pinctrl and its
126 * consumers (i.e. the devices requesting pin control states). This is
127 * sometimes necessary to ascertain the right suspend/resume order for
128 * example.
127 */129 */
128struct pinctrl_desc {130struct pinctrl_desc {
129 const char *name;131 const char *name;
@@ -138,6 +140,7 @@ struct pinctrl_desc { · 8 unmodified lines
138 const struct pinconf_generic_params *custom_params;140 const struct pinconf_generic_params *custom_params;
139 const struct pin_config_item *custom_conf_items;141 const struct pin_config_item *custom_conf_items;
140#endif142#endif
143 bool link_consumers;
141};144};
142 145
143/* External interface to pin controller */146/* External interface to pin controller */
@@ -166,7 +169,6 @@ extern struct pinctrl_dev *devm_pinctrl_register(struct device *dev, · 22 unmodified lines
166extern void devm_pinctrl_unregister(struct device *dev,169extern void devm_pinctrl_unregister(struct device *dev,
167 struct pinctrl_dev *pctldev);170 struct pinctrl_dev *pctldev);
168 171
169extern bool pin_is_valid(struct pinctrl_dev *pctldev, int pin);
170extern void pinctrl_add_gpio_range(struct pinctrl_dev *pctldev,172extern void pinctrl_add_gpio_range(struct pinctrl_dev *pctldev,
171 struct pinctrl_gpio_range *range);173 struct pinctrl_gpio_range *range);
172extern void pinctrl_add_gpio_ranges(struct pinctrl_dev *pctldev,174extern void pinctrl_add_gpio_ranges(struct pinctrl_dev *pctldev,
@@ -197,16 +199,5 @@ struct pinctrl_dev *of_pinctrl_get(struct device_node *np) · 24 unmodified lines
197extern const char *pinctrl_dev_get_name(struct pinctrl_dev *pctldev);199extern const char *pinctrl_dev_get_name(struct pinctrl_dev *pctldev);
198extern const char *pinctrl_dev_get_devname(struct pinctrl_dev *pctldev);200extern const char *pinctrl_dev_get_devname(struct pinctrl_dev *pctldev);
199extern void *pinctrl_dev_get_drvdata(struct pinctrl_dev *pctldev);201extern void *pinctrl_dev_get_drvdata(struct pinctrl_dev *pctldev);
200#else
201
202struct pinctrl_dev;
203
204/* Sufficiently stupid default functions when pinctrl is not in use */
205static inline bool pin_is_valid(struct pinctrl_dev *pctldev, int pin)
206{
207 return pin >= 0;
208}
209
210#endif /* !CONFIG_PINCTRL */
211 202
212#endif /* __LINUX_PINCTRL_PINCTRL_H */203#endif /* __LINUX_PINCTRL_PINCTRL_H */
include/linux/pinctrl/pinmux.h+0−4
@@ -15,8 +15,6 @@ · 14 unmodified lines
15#include <linux/seq_file.h>15#include <linux/seq_file.h>
16#include <linux/pinctrl/pinctrl.h>16#include <linux/pinctrl/pinctrl.h>
17 17
18#ifdef CONFIG_PINMUX
19
20struct pinctrl_dev;18struct pinctrl_dev;
21 19
22/**20/**
@@ -84,6 +82,4 @@ struct pinmux_ops { · 61 unmodified lines
84 bool strict;82 bool strict;
85};83};
86 84
87#endif /* CONFIG_PINMUX */
88
89#endif /* __LINUX_PINCTRL_PINMUX_H */85#endif /* __LINUX_PINCTRL_PINMUX_H */

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