mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-27 11:05:07 +07:00
43c95d3694
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. -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEElDRnuGcz/wPCXQWMQRCzN7AZXXMFAl0oTPcACgkQQRCzN7AZ XXNTsw//aNPfkJS8gRszv58G56lyuO8h6Cq4m5eDpzhlpjx5qjELgi9h2UNGINqD 7CWxo35ufbKe0fDIcqpXmtuDMtSu6MuKT3SMepuw9uf9wxyndK4RIuyb0lpAJrx2 +NMPxzS+ARlrMmcfvXPRyPWHqAkXsQk6zcCgiuNCPtROkOZgs1YZ3+pemZw2/FMq gSLTO/95p0TPWr6YAlpByqfsA1A/onEm9HOiU2INV7DrAfUj7mnkuC1nZ4IJDFcv Gn6qQVQPah+MBzkwt4WXy5kDRozCIbg7x+FQBw3KAO23TrLDTFuNsYIWGFcP2CN2 eT8iSP3cWrXNUuEgcPD59aO07rhFooT+QBQFt2ih1dJCV1u/795wb57nxSh1YDcO M2tG+AW2EZky65FXwhLW2rq3LvmTM4kiEz3mA/DrcOAKvvQllK+6FKEhNy0StstP yvvlqoXdgH3sfOnWTAyHr35qA/pMuGEXSryWTJPqpflCvZ3wxNk+IV5nyPAtfaFz CK7U0Ya7NaEp/5ZlpE720apJ4uSqmRrLwk5Y1eKQvT46mGOk3rC9ZPIMXc8mB10/ mJ9mTubi1t4uIPnBl/T1T7f8QhNtr9hOY6wjLf1LoMeJ1XVNBqA+2uydOlBJ1iop RQ7y/Jl1SZ/gBzKCmvjPHT2+0Oui9oXGd9bQi0xQKO5Lus/nAIg= =Wdw1 -----END PGP SIGNATURE----- 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 ...
86 lines
3.8 KiB
C
86 lines
3.8 KiB
C
/* SPDX-License-Identifier: GPL-2.0-only */
|
|
/*
|
|
* Interface the pinmux subsystem
|
|
*
|
|
* Copyright (C) 2011 ST-Ericsson SA
|
|
* Written on behalf of Linaro for ST-Ericsson
|
|
* Based on bits of regulator core, gpio core and clk core
|
|
*
|
|
* Author: Linus Walleij <linus.walleij@linaro.org>
|
|
*/
|
|
#ifndef __LINUX_PINCTRL_PINMUX_H
|
|
#define __LINUX_PINCTRL_PINMUX_H
|
|
|
|
#include <linux/list.h>
|
|
#include <linux/seq_file.h>
|
|
#include <linux/pinctrl/pinctrl.h>
|
|
|
|
struct pinctrl_dev;
|
|
|
|
/**
|
|
* struct pinmux_ops - pinmux operations, to be implemented by pin controller
|
|
* drivers that support pinmuxing
|
|
* @request: called by the core to see if a certain pin can be made
|
|
* available for muxing. This is called by the core to acquire the pins
|
|
* before selecting any actual mux setting across a function. The driver
|
|
* is allowed to answer "no" by returning a negative error code
|
|
* @free: the reverse function of the request() callback, frees a pin after
|
|
* being requested
|
|
* @get_functions_count: returns number of selectable named functions available
|
|
* in this pinmux driver
|
|
* @get_function_name: return the function name of the muxing selector,
|
|
* called by the core to figure out which mux setting it shall map a
|
|
* certain device to
|
|
* @get_function_groups: return an array of groups names (in turn
|
|
* referencing pins) connected to a certain function selector. The group
|
|
* name can be used with the generic @pinctrl_ops to retrieve the
|
|
* actual pins affected. The applicable groups will be returned in
|
|
* @groups and the number of groups in @num_groups
|
|
* @set_mux: enable a certain muxing function with a certain pin group. The
|
|
* driver does not need to figure out whether enabling this function
|
|
* conflicts some other use of the pins in that group, such collisions
|
|
* are handled by the pinmux subsystem. The @func_selector selects a
|
|
* certain function whereas @group_selector selects a certain set of pins
|
|
* to be used. On simple controllers the latter argument may be ignored
|
|
* @gpio_request_enable: requests and enables GPIO on a certain pin.
|
|
* Implement this only if you can mux every pin individually as GPIO. The
|
|
* affected GPIO range is passed along with an offset(pin number) into that
|
|
* specific GPIO range - function selectors and pin groups are orthogonal
|
|
* to this, the core will however make sure the pins do not collide.
|
|
* @gpio_disable_free: free up GPIO muxing on a certain pin, the reverse of
|
|
* @gpio_request_enable
|
|
* @gpio_set_direction: Since controllers may need different configurations
|
|
* depending on whether the GPIO is configured as input or output,
|
|
* a direction selector function may be implemented as a backing
|
|
* to the GPIO controllers that need pin muxing.
|
|
* @strict: do not allow simultaneous use of the same pin for GPIO and another
|
|
* function. Check both gpio_owner and mux_owner strictly before approving
|
|
* the pin request.
|
|
*/
|
|
struct pinmux_ops {
|
|
int (*request) (struct pinctrl_dev *pctldev, unsigned offset);
|
|
int (*free) (struct pinctrl_dev *pctldev, unsigned offset);
|
|
int (*get_functions_count) (struct pinctrl_dev *pctldev);
|
|
const char *(*get_function_name) (struct pinctrl_dev *pctldev,
|
|
unsigned selector);
|
|
int (*get_function_groups) (struct pinctrl_dev *pctldev,
|
|
unsigned selector,
|
|
const char * const **groups,
|
|
unsigned *num_groups);
|
|
int (*set_mux) (struct pinctrl_dev *pctldev, unsigned func_selector,
|
|
unsigned group_selector);
|
|
int (*gpio_request_enable) (struct pinctrl_dev *pctldev,
|
|
struct pinctrl_gpio_range *range,
|
|
unsigned offset);
|
|
void (*gpio_disable_free) (struct pinctrl_dev *pctldev,
|
|
struct pinctrl_gpio_range *range,
|
|
unsigned offset);
|
|
int (*gpio_set_direction) (struct pinctrl_dev *pctldev,
|
|
struct pinctrl_gpio_range *range,
|
|
unsigned offset,
|
|
bool input);
|
|
bool strict;
|
|
};
|
|
|
|
#endif /* __LINUX_PINCTRL_PINMUX_H */
|