~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/include/linux/pinctrl/pinmux.h

Version: ~ [ linux-6.12-rc7 ] ~ [ linux-6.11.7 ] ~ [ linux-6.10.14 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.60 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.116 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.171 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.229 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.285 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.323 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.12 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

Diff markup

Differences between /include/linux/pinctrl/pinmux.h (Version linux-6.12-rc7) and /include/linux/pinctrl/pinmux.h (Version linux-5.6.19)


  1 /* SPDX-License-Identifier: GPL-2.0-only */         1 /* SPDX-License-Identifier: GPL-2.0-only */
  2 /*                                                  2 /*
  3  * Interface the pinmux subsystem                   3  * Interface the pinmux subsystem
  4  *                                                  4  *
  5  * Copyright (C) 2011 ST-Ericsson SA                5  * Copyright (C) 2011 ST-Ericsson SA
  6  * Written on behalf of Linaro for ST-Ericsson      6  * Written on behalf of Linaro for ST-Ericsson
  7  * Based on bits of regulator core, gpio core       7  * Based on bits of regulator core, gpio core and clk core
  8  *                                                  8  *
  9  * Author: Linus Walleij <linus.walleij@linaro      9  * Author: Linus Walleij <linus.walleij@linaro.org>
 10  */                                                10  */
 11 #ifndef __LINUX_PINCTRL_PINMUX_H                   11 #ifndef __LINUX_PINCTRL_PINMUX_H
 12 #define __LINUX_PINCTRL_PINMUX_H                   12 #define __LINUX_PINCTRL_PINMUX_H
 13                                                    13 
 14 #include <linux/types.h>                       !!  14 #include <linux/list.h>
                                                   >>  15 #include <linux/seq_file.h>
                                                   >>  16 #include <linux/pinctrl/pinctrl.h>
 15                                                    17 
 16 struct pinctrl_dev;                                18 struct pinctrl_dev;
 17 struct pinctrl_gpio_range;                     << 
 18                                                    19 
 19 /**                                                20 /**
 20  * struct pinmux_ops - pinmux operations, to b     21  * struct pinmux_ops - pinmux operations, to be implemented by pin controller
 21  * drivers that support pinmuxing                  22  * drivers that support pinmuxing
 22  * @request: called by the core to see if a ce     23  * @request: called by the core to see if a certain pin can be made
 23  *      available for muxing. This is called b     24  *      available for muxing. This is called by the core to acquire the pins
 24  *      before selecting any actual mux settin     25  *      before selecting any actual mux setting across a function. The driver
 25  *      is allowed to answer "no" by returning     26  *      is allowed to answer "no" by returning a negative error code
 26  * @free: the reverse function of the request(     27  * @free: the reverse function of the request() callback, frees a pin after
 27  *      being requested                            28  *      being requested
 28  * @get_functions_count: returns number of sel     29  * @get_functions_count: returns number of selectable named functions available
 29  *      in this pinmux driver                      30  *      in this pinmux driver
 30  * @get_function_name: return the function nam     31  * @get_function_name: return the function name of the muxing selector,
 31  *      called by the core to figure out which     32  *      called by the core to figure out which mux setting it shall map a
 32  *      certain device to                          33  *      certain device to
 33  * @get_function_groups: return an array of gr     34  * @get_function_groups: return an array of groups names (in turn
 34  *      referencing pins) connected to a certa     35  *      referencing pins) connected to a certain function selector. The group
 35  *      name can be used with the generic @pin     36  *      name can be used with the generic @pinctrl_ops to retrieve the
 36  *      actual pins affected. The applicable g     37  *      actual pins affected. The applicable groups will be returned in
 37  *      @groups and the number of groups in @n     38  *      @groups and the number of groups in @num_groups
 38  * @set_mux: enable a certain muxing function      39  * @set_mux: enable a certain muxing function with a certain pin group. The
 39  *      driver does not need to figure out whe     40  *      driver does not need to figure out whether enabling this function
 40  *      conflicts some other use of the pins i     41  *      conflicts some other use of the pins in that group, such collisions
 41  *      are handled by the pinmux subsystem. T     42  *      are handled by the pinmux subsystem. The @func_selector selects a
 42  *      certain function whereas @group_select     43  *      certain function whereas @group_selector selects a certain set of pins
 43  *      to be used. On simple controllers the      44  *      to be used. On simple controllers the latter argument may be ignored
 44  * @gpio_request_enable: requests and enables      45  * @gpio_request_enable: requests and enables GPIO on a certain pin.
 45  *      Implement this only if you can mux eve     46  *      Implement this only if you can mux every pin individually as GPIO. The
 46  *      affected GPIO range is passed along wi     47  *      affected GPIO range is passed along with an offset(pin number) into that
 47  *      specific GPIO range - function selecto     48  *      specific GPIO range - function selectors and pin groups are orthogonal
 48  *      to this, the core will however make su     49  *      to this, the core will however make sure the pins do not collide.
 49  * @gpio_disable_free: free up GPIO muxing on      50  * @gpio_disable_free: free up GPIO muxing on a certain pin, the reverse of
 50  *      @gpio_request_enable                       51  *      @gpio_request_enable
 51  * @gpio_set_direction: Since controllers may      52  * @gpio_set_direction: Since controllers may need different configurations
 52  *      depending on whether the GPIO is confi     53  *      depending on whether the GPIO is configured as input or output,
 53  *      a direction selector function may be i     54  *      a direction selector function may be implemented as a backing
 54  *      to the GPIO controllers that need pin      55  *      to the GPIO controllers that need pin muxing.
 55  * @strict: do not allow simultaneous use of t     56  * @strict: do not allow simultaneous use of the same pin for GPIO and another
 56  *      function. Check both gpio_owner and mu     57  *      function. Check both gpio_owner and mux_owner strictly before approving
 57  *      the pin request.                           58  *      the pin request.
 58  */                                                59  */
 59 struct pinmux_ops {                                60 struct pinmux_ops {
 60         int (*request) (struct pinctrl_dev *pc !!  61         int (*request) (struct pinctrl_dev *pctldev, unsigned offset);
 61         int (*free) (struct pinctrl_dev *pctld !!  62         int (*free) (struct pinctrl_dev *pctldev, unsigned offset);
 62         int (*get_functions_count) (struct pin     63         int (*get_functions_count) (struct pinctrl_dev *pctldev);
 63         const char *(*get_function_name) (stru     64         const char *(*get_function_name) (struct pinctrl_dev *pctldev,
 64                                           unsi !!  65                                           unsigned selector);
 65         int (*get_function_groups) (struct pin     66         int (*get_function_groups) (struct pinctrl_dev *pctldev,
 66                                     unsigned i !!  67                                   unsigned selector,
 67                                     const char !!  68                                   const char * const **groups,
 68                                     unsigned i !!  69                                   unsigned *num_groups);
 69         int (*set_mux) (struct pinctrl_dev *pc !!  70         int (*set_mux) (struct pinctrl_dev *pctldev, unsigned func_selector,
 70                         unsigned int group_sel !!  71                         unsigned group_selector);
 71         int (*gpio_request_enable) (struct pin     72         int (*gpio_request_enable) (struct pinctrl_dev *pctldev,
 72                                     struct pin     73                                     struct pinctrl_gpio_range *range,
 73                                     unsigned i !!  74                                     unsigned offset);
 74         void (*gpio_disable_free) (struct pinc     75         void (*gpio_disable_free) (struct pinctrl_dev *pctldev,
 75                                    struct pinc     76                                    struct pinctrl_gpio_range *range,
 76                                    unsigned in !!  77                                    unsigned offset);
 77         int (*gpio_set_direction) (struct pinc     78         int (*gpio_set_direction) (struct pinctrl_dev *pctldev,
 78                                    struct pinc     79                                    struct pinctrl_gpio_range *range,
 79                                    unsigned in !!  80                                    unsigned offset,
 80                                    bool input)     81                                    bool input);
 81         bool strict;                               82         bool strict;
 82 };                                                 83 };
 83                                                    84 
 84 #endif /* __LINUX_PINCTRL_PINMUX_H */              85 #endif /* __LINUX_PINCTRL_PINMUX_H */
 85                                                    86 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

sflogo.php