Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1663937

[PATCH v3 2/9] pinctrl: mvebu: remove the offset property for regmap

From Gregory CLEMENT <gregory.clement@free-electrons.com>
Newsgroups linux.kernel
Subject [PATCH v3 2/9] pinctrl: mvebu: remove the offset property for regmap
Date 2017-06-12 18:50 +0200
Message-ID <tRAHn-4zK-5@gated-at.bofh.it> (permalink)
References <tRzBH-3Tq-107@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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>
---
 drivers/pinctrl/mvebu/pinctrl-mvebu.c | 6 +-----
 drivers/pinctrl/mvebu/pinctrl-mvebu.h | 2 +-
 2 files changed, 2 insertions(+), 6 deletions(-)

diff --git a/drivers/pinctrl/mvebu/pinctrl-mvebu.c b/drivers/pinctrl/mvebu/pinctrl-mvebu.c
index e4dda12d371a..163d4614b0f8 100644
--- a/drivers/pinctrl/mvebu/pinctrl-mvebu.c
+++ b/drivers/pinctrl/mvebu/pinctrl-mvebu.c
@@ -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)
diff --git a/drivers/pinctrl/mvebu/pinctrl-mvebu.h b/drivers/pinctrl/mvebu/pinctrl-mvebu.h
index c90704e74884..75bba436bf59 100644
--- a/drivers/pinctrl/mvebu/pinctrl-mvebu.h
+++ b/drivers/pinctrl/mvebu/pinctrl-mvebu.h
@@ -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
-- 
git-series 0.9.1

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH v3 0/9] Add support for the pin and gpio controllers on the Marvell Armada 7K/8K Gregory CLEMENT <gregory.clement@free-electrons.com> - 2017-06-12 17:40 +0200
  [PATCH v3 2/9] pinctrl: mvebu: remove the offset property for regmap Gregory CLEMENT <gregory.clement@free-electrons.com> - 2017-06-12 18:50 +0200
    Re: [PATCH v3 2/9] pinctrl: mvebu: remove the offset property for regmap Linus Walleij <linus.walleij@linaro.org> - 2017-06-16 11:30 +0200
  [PATCH v3 9/9] arm64: dts: marvell: add gpio support for Armada 7K/8K Gregory CLEMENT <gregory.clement@free-electrons.com> - 2017-06-12 18:50 +0200
  [PATCH v3 8/9] gpio: mvebu: Add support for the Armada 7K/8K SoCs Gregory CLEMENT <gregory.clement@free-electrons.com> - 2017-06-12 18:50 +0200
  [PATCH v3 1/9] gpio: mvebu: fix regmap_update_bits usage Gregory CLEMENT <gregory.clement@free-electrons.com> - 2017-06-12 18:50 +0200
    Re: [PATCH v3 1/9] gpio: mvebu: fix regmap_update_bits usage Linus Walleij <linus.walleij@linaro.org> - 2017-06-16 11:20 +0200
  [PATCH v3 5/9] pinctrl: mvebu: add driver for Armada AP806 pinctrl Gregory CLEMENT <gregory.clement@free-electrons.com> - 2017-06-12 18:50 +0200
    Re: [PATCH v3 5/9] pinctrl: mvebu: add driver for Armada AP806 pinctrl Linus Walleij <linus.walleij@linaro.org> - 2017-06-16 11:30 +0200
  [PATCH v3 3/9] pinctrl: avoid PLAT_ORION dependency Gregory CLEMENT <gregory.clement@free-electrons.com> - 2017-06-12 18:50 +0200
    Re: [PATCH v3 3/9] pinctrl: avoid PLAT_ORION dependency Linus Walleij <linus.walleij@linaro.org> - 2017-06-16 11:30 +0200
  [PATCH v3 7/9] arm64: dts: marvell: add pinctrl support for Armada 7K/8K Gregory CLEMENT <gregory.clement@free-electrons.com> - 2017-06-12 18:50 +0200
  [PATCH v3 4/9] arm64: marvell: enable the Armada 7K/8K pinctrl driver Gregory CLEMENT <gregory.clement@free-electrons.com> - 2017-06-12 18:50 +0200
    Re: [PATCH v3 4/9] arm64: marvell: enable the Armada 7K/8K pinctrl driver Linus Walleij <linus.walleij@linaro.org> - 2017-06-16 11:30 +0200
  [PATCH v3 6/9] pinctrl: mvebu: add driver for Armada CP110 pinctrl Gregory CLEMENT <gregory.clement@free-electrons.com> - 2017-06-12 18:50 +0200
    Re: [PATCH v3 6/9] pinctrl: mvebu: add driver for Armada CP110 pinctrl Linus Walleij <linus.walleij@linaro.org> - 2017-06-16 11:30 +0200
    Re: [PATCH v3 6/9] pinctrl: mvebu: add driver for Armada CP110 pinctrl Linus Walleij <linus.walleij@linaro.org> - 2017-06-16 11:30 +0200

csiph-web