Lines Matching refs:pin

12  * functions. The SoC function enabled on a pin is determined on a priority
13 * basis where a given pin can provide a number of different signal types.
15 * The signal active on a pin is described by both a priority level and
17 * bits. Some difficulty arises as the pin's function bit masks for each
31 * D6 is a pin with a single function (beside GPIO); a high priority signal
39 * C5 is a multi-signal pin (high and low priority signals). Here we touch
46 * E19 is a single-signal pin with two functions that influence the active
48 * LPC reset pin. However it's not always the case that the bits in the
55 * For example, pin B19 has a low-priority signal that's enabled by two
66 * For pin E18, the SoC ANDs the expected state of three bits to determine the
67 * pin's active signal:
70 * * SCU80[15]: Enable SPICS1# or EXTRST# function pin
78 * selecting the signals on pin E18)
80 * Pin T5 is a multi-signal pin with a more complex configuration:
104 * function pin", where the signal itself is determined by whether SCU94[5:4]
121 * enabled on a per-pin basis, and by contrast, all signals for UART6 are
130 * fails in this instance where applying the configuration for the UART pin of
132 * VPI functions on the current pin.
160 * * For priorities levels defined on a pin, each priority provides one signal
175 * comparisons must evaluate 'true' for a signal to be enabled on a pin.
177 * * A signal participating in a function is active on a pin if evaluating all
178 * signal descriptors in the pin's signal expression for the function yields
181 * * A signal at a given priority on a given pin is active if any of the
183 * priority signal on the pin is active
185 * * GPIO is configured per-pin
192 * * Each pin must know the signal expressions of functions in which it
195 * pin.
217 * If pinctrl allows us to allocate a pin we can configure a function without
218 * concern for the function of already allocated pins, if pin groups are
220 * intuitive, but it did not feel obvious from the bit/pin relationships.
244 * properties associated with a given mux configuration: The pin, the signal,
249 * no override errors in the pin, group and function arrays.
454 * @signal: The signal name for the priority level on the pin. If the signal
458 * associated expression. For pin-specific GPIO, the function
473 * for a given pin. The signal configuration for a priority level is evaluated
477 * @name: A name for the pin
583 * Create an expression symbol alias from (signal, group) to (pin, signal).
585 * @pin: The pin number
587 * @group: The name of the group of which the pin is a member that is
591 * the signal for a group multiple times) whilst enabling multiple pin groups
593 * signals available on a pin.
595 #define SIG_EXPR_LIST_ALIAS(pin, sig, group) \
597 SIG_EXPR_LIST_SYM(pin, sig)[ARRAY_SIZE(SIG_EXPR_LIST_SYM(sig, group))] \
604 * @pin: The pin the signal will be routed to
605 * @sig: The signal that will be routed to the pin for the function
613 #define SIG_EXPR_LIST_DECL_SESG(pin, sig, func, ...) \
617 SIG_EXPR_LIST_ALIAS(pin, sig, func)
623 * @pin: The pin the signal will be routed to
624 * @sig: The signal that will be routed to the pin for the function
625 * @group: The name of the function's pin group in which the pin participates
629 #define SIG_EXPR_LIST_DECL_SEMG(pin, sig, group, func, ...) \
633 SIG_EXPR_LIST_ALIAS(pin, sig, group)
639 * @pin: The pin the signal will be routed to
640 * @sig: The signal that will be routed to the pin for the function
641 * @group: The name of the function's pin group in which the pin participates
645 #define SIG_EXPR_LIST_DECL_DESG(pin, sig, f0, f1) \
649 SIG_EXPR_LIST_ALIAS(pin, sig, f0)
653 #define PIN_EXPRS_SYM(pin) pin_exprs_ ## pin
654 #define PIN_EXPRS_PTR(pin) (&PIN_EXPRS_SYM(pin)[0])
655 #define PIN_SYM(pin) pin_ ## pin
657 #define PIN_DECL_(pin, ...) \
658 static const struct aspeed_sig_expr **PIN_EXPRS_SYM(pin)[] = \
660 static const struct aspeed_pin_desc PIN_SYM(pin) = \
661 { #pin, PIN_EXPRS_PTR(pin) }
664 * Declare a single signal pin
666 * @pin: The pin number
676 #define PIN_DECL_1(pin, other, sig) \
677 SIG_EXPR_LIST_DECL_SESG(pin, other, other); \
678 PIN_DECL_(pin, SIG_EXPR_LIST_PTR(pin, sig), \
679 SIG_EXPR_LIST_PTR(pin, other))
682 * Single signal, single function pin declaration
684 * @pin: The pin number
693 #define SSSF_PIN_DECL(pin, other, sig, ...) \
694 SIG_EXPR_LIST_DECL_SESG(pin, sig, sig, __VA_ARGS__); \
695 SIG_EXPR_LIST_DECL_SESG(pin, other, other); \
696 PIN_DECL_(pin, SIG_EXPR_LIST_PTR(pin, sig), \
697 SIG_EXPR_LIST_PTR(pin, other)); \
698 FUNC_GROUP_DECL(sig, pin)
700 * Declare a two-signal pin
702 * @pin: The pin number
718 #define PIN_DECL_2(pin, other, high, low) \
719 SIG_EXPR_LIST_DECL_SESG(pin, other, other); \
720 PIN_DECL_(pin, \
721 SIG_EXPR_LIST_PTR(pin, high), \
722 SIG_EXPR_LIST_PTR(pin, low), \
723 SIG_EXPR_LIST_PTR(pin, other))
725 #define PIN_DECL_3(pin, other, high, medium, low) \
726 SIG_EXPR_LIST_DECL_SESG(pin, other, other); \
727 PIN_DECL_(pin, \
728 SIG_EXPR_LIST_PTR(pin, high), \
729 SIG_EXPR_LIST_PTR(pin, medium), \
730 SIG_EXPR_LIST_PTR(pin, low), \
731 SIG_EXPR_LIST_PTR(pin, other))
750 #define GPIO_PIN_DECL(pin, gpio) \
751 SIG_EXPR_LIST_DECL_SESG(pin, gpio, gpio); \
752 PIN_DECL_(pin, SIG_EXPR_LIST_PTR(pin, gpio))