mirror of
https://github.com/torvalds/linux.git
synced 2026-06-04 04:23:35 +02:00
pinctrl: renesas: rzg2l: Add support for custom parameters
In preparation for passing custom params for RZ/V2H(P) SoC assign the custom params that are being passed via struct rzg2l_pinctrl_data. Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com> Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be> Link: https://lore.kernel.org/r/20240530173857.164073-14-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
This commit is contained in:
parent
6f38a02ad8
commit
d930e8f783
|
|
@ -257,6 +257,11 @@ struct rzg2l_pinctrl_data {
|
|||
const struct rzg2l_hwcfg *hwcfg;
|
||||
const u64 *variable_pin_cfg;
|
||||
unsigned int n_variable_pin_cfg;
|
||||
unsigned int num_custom_params;
|
||||
const struct pinconf_generic_params *custom_params;
|
||||
#ifdef CONFIG_DEBUG_FS
|
||||
const struct pin_config_item *custom_conf_items;
|
||||
#endif
|
||||
void (*pwpr_pfc_lock_unlock)(struct rzg2l_pinctrl *pctrl, bool lock);
|
||||
void (*pmc_writeb)(struct rzg2l_pinctrl *pctrl, u8 val, u16 offset);
|
||||
u32 (*oen_read)(struct rzg2l_pinctrl *pctrl, u32 caps, u32 offset, u8 pin);
|
||||
|
|
@ -2290,6 +2295,13 @@ static int rzg2l_pinctrl_register(struct rzg2l_pinctrl *pctrl)
|
|||
pctrl->desc.pmxops = &rzg2l_pinctrl_pmxops;
|
||||
pctrl->desc.confops = &rzg2l_pinctrl_confops;
|
||||
pctrl->desc.owner = THIS_MODULE;
|
||||
if (pctrl->data->num_custom_params) {
|
||||
pctrl->desc.num_custom_params = pctrl->data->num_custom_params;
|
||||
pctrl->desc.custom_params = pctrl->data->custom_params;
|
||||
#ifdef CONFIG_DEBUG_FS
|
||||
pctrl->desc.custom_conf_items = pctrl->data->custom_conf_items;
|
||||
#endif
|
||||
}
|
||||
|
||||
pins = devm_kcalloc(pctrl->dev, pctrl->desc.npins, sizeof(*pins), GFP_KERNEL);
|
||||
if (!pins)
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user