Lines Matching +full:first +full:- +full:generation
1 // SPDX-License-Identifier: GPL-2.0-only
3 * First generation of pinmux driver for Amlogic Meson SoCs
9 /* For this first generation of pinctrl driver every pinmux group can be
10 * enabled by a specific bit in the first register range. When all groups for
18 #include "pinctrl-meson.h"
19 #include "pinctrl-meson8-pmx.h"
22 * meson8_pmx_disable_other_groups() - disable other groups using a given pin
26 * @sel_group: index of the selected group, or -1 if none
29 * selected one. If @sel_group is -1 all groups are disabled, leaving
39 for (i = 0; i < pc->data->num_groups; i++) { in meson8_pmx_disable_other_groups()
40 group = &pc->data->groups[i]; in meson8_pmx_disable_other_groups()
41 pmx_data = (struct meson8_pmx_data *)group->data; in meson8_pmx_disable_other_groups()
42 if (pmx_data->is_gpio || i == sel_group) in meson8_pmx_disable_other_groups()
45 for (j = 0; j < group->num_pins; j++) { in meson8_pmx_disable_other_groups()
46 if (group->pins[j] == pin) { in meson8_pmx_disable_other_groups()
48 regmap_update_bits(pc->reg_mux, in meson8_pmx_disable_other_groups()
49 pmx_data->reg * 4, in meson8_pmx_disable_other_groups()
50 BIT(pmx_data->bit), 0); in meson8_pmx_disable_other_groups()
60 struct meson_pmx_func *func = &pc->data->funcs[func_num]; in meson8_pmx_set_mux()
61 struct meson_pmx_group *group = &pc->data->groups[group_num]; in meson8_pmx_set_mux()
63 (struct meson8_pmx_data *)group->data; in meson8_pmx_set_mux()
66 dev_dbg(pc->dev, "enable function %s, group %s\n", func->name, in meson8_pmx_set_mux()
67 group->name); in meson8_pmx_set_mux()
73 for (i = 0; i < group->num_pins; i++) in meson8_pmx_set_mux()
74 meson8_pmx_disable_other_groups(pc, group->pins[i], group_num); in meson8_pmx_set_mux()
78 ret = regmap_update_bits(pc->reg_mux, pmx_data->reg * 4, in meson8_pmx_set_mux()
79 BIT(pmx_data->bit), in meson8_pmx_set_mux()
80 BIT(pmx_data->bit)); in meson8_pmx_set_mux()
91 meson8_pmx_disable_other_groups(pc, offset, -1); in meson8_pmx_request_gpio()