Commit e566fc11 authored by Gary Bisson's avatar Gary Bisson Committed by Linus Walleij

pinctrl: imx: use generic pinctrl helpers for managing groups

Now using group_desc structure instead of imx_pin_group.

Also leveraging generic functions to retrieve groups count/name/pins.

The imx_free_pingroups function can be removed since it is now handled by
the core driver during unregister.

Finally the device tree parsing is moved after the pinctrl driver registration
since this latter initializes the radix trees.
Signed-off-by: 's avatarGary Bisson <gary.bisson@boundarydevices.com>
Signed-off-by: 's avatarLinus Walleij <linus.walleij@linaro.org>
parent 824e4d95
config PINCTRL_IMX
bool
select GENERIC_PINCTRL_GROUPS
select PINMUX
select PINCONF
select REGMAP
......
This diff is collapsed.
......@@ -18,7 +18,7 @@
struct platform_device;
/**
* struct imx_pin_group - describes a single i.MX pin
* struct imx_pin - describes a single i.MX pin
* @pin: the pin_id of this pin
* @mux_mode: the mux mode for this pin.
* @input_reg: the select input register offset for this pin if any
......@@ -34,21 +34,6 @@ struct imx_pin {
unsigned long config;
};
/**
* struct imx_pin_group - describes an IMX pin group
* @name: the name of this specific pin group
* @npins: the number of pins in this group array, i.e. the number of
* elements in .pins so we can iterate over that array
* @pin_ids: array of pin_ids. pinctrl forces us to maintain such an array
* @pins: array of pins
*/
struct imx_pin_group {
const char *name;
unsigned npins;
unsigned int *pin_ids;
struct imx_pin *pins;
};
/**
* struct imx_pmx_func - describes IMX pinmux functions
* @name: the name of this specific function
......@@ -76,13 +61,11 @@ struct imx_pinctrl_soc_info {
const struct pinctrl_pin_desc *pins;
unsigned int npins;
struct imx_pin_reg *pin_regs;
unsigned int ngroups;
unsigned int group_index;
unsigned int nfunctions;
unsigned int flags;
const char *gpr_compatible;
struct radix_tree_root ftree;
struct radix_tree_root pgtree;
struct mutex mutex;
};
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment