/* Alternate functions: function C is set in hw by setting both A and B */ #define NMK_GPIO_ALT_GPIO 0 #define NMK_GPIO_ALT_A 1 #define NMK_GPIO_ALT_B 2 #define NMK_GPIO_ALT_C (NMK_GPIO_ALT_A | NMK_GPIO_ALT_B)
/** * enum prcm_gpiocr_reg_index * Used to reference an PRCM GPIOCR register address.
*/ enum prcm_gpiocr_reg_index {
PRCM_IDX_GPIOCR1,
PRCM_IDX_GPIOCR2,
PRCM_IDX_GPIOCR3
}; /** * enum prcm_gpiocr_altcx_index * Used to reference an Other alternate-C function.
*/ enum prcm_gpiocr_altcx_index {
PRCM_IDX_GPIOCR_ALTC1,
PRCM_IDX_GPIOCR_ALTC2,
PRCM_IDX_GPIOCR_ALTC3,
PRCM_IDX_GPIOCR_ALTC4,
PRCM_IDX_GPIOCR_ALTC_MAX,
};
/** * struct prcm_gpio_altcx - Other alternate-C function * @used: other alternate-C function availability * @reg_index: PRCM GPIOCR register index used to control the function * @control_bit: PRCM GPIOCR bit used to control the function
*/ struct prcm_gpiocr_altcx { bool used:1;
u8 reg_index:2;
u8 control_bit:5;
} __packed;
/** * struct prcm_gpio_altcx_pin_desc - Other alternate-C pin * @pin: The pin number * @altcx: array of other alternate-C[1-4] functions
*/ struct prcm_gpiocr_altcx_pin_desc { unsignedshort pin; struct prcm_gpiocr_altcx altcx[PRCM_IDX_GPIOCR_ALTC_MAX];
};
/** * struct nmk_function - Nomadik pinctrl mux function * @name: The name of the function, exported to pinctrl core. * @groups: An array of pin groups that may select this function. * @ngroups: The number of entries in @groups.
*/ struct nmk_function { constchar *name; constchar * const *groups; unsignedint ngroups;
};
/** * struct nmk_pingroup - describes a Nomadik pin group * @grp: Generic data of the pin group (name and pins) * @altsetting: the altsetting to apply to all pins in this group to * configure them to be used by a function
*/ struct nmk_pingroup { struct pingroup grp; int altsetting;
};
/** * struct nmk_pinctrl_soc_data - Nomadik pin controller per-SoC configuration * @pins: An array describing all pins the pin controller affects. * All pins which are also GPIOs must be listed first within the * array, and be numbered identically to the GPIO controller's * numbering. * @npins: The number of entries in @pins. * @functions: The functions supported on this SoC. * @nfunction: The number of entries in @functions. * @groups: An array describing all pin groups the pin SoC supports. * @ngroups: The number of entries in @groups. * @altcx_pins: The pins that support Other alternate-C function on this SoC * @npins_altcx: The number of Other alternate-C pins * @prcm_gpiocr_registers: The array of PRCM GPIOCR registers on this SoC
*/ struct nmk_pinctrl_soc_data { conststruct pinctrl_pin_desc *pins; unsignedint npins; conststruct nmk_function *functions; unsignedint nfunctions; conststruct nmk_pingroup *groups; unsignedint ngroups; conststruct prcm_gpiocr_altcx_pin_desc *altcx_pins; unsignedint npins_altcx; const u16 *prcm_gpiocr_registers;
};
/* * Symbols declared in gpio-nomadik used by pinctrl-nomadik. If pinctrl-nomadik * is enabled, then gpio-nomadik is enabled as well; the reverse if not always * true.
*/ void nmk_gpio_dbg_show_one(struct seq_file *s, struct pinctrl_dev *pctldev, struct gpio_chip *chip, unsignedint offset, unsignedint gpio);
/* Symbols declared in pinctrl-nomadik used by gpio-nomadik. */ #ifdef CONFIG_PINCTRL_NOMADIK externstruct nmk_gpio_chip *nmk_gpio_chips[NMK_MAX_BANKS]; extern spinlock_t nmk_gpio_slpm_lock; int __maybe_unused nmk_prcm_gpiocr_get_mode(struct pinctrl_dev *pctldev, int gpio); #endif
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.