Lines Matching +full:pinmux +full:- +full:ids
1 /* SPDX-License-Identifier: GPL-2.0
12 #include <linux/pinctrl/pinconf-generic.h>
119 * - name: Register name (unused, for documentation purposes only)
120 * - r: Physical register address
121 * - r_width: Width of the register (in bits)
122 * - f_width: Width of the fixed-width register fields (in bits)
123 * - ids: For each register field (from left to right, i.e. MSB to LSB),
124 * 2^f_width enum IDs must be specified, one for each possible
128 #define PINMUX_CFG_REG(name, r, r_width, f_width, ids) \ argument
131 BUILD_BUG_ON_ZERO(sizeof((const u16 []) { ids }) / sizeof(u16) != \
133 .enum_ids = (const u16 [(r_width / f_width) << f_width]) { ids }
137 * - name: Register name (unused, for documentation purposes only)
138 * - r: Physical register address
139 * - r_width: Width of the register (in bits)
140 * - f_widths: List of widths of the register fields (in bits), from left
143 * - ids: For each non-reserved register field (from left to right, i.e. MSB
144 * to LSB), 2^f_widths[i] enum IDs must be specified, one for each
148 #define PINMUX_CFG_REG_VAR(name, r, r_width, f_widths, ids) \ argument
151 SET_NR_ENUM_IDS(sizeof((const u16 []) { ids }) / sizeof(u16)) \
152 .enum_ids = (const u16 []) { ids }
170 u32 puen; /* Pull-enable or pull-up control register */
171 u32 pud; /* Pull-up/down or pull-down control register */
192 * - name: Register name (unused, for documentation purposes only)
193 * - r: Physical register address
194 * - r_width: Width of the register (in bits)
195 * - ids: For each register bit (from left to right, i.e. MSB to LSB), one
198 #define PINMUX_DATA_REG(name, r, r_width, ids) \ argument
200 BUILD_BUG_ON_ZERO(sizeof((const u16 []) { ids }) / sizeof(u16) != \
202 .enum_ids = (const u16 [r_width]) { ids }
210 * - ids...: List of GPIOs that are mapped to the same IRQ
212 #define PINMUX_IRQ(ids...) { \ argument
213 .gpios = (const short []) { ids, -1 } \
340 /* -----------------------------------------------------------------------------
349 * Describe generic pinmux data
350 * - data_or_mark: *_DATA or *_MARK enum ID
351 * - ids...: List of enum IDs to associate with data_or_mark
353 #define PINMUX_DATA(data_or_mark, ids...) data_or_mark, ids, 0 argument
356 * Describe a pinmux configuration without GPIO function that needs
358 * - ipsr: IPSR field (unused, for documentation purposes only)
359 * - fn: Function name, referring to a field in the IPSR
365 * Describe a pinmux configuration with GPIO function that needs configuration
368 * - ipsr: IPSR field
369 * - fn: Function name, also referring to the IPSR field
375 * Describe a pinmux configuration without GPIO function that needs
377 * pinmux function has a representation in a Module Select Register (MOD_SEL).
378 * - ipsr: IPSR field (unused, for documentation purposes only)
379 * - fn: Function name, also referring to the IPSR field
380 * - msel: Module selector
386 * Describe a pinmux configuration with GPIO function where the pinmux function
389 * - gpsr: GPSR field
390 * - fn: Function name, also referring to the GPSR field
391 * - gsel: Group selector
397 * Describe a pinmux configuration with GPIO function that needs configuration
399 * Function Select Register (GPSR), and where the pinmux function has a
401 * - ipsr: IPSR field
402 * - fn: Function name, also referring to the IPSR field
403 * - msel: Module selector
409 * Describe a pinmux configuration similar to PINMUX_IPSR_MSEL, but with
412 * - ipsr: IPSR field
413 * - fn: Function name, also referring to the IPSR field
414 * - psel: Physical multiplexing selector
415 * - msel: Module selector
421 * Describe a pinmux configuration in which a pin is physically multiplexed
423 * - ipsr: IPSR field
424 * - fn: Function name
425 * - psel: Physical multiplexing selector
431 * Describe a pinmux configuration for a single-function pin with GPIO
433 * - fn: Function name
611 /* GP_ALL(suffix) - Expand to a list of GP_#_#_suffix */
615 /* PINMUX_GPIO_GP_ALL - Expand to a list of sh_pfc_pin entries */
624 /* PINMUX_DATA_GP_ALL - Expand to a list of name_DATA, name_FN marks */
629 * GP_ASSIGN_LAST() - Expand to an enum definition for the last GP pin
666 /* PORT_ALL(suffix) - Expand to a list of PORT_#_suffix */
670 /* PINMUX_GPIO - Expand to a sh_pfc_pin entry */
673 .pin = (u16)-1, \
678 /* SH_PFC_PIN_CFG - Expand to a sh_pfc_pin entry (named PORT#) with config */
686 /* PINMUX_DATA_ALL - Expand to a list of PORT_name_DATA, PORT_name_FN0,
695 * PORT_ASSIGN_LAST() - Expand to an enum definition for the last PORT pin
712 /* GPIO_FN(name) - Expand to a sh_pfc_pin entry for a function GPIO */
714 [gpio - (base)] = { \
728 /* NOGP_ALL - Expand to a list of PIN_id */
732 /* PINMUX_NOGP_ALL - Expand to a list of sh_pfc_pin entries */
741 * PORTnCR helper macro for SH-Mobile/R-Mobile
744 PINMUX_CFG_REG_VAR("PORT" nr "CR", reg, 8, GROUP(-2, 2, -1, 3), \
759 * GPIO number helper macro for R-Car