linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3 0/2] nvmem: remove regmap dependency
@ 2016-05-02 18:36 Srinivas Kandagatla
  2016-05-02 18:36 ` [PATCH v3 1/2] nvmem: mtk-efuse: remove nvmem " Srinivas Kandagatla
                   ` (3 more replies)
  0 siblings, 4 replies; 10+ messages in thread
From: Srinivas Kandagatla @ 2016-05-02 18:36 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: linux-mediatek, Srinivas Kandagatla, Maxime Ripard, linux-kernel,
	linux-arm-kernel, stefan.wahren

Hi Greg, 

This is v3 patchset for the leftover 2 patches for nvmem regmap
removal series [1]. These patches are based on char-misc tree.

nvmem uses regmap_raw_read/write apis to read/write data from providers,
With recent patch 922a9f936e40 ("regmap: mmio: Convert to regmap_bus
and fix accessor usage") nvmem providers based on regmap-mmio stopped
working, as nvmem core was using raw accessors.
This issue can be fixed temporarly by moving to other regmap apis,
but we might hit same issue in future, and regmap looks like an
overdo for nvmem. Moving to interfaces based on read/write callbacks
from providers would be more robust.

This patchset converts the nvmem core and nvmem provider drivers to
use the new callbacks. Tested this patchset on qfprom and at24 drivers.
Other driver are only compile tested, any testing on them would be great.

Most of the patches have been applied to char-misc tree, these are the
two patches which had some outstanding comments on mxs nvmemprovider,
which are now fixed.

Changes since v2:
 - Fixed the mxs size and dt data pointer spotted by Stefan and Fabio

Changes since v1:
 - rebased mtk-efuse on top of char-misc
 - addressed concerns raised by Stefan Wahren.

[1] https://www.mail-archive.com/linux-kernel@vger.kernel.org/msg1130026.html

Thanks,
srini

Srinivas Kandagatla (2):
  nvmem: mtk-efuse: remove nvmem regmap dependency
  nvmem: mxs-ocotp: remove nvmem regmap dependency

 drivers/nvmem/Kconfig     |  1 -
 drivers/nvmem/mtk-efuse.c | 47 ++++++++++++++++++---------
 drivers/nvmem/mxs-ocotp.c | 83 +++++++++++++----------------------------------
 3 files changed, 54 insertions(+), 77 deletions(-)

-- 
2.5.0

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [PATCH v3 1/2] nvmem: mtk-efuse: remove nvmem regmap dependency
  2016-05-02 18:36 [PATCH v3 0/2] nvmem: remove regmap dependency Srinivas Kandagatla
@ 2016-05-02 18:36 ` Srinivas Kandagatla
  2016-05-02 18:36 ` [PATCH v3 2/2] nvmem: mxs-ocotp: " Srinivas Kandagatla
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 10+ messages in thread
From: Srinivas Kandagatla @ 2016-05-02 18:36 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: linux-mediatek, Srinivas Kandagatla, Maxime Ripard, linux-kernel,
	linux-arm-kernel, stefan.wahren

Regmap raw accessors are bus specific implementations, using regmap raw
apis in nvmem breaks nvmem providers based on regmap mmio.
This patch moves to nvmem support in the driver to use callback
instead of regmap, which is what the nvmem core supports now.

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
---
 drivers/nvmem/Kconfig     |  1 -
 drivers/nvmem/mtk-efuse.c | 47 ++++++++++++++++++++++++++++++++---------------
 2 files changed, 32 insertions(+), 16 deletions(-)

diff --git a/drivers/nvmem/Kconfig b/drivers/nvmem/Kconfig
index 3041d48..5ff2189 100644
--- a/drivers/nvmem/Kconfig
+++ b/drivers/nvmem/Kconfig
@@ -50,7 +50,6 @@ config MTK_EFUSE
 	tristate "Mediatek SoCs EFUSE support"
 	depends on ARCH_MEDIATEK || COMPILE_TEST
 	depends on HAS_IOMEM
-	select REGMAP_MMIO
 	help
 	  This is a driver to access hardware related data like sensor
 	  calibration, HDMI impedance etc.
diff --git a/drivers/nvmem/mtk-efuse.c b/drivers/nvmem/mtk-efuse.c
index 9c49369..32fd572 100644
--- a/drivers/nvmem/mtk-efuse.c
+++ b/drivers/nvmem/mtk-efuse.c
@@ -14,15 +14,35 @@
 
 #include <linux/device.h>
 #include <linux/module.h>
+#include <linux/io.h>
 #include <linux/nvmem-provider.h>
 #include <linux/platform_device.h>
-#include <linux/regmap.h>
 
-static struct regmap_config mtk_regmap_config = {
-	.reg_bits = 32,
-	.val_bits = 32,
-	.reg_stride = 4,
-};
+static int mtk_reg_read(void *context,
+			unsigned int reg, void *_val, size_t bytes)
+{
+	void __iomem *base = context;
+	u32 *val = _val;
+	int i = 0, words = bytes / 4;
+
+	while (words--)
+		*val++ = readl(base + reg + (i++ * 4));
+
+	return 0;
+}
+
+static int mtk_reg_write(void *context,
+			 unsigned int reg, void *_val, size_t bytes)
+{
+	void __iomem *base = context;
+	u32 *val = _val;
+	int i = 0, words = bytes / 4;
+
+	while (words--)
+		writel(*val++, base + reg + (i++ * 4));
+
+	return 0;
+}
 
 static int mtk_efuse_probe(struct platform_device *pdev)
 {
@@ -30,7 +50,6 @@ static int mtk_efuse_probe(struct platform_device *pdev)
 	struct resource *res;
 	struct nvmem_device *nvmem;
 	struct nvmem_config *econfig;
-	struct regmap *regmap;
 	void __iomem *base;
 
 	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
@@ -42,14 +61,12 @@ static int mtk_efuse_probe(struct platform_device *pdev)
 	if (!econfig)
 		return -ENOMEM;
 
-	mtk_regmap_config.max_register = resource_size(res) - 1;
-
-	regmap = devm_regmap_init_mmio(dev, base, &mtk_regmap_config);
-	if (IS_ERR(regmap)) {
-		dev_err(dev, "regmap init failed\n");
-		return PTR_ERR(regmap);
-	}
-
+	econfig->stride = 4;
+	econfig->word_size = 4;
+	econfig->reg_read = mtk_reg_read;
+	econfig->reg_write = mtk_reg_write;
+	econfig->size = resource_size(res);
+	econfig->priv = base;
 	econfig->dev = dev;
 	econfig->owner = THIS_MODULE;
 	nvmem = nvmem_register(econfig);
-- 
2.5.0

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH v3 2/2] nvmem: mxs-ocotp: remove nvmem regmap dependency
  2016-05-02 18:36 [PATCH v3 0/2] nvmem: remove regmap dependency Srinivas Kandagatla
  2016-05-02 18:36 ` [PATCH v3 1/2] nvmem: mtk-efuse: remove nvmem " Srinivas Kandagatla
@ 2016-05-02 18:36 ` Srinivas Kandagatla
  2016-05-04 11:03   ` Stefan Wahren
  2016-05-18 14:30 ` [PATCH v3 0/2] nvmem: remove " Stefan Wahren
  2016-06-01  8:27 ` Stefan Wahren
  3 siblings, 1 reply; 10+ messages in thread
From: Srinivas Kandagatla @ 2016-05-02 18:36 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: linux-mediatek, Srinivas Kandagatla, Maxime Ripard, linux-kernel,
	linux-arm-kernel, stefan.wahren

Regmap raw accessors are bus specific implementations, using regmap raw
apis in nvmem breaks nvmem providers based on regmap mmio.
This patch moves to nvmem support in the driver to use callback
instead of regmap, which is what the nvmem core supports now.

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
---
 drivers/nvmem/mxs-ocotp.c | 83 +++++++++++++----------------------------------
 1 file changed, 22 insertions(+), 61 deletions(-)

diff --git a/drivers/nvmem/mxs-ocotp.c b/drivers/nvmem/mxs-ocotp.c
index 2bb3c57..d26dd03 100644
--- a/drivers/nvmem/mxs-ocotp.c
+++ b/drivers/nvmem/mxs-ocotp.c
@@ -25,7 +25,6 @@
 #include <linux/nvmem-provider.h>
 #include <linux/of_device.h>
 #include <linux/platform_device.h>
-#include <linux/regmap.h>
 #include <linux/slab.h>
 #include <linux/stmp_device.h>
 
@@ -66,11 +65,10 @@ static int mxs_ocotp_wait(struct mxs_ocotp *otp)
 	return 0;
 }
 
-static int mxs_ocotp_read(void *context, const void *reg, size_t reg_size,
-			  void *val, size_t val_size)
+static int mxs_ocotp_read(void *context, unsigned int offset,
+			  void *val, size_t bytes)
 {
 	struct mxs_ocotp *otp = context;
-	unsigned int offset = *(u32 *)reg;
 	u32 *buf = val;
 	int ret;
 
@@ -94,17 +92,16 @@ static int mxs_ocotp_read(void *context, const void *reg, size_t reg_size,
 	if (ret)
 		goto close_banks;
 
-	while (val_size >= reg_size) {
+	while (bytes) {
 		if ((offset < OCOTP_DATA_OFFSET) || (offset % 16)) {
 			/* fill up non-data register */
-			*buf = 0;
+			*buf++ = 0;
 		} else {
-			*buf = readl(otp->base + offset);
+			*buf++ = readl(otp->base + offset);
 		}
 
-		buf++;
-		val_size -= reg_size;
-		offset += reg_size;
+		bytes -= 4;
+		offset += 4;
 	}
 
 close_banks:
@@ -117,57 +114,29 @@ disable_clk:
 	return ret;
 }
 
-static int mxs_ocotp_write(void *context, const void *data, size_t count)
-{
-	/* We don't want to support writing */
-	return 0;
-}
-
-static bool mxs_ocotp_writeable_reg(struct device *dev, unsigned int reg)
-{
-	return false;
-}
-
 static struct nvmem_config ocotp_config = {
 	.name = "mxs-ocotp",
+	.stride = 16,
+	.word_size = 4,
 	.owner = THIS_MODULE,
+	.reg_read = mxs_ocotp_read,
 };
 
-static const struct regmap_range imx23_ranges[] = {
-	regmap_reg_range(OCOTP_DATA_OFFSET, 0x210),
-};
-
-static const struct regmap_access_table imx23_access = {
-	.yes_ranges = imx23_ranges,
-	.n_yes_ranges = ARRAY_SIZE(imx23_ranges),
-};
-
-static const struct regmap_range imx28_ranges[] = {
-	regmap_reg_range(OCOTP_DATA_OFFSET, 0x290),
-};
-
-static const struct regmap_access_table imx28_access = {
-	.yes_ranges = imx28_ranges,
-	.n_yes_ranges = ARRAY_SIZE(imx28_ranges),
+struct mxs_data {
+	int size;
 };
 
-static struct regmap_bus mxs_ocotp_bus = {
-	.read = mxs_ocotp_read,
-	.write = mxs_ocotp_write, /* make regmap_init() happy */
-	.reg_format_endian_default = REGMAP_ENDIAN_NATIVE,
-	.val_format_endian_default = REGMAP_ENDIAN_NATIVE,
+static const struct mxs_data imx23_data = {
+	.size = 0x220,
 };
 
-static struct regmap_config mxs_ocotp_config = {
-	.reg_bits = 32,
-	.val_bits = 32,
-	.reg_stride = 16,
-	.writeable_reg = mxs_ocotp_writeable_reg,
+static const struct mxs_data imx28_data = {
+	.size = 0x2a0,
 };
 
 static const struct of_device_id mxs_ocotp_match[] = {
-	{ .compatible = "fsl,imx23-ocotp", .data = &imx23_access },
-	{ .compatible = "fsl,imx28-ocotp", .data = &imx28_access },
+	{ .compatible = "fsl,imx23-ocotp", .data = &imx23_data },
+	{ .compatible = "fsl,imx28-ocotp", .data = &imx28_data },
 	{ /* sentinel */},
 };
 MODULE_DEVICE_TABLE(of, mxs_ocotp_match);
@@ -175,11 +144,10 @@ MODULE_DEVICE_TABLE(of, mxs_ocotp_match);
 static int mxs_ocotp_probe(struct platform_device *pdev)
 {
 	struct device *dev = &pdev->dev;
+	const struct mxs_data *data;
 	struct mxs_ocotp *otp;
 	struct resource *res;
 	const struct of_device_id *match;
-	struct regmap *regmap;
-	const struct regmap_access_table *access;
 	int ret;
 
 	match = of_match_device(dev->driver->of_match_table, dev);
@@ -205,17 +173,10 @@ static int mxs_ocotp_probe(struct platform_device *pdev)
 		return ret;
 	}
 
-	access = match->data;
-	mxs_ocotp_config.rd_table = access;
-	mxs_ocotp_config.max_register = access->yes_ranges[0].range_max;
-
-	regmap = devm_regmap_init(dev, &mxs_ocotp_bus, otp, &mxs_ocotp_config);
-	if (IS_ERR(regmap)) {
-		dev_err(dev, "regmap init failed\n");
-		ret = PTR_ERR(regmap);
-		goto err_clk;
-	}
+	data = match->data;
 
+	ocotp_config.size = data->size;
+	ocotp_config.priv = otp;
 	ocotp_config.dev = dev;
 	otp->nvmem = nvmem_register(&ocotp_config);
 	if (IS_ERR(otp->nvmem)) {
-- 
2.5.0

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* Re: [PATCH v3 2/2] nvmem: mxs-ocotp: remove nvmem regmap dependency
  2016-05-02 18:36 ` [PATCH v3 2/2] nvmem: mxs-ocotp: " Srinivas Kandagatla
@ 2016-05-04 11:03   ` Stefan Wahren
  0 siblings, 0 replies; 10+ messages in thread
From: Stefan Wahren @ 2016-05-04 11:03 UTC (permalink / raw)
  To: Srinivas Kandagatla, Greg Kroah-Hartman
  Cc: linux-mediatek, Maxime Ripard, linux-kernel, linux-arm-kernel

Am 02.05.2016 um 20:36 schrieb Srinivas Kandagatla:
> Regmap raw accessors are bus specific implementations, using regmap raw
> apis in nvmem breaks nvmem providers based on regmap mmio.
> This patch moves to nvmem support in the driver to use callback
> instead of regmap, which is what the nvmem core supports now.
>
> Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
> ---

Acked-by: Stefan Wahren <stefan.wahren@i2se.com>

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH v3 0/2] nvmem: remove regmap dependency
  2016-05-02 18:36 [PATCH v3 0/2] nvmem: remove regmap dependency Srinivas Kandagatla
  2016-05-02 18:36 ` [PATCH v3 1/2] nvmem: mtk-efuse: remove nvmem " Srinivas Kandagatla
  2016-05-02 18:36 ` [PATCH v3 2/2] nvmem: mxs-ocotp: " Srinivas Kandagatla
@ 2016-05-18 14:30 ` Stefan Wahren
  2016-05-18 14:36   ` Srinivas Kandagatla
  2016-06-01  8:27 ` Stefan Wahren
  3 siblings, 1 reply; 10+ messages in thread
From: Stefan Wahren @ 2016-05-18 14:30 UTC (permalink / raw)
  To: Srinivas Kandagatla
  Cc: Greg Kroah-Hartman, linux-mediatek, Maxime Ripard, linux-kernel,
	linux-arm-kernel

Hi Srinivas,

Am 02.05.2016 um 20:36 schrieb Srinivas Kandagatla:
> Hi Greg, 
>
> This is v3 patchset for the leftover 2 patches for nvmem regmap
> removal series [1]. These patches are based on char-misc tree.
>
> nvmem uses regmap_raw_read/write apis to read/write data from providers,
> With recent patch 922a9f936e40 ("regmap: mmio: Convert to regmap_bus
> and fix accessor usage") nvmem providers based on regmap-mmio stopped
> working, as nvmem core was using raw accessors.
> This issue can be fixed temporarly by moving to other regmap apis,
> but we might hit same issue in future, and regmap looks like an
> overdo for nvmem. Moving to interfaces based on read/write callbacks
> from providers would be more robust.

i noticed that Documentation/nvmem/nvmem.txt also needs a fix after
removing regmap dependency.

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH v3 0/2] nvmem: remove regmap dependency
  2016-05-18 14:30 ` [PATCH v3 0/2] nvmem: remove " Stefan Wahren
@ 2016-05-18 14:36   ` Srinivas Kandagatla
  0 siblings, 0 replies; 10+ messages in thread
From: Srinivas Kandagatla @ 2016-05-18 14:36 UTC (permalink / raw)
  To: Stefan Wahren
  Cc: Greg Kroah-Hartman, linux-mediatek, Maxime Ripard, linux-kernel,
	linux-arm-kernel



On 18/05/16 15:30, Stefan Wahren wrote:
> Hi Srinivas,
>
> Am 02.05.2016 um 20:36 schrieb Srinivas Kandagatla:
>> Hi Greg,
>>
>> This is v3 patchset for the leftover 2 patches for nvmem regmap
>> removal series [1]. These patches are based on char-misc tree.
>>
>> nvmem uses regmap_raw_read/write apis to read/write data from providers,
>> With recent patch 922a9f936e40 ("regmap: mmio: Convert to regmap_bus
>> and fix accessor usage") nvmem providers based on regmap-mmio stopped
>> working, as nvmem core was using raw accessors.
>> This issue can be fixed temporarly by moving to other regmap apis,
>> but we might hit same issue in future, and regmap looks like an
>> overdo for nvmem. Moving to interfaces based on read/write callbacks
>> from providers would be more robust.
>
> i noticed that Documentation/nvmem/nvmem.txt also needs a fix after
> removing regmap dependency.

Thanks Stefan for reporting this, I will send a patch to fix that too.

--srini
>
>

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH v3 0/2] nvmem: remove regmap dependency
  2016-05-02 18:36 [PATCH v3 0/2] nvmem: remove regmap dependency Srinivas Kandagatla
                   ` (2 preceding siblings ...)
  2016-05-18 14:30 ` [PATCH v3 0/2] nvmem: remove " Stefan Wahren
@ 2016-06-01  8:27 ` Stefan Wahren
  2016-06-01 17:55   ` Greg Kroah-Hartman
  3 siblings, 1 reply; 10+ messages in thread
From: Stefan Wahren @ 2016-06-01  8:27 UTC (permalink / raw)
  To: Srinivas Kandagatla, Greg Kroah-Hartman
  Cc: linux-mediatek, Maxime Ripard, linux-kernel, linux-arm-kernel

Hi Greg,

Am 02.05.2016 um 20:36 schrieb Srinivas Kandagatla:
> Hi Greg, 
>
> This is v3 patchset for the leftover 2 patches for nvmem regmap
> removal series [1]. These patches are based on char-misc tree.
>
> nvmem uses regmap_raw_read/write apis to read/write data from providers,
> With recent patch 922a9f936e40 ("regmap: mmio: Convert to regmap_bus
> and fix accessor usage") nvmem providers based on regmap-mmio stopped
> working, as nvmem core was using raw accessors.
> This issue can be fixed temporarly by moving to other regmap apis,
> but we might hit same issue in future, and regmap looks like an
> overdo for nvmem. Moving to interfaces based on read/write callbacks
> from providers would be more robust.
>
> This patchset converts the nvmem core and nvmem provider drivers to
> use the new callbacks. Tested this patchset on qfprom and at24 drivers.
> Other driver are only compile tested, any testing on them would be great.
>
> Most of the patches have been applied to char-misc tree, these are the
> two patches which had some outstanding comments on mxs nvmemprovider,
> which are now fixed.
>
> Changes since v2:
>  - Fixed the mxs size and dt data pointer spotted by Stefan and Fabio
>
> Changes since v1:
>  - rebased mtk-efuse on top of char-misc
>  - addressed concerns raised by Stefan Wahren.
>
> [1] https://www.mail-archive.com/linux-kernel@vger.kernel.org/msg1130026.html
>
> Thanks,
> srini
>
> Srinivas Kandagatla (2):
>   nvmem: mtk-efuse: remove nvmem regmap dependency
>   nvmem: mxs-ocotp: remove nvmem regmap dependency
>
>  drivers/nvmem/Kconfig     |  1 -
>  drivers/nvmem/mtk-efuse.c | 47 ++++++++++++++++++---------
>  drivers/nvmem/mxs-ocotp.c | 83 +++++++++++++----------------------------------
>  3 files changed, 54 insertions(+), 77 deletions(-)
>

any objections about this series or is it still in queue?

Stefan

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH v3 0/2] nvmem: remove regmap dependency
  2016-06-01  8:27 ` Stefan Wahren
@ 2016-06-01 17:55   ` Greg Kroah-Hartman
  2016-06-23 18:07     ` Stefan Wahren
  0 siblings, 1 reply; 10+ messages in thread
From: Greg Kroah-Hartman @ 2016-06-01 17:55 UTC (permalink / raw)
  To: Stefan Wahren
  Cc: Srinivas Kandagatla, linux-mediatek, Maxime Ripard, linux-kernel,
	linux-arm-kernel

On Wed, Jun 01, 2016 at 10:27:49AM +0200, Stefan Wahren wrote:
> Hi Greg,
> 
> Am 02.05.2016 um 20:36 schrieb Srinivas Kandagatla:
> > Hi Greg, 
> >
> > This is v3 patchset for the leftover 2 patches for nvmem regmap
> > removal series [1]. These patches are based on char-misc tree.
> >
> > nvmem uses regmap_raw_read/write apis to read/write data from providers,
> > With recent patch 922a9f936e40 ("regmap: mmio: Convert to regmap_bus
> > and fix accessor usage") nvmem providers based on regmap-mmio stopped
> > working, as nvmem core was using raw accessors.
> > This issue can be fixed temporarly by moving to other regmap apis,
> > but we might hit same issue in future, and regmap looks like an
> > overdo for nvmem. Moving to interfaces based on read/write callbacks
> > from providers would be more robust.
> >
> > This patchset converts the nvmem core and nvmem provider drivers to
> > use the new callbacks. Tested this patchset on qfprom and at24 drivers.
> > Other driver are only compile tested, any testing on them would be great.
> >
> > Most of the patches have been applied to char-misc tree, these are the
> > two patches which had some outstanding comments on mxs nvmemprovider,
> > which are now fixed.
> >
> > Changes since v2:
> >  - Fixed the mxs size and dt data pointer spotted by Stefan and Fabio
> >
> > Changes since v1:
> >  - rebased mtk-efuse on top of char-misc
> >  - addressed concerns raised by Stefan Wahren.
> >
> > [1] https://www.mail-archive.com/linux-kernel@vger.kernel.org/msg1130026.html
> >
> > Thanks,
> > srini
> >
> > Srinivas Kandagatla (2):
> >   nvmem: mtk-efuse: remove nvmem regmap dependency
> >   nvmem: mxs-ocotp: remove nvmem regmap dependency
> >
> >  drivers/nvmem/Kconfig     |  1 -
> >  drivers/nvmem/mtk-efuse.c | 47 ++++++++++++++++++---------
> >  drivers/nvmem/mxs-ocotp.c | 83 +++++++++++++----------------------------------
> >  3 files changed, 54 insertions(+), 77 deletions(-)
> >
> 
> any objections about this series or is it still in queue?

still in my queue...

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH v3 0/2] nvmem: remove regmap dependency
  2016-06-01 17:55   ` Greg Kroah-Hartman
@ 2016-06-23 18:07     ` Stefan Wahren
  2016-06-25 14:43       ` Greg Kroah-Hartman
  0 siblings, 1 reply; 10+ messages in thread
From: Stefan Wahren @ 2016-06-23 18:07 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: linux-mediatek, Srinivas Kandagatla, linux-kernel, Maxime Ripard,
	linux-arm-kernel

Hi Greg,

> Greg Kroah-Hartman <gregkh@linuxfoundation.org> hat am 1. Juni 2016 um 19:55
> geschrieben:
> 
> 
> On Wed, Jun 01, 2016 at 10:27:49AM +0200, Stefan Wahren wrote:
> > Hi Greg,
> > 
> > Am 02.05.2016 um 20:36 schrieb Srinivas Kandagatla:
> > > Hi Greg, 
> > >
> > > This is v3 patchset for the leftover 2 patches for nvmem regmap
> > > removal series [1]. These patches are based on char-misc tree.
> > >
> > > nvmem uses regmap_raw_read/write apis to read/write data from providers,
> > > With recent patch 922a9f936e40 ("regmap: mmio: Convert to regmap_bus
> > > and fix accessor usage") nvmem providers based on regmap-mmio stopped
> > > working, as nvmem core was using raw accessors.
> > > This issue can be fixed temporarly by moving to other regmap apis,
> > > but we might hit same issue in future, and regmap looks like an
> > > overdo for nvmem. Moving to interfaces based on read/write callbacks
> > > from providers would be more robust.
> > >
> > > This patchset converts the nvmem core and nvmem provider drivers to
> > > use the new callbacks. Tested this patchset on qfprom and at24 drivers.
> > > Other driver are only compile tested, any testing on them would be great.
> > >
> > > Most of the patches have been applied to char-misc tree, these are the
> > > two patches which had some outstanding comments on mxs nvmemprovider,
> > > which are now fixed.
> > >
> > > Changes since v2:
> > >  - Fixed the mxs size and dt data pointer spotted by Stefan and Fabio
> > >
> > > Changes since v1:
> > >  - rebased mtk-efuse on top of char-misc
> > >  - addressed concerns raised by Stefan Wahren.
> > >
> > > [1]
> > > https://www.mail-archive.com/linux-kernel@vger.kernel.org/msg1130026.html
> > >
> > > Thanks,
> > > srini
> > >
> > > Srinivas Kandagatla (2):
> > >   nvmem: mtk-efuse: remove nvmem regmap dependency
> > >   nvmem: mxs-ocotp: remove nvmem regmap dependency
> > >
> > >  drivers/nvmem/Kconfig     |  1 -
> > >  drivers/nvmem/mtk-efuse.c | 47 ++++++++++++++++++---------
> > >  drivers/nvmem/mxs-ocotp.c | 83
> > > +++++++++++++----------------------------------
> > >  3 files changed, 54 insertions(+), 77 deletions(-)
> > >
> > 
> > any objections about this series or is it still in queue?
> 
> still in my queue...
> 

gently ping ...

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH v3 0/2] nvmem: remove regmap dependency
  2016-06-23 18:07     ` Stefan Wahren
@ 2016-06-25 14:43       ` Greg Kroah-Hartman
  0 siblings, 0 replies; 10+ messages in thread
From: Greg Kroah-Hartman @ 2016-06-25 14:43 UTC (permalink / raw)
  To: Stefan Wahren
  Cc: linux-mediatek, Srinivas Kandagatla, linux-kernel, Maxime Ripard,
	linux-arm-kernel

On Thu, Jun 23, 2016 at 08:07:13PM +0200, Stefan Wahren wrote:
> Hi Greg,
> 
> > Greg Kroah-Hartman <gregkh@linuxfoundation.org> hat am 1. Juni 2016 um 19:55
> > geschrieben:
> > 
> > 
> > On Wed, Jun 01, 2016 at 10:27:49AM +0200, Stefan Wahren wrote:
> > > Hi Greg,
> > > 
> > > Am 02.05.2016 um 20:36 schrieb Srinivas Kandagatla:
> > > > Hi Greg, 
> > > >
> > > > This is v3 patchset for the leftover 2 patches for nvmem regmap
> > > > removal series [1]. These patches are based on char-misc tree.
> > > >
> > > > nvmem uses regmap_raw_read/write apis to read/write data from providers,
> > > > With recent patch 922a9f936e40 ("regmap: mmio: Convert to regmap_bus
> > > > and fix accessor usage") nvmem providers based on regmap-mmio stopped
> > > > working, as nvmem core was using raw accessors.
> > > > This issue can be fixed temporarly by moving to other regmap apis,
> > > > but we might hit same issue in future, and regmap looks like an
> > > > overdo for nvmem. Moving to interfaces based on read/write callbacks
> > > > from providers would be more robust.
> > > >
> > > > This patchset converts the nvmem core and nvmem provider drivers to
> > > > use the new callbacks. Tested this patchset on qfprom and at24 drivers.
> > > > Other driver are only compile tested, any testing on them would be great.
> > > >
> > > > Most of the patches have been applied to char-misc tree, these are the
> > > > two patches which had some outstanding comments on mxs nvmemprovider,
> > > > which are now fixed.
> > > >
> > > > Changes since v2:
> > > >  - Fixed the mxs size and dt data pointer spotted by Stefan and Fabio
> > > >
> > > > Changes since v1:
> > > >  - rebased mtk-efuse on top of char-misc
> > > >  - addressed concerns raised by Stefan Wahren.
> > > >
> > > > [1]
> > > > https://www.mail-archive.com/linux-kernel@vger.kernel.org/msg1130026.html
> > > >
> > > > Thanks,
> > > > srini
> > > >
> > > > Srinivas Kandagatla (2):
> > > >   nvmem: mtk-efuse: remove nvmem regmap dependency
> > > >   nvmem: mxs-ocotp: remove nvmem regmap dependency
> > > >
> > > >  drivers/nvmem/Kconfig     |  1 -
> > > >  drivers/nvmem/mtk-efuse.c | 47 ++++++++++++++++++---------
> > > >  drivers/nvmem/mxs-ocotp.c | 83
> > > > +++++++++++++----------------------------------
> > > >  3 files changed, 54 insertions(+), 77 deletions(-)
> > > >
> > > 
> > > any objections about this series or is it still in queue?
> > 
> > still in my queue...
> > 
> 
> gently ping ...

Sorry for the delay, now queued up.

greg k-h

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2016-06-25 14:43 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-05-02 18:36 [PATCH v3 0/2] nvmem: remove regmap dependency Srinivas Kandagatla
2016-05-02 18:36 ` [PATCH v3 1/2] nvmem: mtk-efuse: remove nvmem " Srinivas Kandagatla
2016-05-02 18:36 ` [PATCH v3 2/2] nvmem: mxs-ocotp: " Srinivas Kandagatla
2016-05-04 11:03   ` Stefan Wahren
2016-05-18 14:30 ` [PATCH v3 0/2] nvmem: remove " Stefan Wahren
2016-05-18 14:36   ` Srinivas Kandagatla
2016-06-01  8:27 ` Stefan Wahren
2016-06-01 17:55   ` Greg Kroah-Hartman
2016-06-23 18:07     ` Stefan Wahren
2016-06-25 14:43       ` Greg Kroah-Hartman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).