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
106106
107107 struct device;
108108 struct gpio_chip;
109+struct pinctrl_dev;
109110
110111 static inline bool gpio_is_valid(int number)
111112 {
include/linux/gpio/driver.h+2−0
@@ -586,6 +586,8 @@ void gpiochip_remove_pin_ranges(struct gpio_chip *chip); · 585 unmodified lines
586586
587587 #else /* ! CONFIG_PINCTRL */
588588
589+struct pinctrl_dev;
590+
589591 static inline int
590592 gpiochip_add_pin_range(struct gpio_chip *chip, const char *pinctl_name,
591593 unsigned int gpio_offset, unsigned int pin_offset,
include/linux/pinctrl/pinconf-generic.h+9−14
@@ -11,6 +11,12 @@ · 10 unmodified lines
1111 #ifndef __LINUX_PINCTRL_PINCONF_GENERIC_H
1212 #define __LINUX_PINCTRL_PINCONF_GENERIC_H
1313
14+#include <linux/device.h>
15+#include <linux/pinctrl/machine.h>
16+
17+struct pinctrl_dev;
18+struct pinctrl_map;
19+
1420 /**
1521 * enum pin_config_param - possible pin configuration parameters
1622 * @PIN_CONFIG_BIAS_BUS_HOLD: the pin will be set to weakly latch so that it
@@ -54,6 +60,8 @@ · 37 unmodified lines
5460 * push-pull mode, the argument is ignored.
5561 * @PIN_CONFIG_DRIVE_STRENGTH: the pin will sink or source at most the current
5662 * 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.
5765 * @PIN_CONFIG_INPUT_DEBOUNCE: this will configure the pin to debounce mode,
5866 * which means it will wait for signals to settle when reading inputs. The
5967 * argument gives the debounce time in usecs. Setting the
@@ -111,6 +119,7 @@ enum pin_config_param { · 51 unmodified lines
111119 PIN_CONFIG_DRIVE_OPEN_SOURCE,
112120 PIN_CONFIG_DRIVE_PUSH_PULL,
113121 PIN_CONFIG_DRIVE_STRENGTH,
122+ PIN_CONFIG_DRIVE_STRENGTH_UA,
114123 PIN_CONFIG_INPUT_DEBOUNCE,
115124 PIN_CONFIG_INPUT_ENABLE,
116125 PIN_CONFIG_INPUT_SCHMITT,
@@ -155,9 +164,6 @@ static inline unsigned long pinconf_to_config_packed(enum pin_config_param param · 38 unmodified lines
155164 return PIN_CONF_PACKED(param, argument);
156165 }
157166
158−#ifdef CONFIG_GENERIC_PINCONF
159−
160−#ifdef CONFIG_DEBUG_FS
161167 #define PCONFDUMP(a, b, c, d) { \
162168 .param = a, .display = b, .format = c, .has_arg = d \
163169 }
@@ -168,14 +174,6 @@ struct pin_config_item { · 4 unmodified lines
168174 const char * const format;
169175 bool has_arg;
170176 };
171−#endif /* CONFIG_DEBUG_FS */
172−
173−#ifdef CONFIG_OF
174−
175−#include <linux/device.h>
176−#include <linux/pinctrl/machine.h>
177−struct pinctrl_dev;
178−struct pinctrl_map;
179177
180178 struct pinconf_generic_params {
181179 const char * const property;
@@ -220,8 +218,5 @@ static inline int pinconf_generic_dt_node_to_map_all( · 38 unmodified lines
220218 return pinconf_generic_dt_node_to_map(pctldev, np_config, map, num_maps,
221219 PIN_MAP_TYPE_INVALID);
222220 }
223−#endif
224−
225−#endif /* CONFIG_GENERIC_PINCONF */
226221
227222 #endif /* __LINUX_PINCTRL_PINCONF_GENERIC_H */
include/linux/pinctrl/pinconf.h+1−3
@@ -11,7 +11,7 @@ · 10 unmodified lines
1111 #ifndef __LINUX_PINCTRL_PINCONF_H
1212 #define __LINUX_PINCTRL_PINCONF_H
1313
14−#ifdef CONFIG_PINCONF
14+#include <linux/types.h>
1515
1616 struct pinctrl_dev;
1717 struct seq_file;
@@ -64,6 +64,4 @@ struct pinconf_ops { · 46 unmodified lines
6464 unsigned long config);
6565 };
6666
67−#endif
68−
6967 #endif /* __LINUX_PINCTRL_PINCONF_H */
include/linux/pinctrl/pinctrl-state.h+5−0
@@ -3,6 +3,9 @@ · 2 unmodified lines
33 * Standard pin control state definitions
44 */
55
6+#ifndef __LINUX_PINCTRL_PINCTRL_STATE_H
7+#define __LINUX_PINCTRL_PINCTRL_STATE_H
8+
69 /**
710 * @PINCTRL_STATE_DEFAULT: the state the pinctrl handle shall be put
811 * into as default, usually this means the pins are up and ready to
@@ -31,3 +34,5 @@ · 22 unmodified lines
3134 #define PINCTRL_STATE_INIT "init"
3235 #define PINCTRL_STATE_IDLE "idle"
3336 #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
1111 #ifndef __LINUX_PINCTRL_PINCTRL_H
1212 #define __LINUX_PINCTRL_PINCTRL_H
1313
14−#ifdef CONFIG_PINCTRL
15−
1614 #include <linux/radix-tree.h>
1715 #include <linux/list.h>
1816 #include <linux/seq_file.h>
@@ -124,6 +122,10 @@ struct pinctrl_ops { · 105 unmodified lines
124122 * the hardware description
125123 * @custom_conf_items: Information how to print @params in debugfs, must be
126124 * 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.
127129 */
128130 struct pinctrl_desc {
129131 const char *name;
@@ -138,6 +140,7 @@ struct pinctrl_desc { · 8 unmodified lines
138140 const struct pinconf_generic_params *custom_params;
139141 const struct pin_config_item *custom_conf_items;
140142 #endif
143+ bool link_consumers;
141144 };
142145
143146 /* External interface to pin controller */
@@ -166,7 +169,6 @@ extern struct pinctrl_dev *devm_pinctrl_register(struct device *dev, · 22 unmodified lines
166169 extern void devm_pinctrl_unregister(struct device *dev,
167170 struct pinctrl_dev *pctldev);
168171
169−extern bool pin_is_valid(struct pinctrl_dev *pctldev, int pin);
170172 extern void pinctrl_add_gpio_range(struct pinctrl_dev *pctldev,
171173 struct pinctrl_gpio_range *range);
172174 extern 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
197199 extern const char *pinctrl_dev_get_name(struct pinctrl_dev *pctldev);
198200 extern const char *pinctrl_dev_get_devname(struct pinctrl_dev *pctldev);
199201 extern void *pinctrl_dev_get_drvdata(struct pinctrl_dev *pctldev);
200−#else
201−
202−struct pinctrl_dev;
203−
204−/* Sufficiently stupid default functions when pinctrl is not in use */
205−static inline bool pin_is_valid(struct pinctrl_dev *pctldev, int pin)
206−{
207− return pin >= 0;
208−}
209−
210−#endif /* !CONFIG_PINCTRL */
211202
212203 #endif /* __LINUX_PINCTRL_PINCTRL_H */
include/linux/pinctrl/pinmux.h+0−4
@@ -15,8 +15,6 @@ · 14 unmodified lines
1515 #include <linux/seq_file.h>
1616 #include <linux/pinctrl/pinctrl.h>
1717
18−#ifdef CONFIG_PINMUX
19−
2018 struct pinctrl_dev;
2119
2220 /**
@@ -84,6 +82,4 @@ struct pinmux_ops { · 61 unmodified lines
8482 bool strict;
8583 };
8684
87−#endif /* CONFIG_PINMUX */
88−
8985 #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