/* * All single-pin functions can be mapped to any GPIO, however pinmux applies * functions to pin groups and only those groups declared as supporting that * function. To make this work we must put each pin in its own dummy group so * that the functions can be described as applying to all pins. * We use the same name as in the datasheet.
*/ staticconstchar * const mlxbf3_pinctrl_single_group_names[] = { "gpio0", "gpio1", "gpio2", "gpio3", "gpio4", "gpio5", "gpio6", "gpio7", "gpio8", "gpio9", "gpio10", "gpio11", "gpio12", "gpio13", "gpio14", "gpio15", "gpio16", "gpio17", "gpio18", "gpio19", "gpio20", "gpio21", "gpio22", "gpio23", "gpio24", "gpio25", "gpio26", "gpio27", "gpio28", "gpio29", "gpio30", "gpio31", "gpio32", "gpio33", "gpio34", "gpio35", "gpio36", "gpio37", "gpio38", "gpio39", "gpio40", "gpio41", "gpio42", "gpio43", "gpio44", "gpio45", "gpio46", "gpio47", "gpio48", "gpio49", "gpio50", "gpio51", "gpio52", "gpio53", "gpio54", "gpio55",
};
staticint mlxbf3_get_groups_count(struct pinctrl_dev *pctldev)
{ /* Number single-pin groups */ return MLXBF3_MAX_GPIO_PINS;
}
priv = devm_kzalloc(dev, sizeof(*priv), GFP_KERNEL); if (!priv) return -ENOMEM;
priv->dev = &pdev->dev;
priv->fw_ctrl_set0 = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(priv->fw_ctrl_set0)) return PTR_ERR(priv->fw_ctrl_set0);
priv->fw_ctrl_clr0 = devm_platform_ioremap_resource(pdev, 1); if (IS_ERR(priv->fw_ctrl_clr0)) return PTR_ERR(priv->fw_ctrl_clr0);
priv->fw_ctrl_set1 = devm_platform_ioremap_resource(pdev, 2); if (IS_ERR(priv->fw_ctrl_set1)) return PTR_ERR(priv->fw_ctrl_set1);
priv->fw_ctrl_clr1 = devm_platform_ioremap_resource(pdev, 3); if (IS_ERR(priv->fw_ctrl_clr1)) return PTR_ERR(priv->fw_ctrl_clr1);
ret = devm_pinctrl_register_and_init(dev,
&mlxbf3_pin_desc,
priv,
&priv->pctl); if (ret) return dev_err_probe(dev, ret, "Failed to register pinctrl\n");
ret = pinctrl_enable(priv->pctl); if (ret) return dev_err_probe(dev, ret, "Failed to enable pinctrl\n");
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.