diff options
author | Beniamino Galvani <b.galvani@gmail.com> | 2016-08-13 19:41:18 +0200 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2016-08-22 11:21:57 +0200 |
commit | db80f0e158e62164308a857bce442dfeddb5c29e (patch) | |
tree | 4d2eee98f8d25aa8ca1e405a313b1cf30f76974c /drivers/pinctrl/meson/pinctrl-meson.h | |
parent | 1e23437563dd3ad57e30c5d6c29995a982fd649b (diff) | |
download | lwn-db80f0e158e62164308a857bce442dfeddb5c29e.tar.gz lwn-db80f0e158e62164308a857bce442dfeddb5c29e.zip |
pinctrl: meson: get rid of unneeded domain structures
The driver originally supported more domains (register ranges) per
pinctrl device, but since commit 9dab1868ec0d ("pinctrl: amlogic: Make
driver independent from two-domain configuration") each device gets
assigned a single domain and we instantiate multiple pinctrl devices
in the DT.
Therefore, now the 'meson_domain' and 'meson_domain_data' structures
don't have any reason to exist and can be removed to make the model
simpler to understand. This commit doesn't change behavior.
Tested on a Odroid-C2.
Signed-off-by: Beniamino Galvani <b.galvani@gmail.com>
Acked-by: Kevin Hilman <khilman@baylibre.com>
Tested-by: Kevin Hilman <khilman@baylibre.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/pinctrl/meson/pinctrl-meson.h')
-rw-r--r-- | drivers/pinctrl/meson/pinctrl-meson.h | 52 |
1 files changed, 10 insertions, 42 deletions
diff --git a/drivers/pinctrl/meson/pinctrl-meson.h b/drivers/pinctrl/meson/pinctrl-meson.h index d89442ea4a4d..98b5080650c1 100644 --- a/drivers/pinctrl/meson/pinctrl-meson.h +++ b/drivers/pinctrl/meson/pinctrl-meson.h @@ -95,54 +95,17 @@ struct meson_bank { struct meson_reg_desc regs[NUM_REG]; }; -/** - * struct meson_domain_data - domain platform data - * - * @name: name of the domain - * @banks: set of banks belonging to the domain - * @num_banks: number of banks in the domain - */ -struct meson_domain_data { - const char *name; - struct meson_bank *banks; - unsigned int num_banks; - unsigned int pin_base; - unsigned int num_pins; -}; - -/** - * struct meson_domain - * - * @reg_mux: registers for mux settings - * @reg_pullen: registers for pull-enable settings - * @reg_pull: registers for pull settings - * @reg_gpio: registers for gpio settings - * @chip: gpio chip associated with the domain - * @data; platform data for the domain - * @node: device tree node for the domain - * - * A domain represents a set of banks controlled by the same set of - * registers. - */ -struct meson_domain { - struct regmap *reg_mux; - struct regmap *reg_pullen; - struct regmap *reg_pull; - struct regmap *reg_gpio; - - struct gpio_chip chip; - struct meson_domain_data *data; - struct device_node *of_node; -}; - struct meson_pinctrl_data { + const char *name; const struct pinctrl_pin_desc *pins; struct meson_pmx_group *groups; struct meson_pmx_func *funcs; - struct meson_domain_data *domain_data; + unsigned int pin_base; unsigned int num_pins; unsigned int num_groups; unsigned int num_funcs; + struct meson_bank *banks; + unsigned int num_banks; }; struct meson_pinctrl { @@ -150,7 +113,12 @@ struct meson_pinctrl { struct pinctrl_dev *pcdev; struct pinctrl_desc desc; struct meson_pinctrl_data *data; - struct meson_domain *domain; + struct regmap *reg_mux; + struct regmap *reg_pullen; + struct regmap *reg_pull; + struct regmap *reg_gpio; + struct gpio_chip chip; + struct device_node *of_node; }; #define PIN(x, b) (b + x) |