pinctrl-meson.h (95a0c7c2d6cfde3fb5fdb713428ed0df4d6bdd58) | pinctrl-meson.h (634e40b0c2bde81051e309cdfe4c26bbca3164ec) |
---|---|
1/* 2 * Pin controller and GPIO driver for Amlogic Meson SoCs 3 * 4 * Copyright (C) 2014 Beniamino Galvani <b.galvani@gmail.com> 5 * 6 * This program is free software; you can redistribute it and/or 7 * modify it under the terms of the GNU General Public License 8 * version 2 as published by the Free Software Foundation. --- 110 unchanged lines hidden (view full) --- 119 struct regmap *reg_mux; 120 struct regmap *reg_pullen; 121 struct regmap *reg_pull; 122 struct regmap *reg_gpio; 123 struct gpio_chip chip; 124 struct device_node *of_node; 125}; 126 | 1/* 2 * Pin controller and GPIO driver for Amlogic Meson SoCs 3 * 4 * Copyright (C) 2014 Beniamino Galvani <b.galvani@gmail.com> 5 * 6 * This program is free software; you can redistribute it and/or 7 * modify it under the terms of the GNU General Public License 8 * version 2 as published by the Free Software Foundation. --- 110 unchanged lines hidden (view full) --- 119 struct regmap *reg_mux; 120 struct regmap *reg_pullen; 121 struct regmap *reg_pull; 122 struct regmap *reg_gpio; 123 struct gpio_chip chip; 124 struct device_node *of_node; 125}; 126 |
127#define PIN(x, b) (b + x) 128 | |
129#define GROUP(grp, r, b) \ 130 { \ 131 .name = #grp, \ 132 .pins = grp ## _pins, \ 133 .num_pins = ARRAY_SIZE(grp ## _pins), \ 134 .reg = r, \ 135 .bit = b, \ 136 } 137 | 127#define GROUP(grp, r, b) \ 128 { \ 129 .name = #grp, \ 130 .pins = grp ## _pins, \ 131 .num_pins = ARRAY_SIZE(grp ## _pins), \ 132 .reg = r, \ 133 .bit = b, \ 134 } 135 |
138#define GPIO_GROUP(gpio, b) \ | 136#define GPIO_GROUP(gpio) \ |
139 { \ 140 .name = #gpio, \ | 137 { \ 138 .name = #gpio, \ |
141 .pins = (const unsigned int[]){ PIN(gpio, b) }, \ | 139 .pins = (const unsigned int[]){ gpio }, \ |
142 .num_pins = 1, \ 143 .is_gpio = true, \ 144 } 145 146#define FUNCTION(fn) \ 147 { \ 148 .name = #fn, \ 149 .groups = fn ## _groups, \ --- 11 unchanged lines hidden (view full) --- 161 [REG_PULLEN] = { per, peb }, \ 162 [REG_PULL] = { pr, pb }, \ 163 [REG_DIR] = { dr, db }, \ 164 [REG_OUT] = { or, ob }, \ 165 [REG_IN] = { ir, ib }, \ 166 }, \ 167 } 168 | 140 .num_pins = 1, \ 141 .is_gpio = true, \ 142 } 143 144#define FUNCTION(fn) \ 145 { \ 146 .name = #fn, \ 147 .groups = fn ## _groups, \ --- 11 unchanged lines hidden (view full) --- 159 [REG_PULLEN] = { per, peb }, \ 160 [REG_PULL] = { pr, pb }, \ 161 [REG_DIR] = { dr, db }, \ 162 [REG_OUT] = { or, ob }, \ 163 [REG_IN] = { ir, ib }, \ 164 }, \ 165 } 166 |
169#define MESON_PIN(x, b) PINCTRL_PIN(PIN(x, b), #x) | 167#define MESON_PIN(x) PINCTRL_PIN(x, #x) |
170 171extern struct meson_pinctrl_data meson8_cbus_pinctrl_data; 172extern struct meson_pinctrl_data meson8_aobus_pinctrl_data; 173extern struct meson_pinctrl_data meson8b_cbus_pinctrl_data; 174extern struct meson_pinctrl_data meson8b_aobus_pinctrl_data; 175extern struct meson_pinctrl_data meson_gxbb_periphs_pinctrl_data; 176extern struct meson_pinctrl_data meson_gxbb_aobus_pinctrl_data; 177extern struct meson_pinctrl_data meson_gxl_periphs_pinctrl_data; 178extern struct meson_pinctrl_data meson_gxl_aobus_pinctrl_data; | 168 169extern struct meson_pinctrl_data meson8_cbus_pinctrl_data; 170extern struct meson_pinctrl_data meson8_aobus_pinctrl_data; 171extern struct meson_pinctrl_data meson8b_cbus_pinctrl_data; 172extern struct meson_pinctrl_data meson8b_aobus_pinctrl_data; 173extern struct meson_pinctrl_data meson_gxbb_periphs_pinctrl_data; 174extern struct meson_pinctrl_data meson_gxbb_aobus_pinctrl_data; 175extern struct meson_pinctrl_data meson_gxl_periphs_pinctrl_data; 176extern struct meson_pinctrl_data meson_gxl_aobus_pinctrl_data; |