Skip to content

Commit

Permalink
pinctrl: mvebu: remove the offset property for regmap
Browse files Browse the repository at this point in the history
The offset property of the pinctrl node, when a regmap is used in the
device tree, was never used nor documented in the binding. Moreover, the
compatible string is enough to let the driver know which offset using.

So this patch removes the property and move the information at the driver
level.

Reviewed-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Gregory CLEMENT <gregory.clement@free-electrons.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
  • Loading branch information
Gregory CLEMENT authored and Linus Walleij committed Jun 16, 2017
1 parent 5a6ae9b commit ef08818
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
6 changes: 1 addition & 5 deletions drivers/pinctrl/mvebu/pinctrl-mvebu.c
Original file line number Diff line number Diff line change
Expand Up @@ -810,21 +810,17 @@ int mvebu_regmap_mpp_ctrl_set(struct mvebu_mpp_ctrl_data *data,
}

int mvebu_pinctrl_simple_regmap_probe(struct platform_device *pdev,
struct device *syscon_dev)
struct device *syscon_dev, u32 offset)
{
struct mvebu_pinctrl_soc_info *soc = dev_get_platdata(&pdev->dev);
struct mvebu_mpp_ctrl_data *mpp_data;
struct regmap *regmap;
u32 offset;
int i;

regmap = syscon_node_to_regmap(syscon_dev->of_node);
if (IS_ERR(regmap))
return PTR_ERR(regmap);

if (of_property_read_u32(pdev->dev.of_node, "offset", &offset))
return -EINVAL;

mpp_data = devm_kcalloc(&pdev->dev, soc->ncontrols, sizeof(*mpp_data),
GFP_KERNEL);
if (!mpp_data)
Expand Down
2 changes: 1 addition & 1 deletion drivers/pinctrl/mvebu/pinctrl-mvebu.h
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,6 @@ int mvebu_regmap_mpp_ctrl_set(struct mvebu_mpp_ctrl_data *data, unsigned pid,
int mvebu_pinctrl_probe(struct platform_device *pdev);
int mvebu_pinctrl_simple_mmio_probe(struct platform_device *pdev);
int mvebu_pinctrl_simple_regmap_probe(struct platform_device *pdev,
struct device *syscon_dev);
struct device *syscon_dev, u32 offset);

#endif

0 comments on commit ef08818

Please sign in to comment.