diff mbox series

nvmem: mtk-efuse: Remove EFUSE register write support

Message ID 20200826050145.24655-1-chih-en.hsu@mediatek.com (mailing list archive)
State New, archived
Headers show
Series nvmem: mtk-efuse: Remove EFUSE register write support | expand

Commit Message

Chih-En Hsu Aug. 26, 2020, 5:01 a.m. UTC
This patch is to remove function "mtk_reg_write" since
Mediatek EFUSE hardware only supports read functionality
for NVMEM consumers.

Signed-off-by: Chih-En Hsu <chih-en.hsu@mediatek.com>
---
 drivers/nvmem/mtk-efuse.c | 14 --------------
 1 file changed, 14 deletions(-)

Comments

CK Hu (胡俊光) Aug. 26, 2020, 5:16 a.m. UTC | #1
Hi, Chih-En:

On Wed, 2020-08-26 at 13:01 +0800, Chih-En Hsu wrote:
> This patch is to remove function "mtk_reg_write" since
> Mediatek EFUSE hardware only supports read functionality
> for NVMEM consumers.
> 

This is a bug-fix patch, so need a 'Fixes' tag. You could refer to [1].

[1]
https://www.kernel.org/doc/html/latest/process/submitting-patches.html#describe-changes

Regards,
CK.

> Signed-off-by: Chih-En Hsu <chih-en.hsu@mediatek.com>
> ---
>  drivers/nvmem/mtk-efuse.c | 14 --------------
>  1 file changed, 14 deletions(-)
> 
> diff --git a/drivers/nvmem/mtk-efuse.c b/drivers/nvmem/mtk-efuse.c
> index 856d9c3fc38e..6a537d959f14 100644
> --- a/drivers/nvmem/mtk-efuse.c
> +++ b/drivers/nvmem/mtk-efuse.c
> @@ -28,19 +28,6 @@ static int mtk_reg_read(void *context,
>  	return 0;
>  }
>  
> -static int mtk_reg_write(void *context,
> -			 unsigned int reg, void *_val, size_t bytes)
> -{
> -	struct mtk_efuse_priv *priv = context;
> -	u32 *val = _val;
> -	int i = 0, words = bytes / 4;
> -
> -	while (words--)
> -		writel(*val++, priv->base + reg + (i++ * 4));
> -
> -	return 0;
> -}
> -
>  static int mtk_efuse_probe(struct platform_device *pdev)
>  {
>  	struct device *dev = &pdev->dev;
> @@ -61,7 +48,6 @@ static int mtk_efuse_probe(struct platform_device *pdev)
>  	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 = priv;
>  	econfig.dev = dev;
Chih-En Hsu Aug. 26, 2020, 6:12 a.m. UTC | #2
Hi CK:

I see.

I will add the following fix tag into the next patch version.

Fixes: 4c7e4fe37766 ("nvmem: mediatek: Add Mediatek EFUSE driver")

Thanks a lot.

Alex


On Wed, 2020-08-26 at 13:16 +0800, CK Hu wrote:
> Hi, Chih-En:
> 
> On Wed, 2020-08-26 at 13:01 +0800, Chih-En Hsu wrote:
> > This patch is to remove function "mtk_reg_write" since
> > Mediatek EFUSE hardware only supports read functionality
> > for NVMEM consumers.
> > 
> 
> This is a bug-fix patch, so need a 'Fixes' tag. You could refer to [1].
> 
> [1]
> https://www.kernel.org/doc/html/latest/process/submitting-patches.html#describe-changes
> 
> Regards,
> CK.
> 
> > Signed-off-by: Chih-En Hsu <chih-en.hsu@mediatek.com>
> > ---
> >  drivers/nvmem/mtk-efuse.c | 14 --------------
> >  1 file changed, 14 deletions(-)
> > 
> > diff --git a/drivers/nvmem/mtk-efuse.c b/drivers/nvmem/mtk-efuse.c
> > index 856d9c3fc38e..6a537d959f14 100644
> > --- a/drivers/nvmem/mtk-efuse.c
> > +++ b/drivers/nvmem/mtk-efuse.c
> > @@ -28,19 +28,6 @@ static int mtk_reg_read(void *context,
> >  	return 0;
> >  }
> >  
> > -static int mtk_reg_write(void *context,
> > -			 unsigned int reg, void *_val, size_t bytes)
> > -{
> > -	struct mtk_efuse_priv *priv = context;
> > -	u32 *val = _val;
> > -	int i = 0, words = bytes / 4;
> > -
> > -	while (words--)
> > -		writel(*val++, priv->base + reg + (i++ * 4));
> > -
> > -	return 0;
> > -}
> > -
> >  static int mtk_efuse_probe(struct platform_device *pdev)
> >  {
> >  	struct device *dev = &pdev->dev;
> > @@ -61,7 +48,6 @@ static int mtk_efuse_probe(struct platform_device *pdev)
> >  	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 = priv;
> >  	econfig.dev = dev;
> 
>
diff mbox series

Patch

diff --git a/drivers/nvmem/mtk-efuse.c b/drivers/nvmem/mtk-efuse.c
index 856d9c3fc38e..6a537d959f14 100644
--- a/drivers/nvmem/mtk-efuse.c
+++ b/drivers/nvmem/mtk-efuse.c
@@ -28,19 +28,6 @@  static int mtk_reg_read(void *context,
 	return 0;
 }
 
-static int mtk_reg_write(void *context,
-			 unsigned int reg, void *_val, size_t bytes)
-{
-	struct mtk_efuse_priv *priv = context;
-	u32 *val = _val;
-	int i = 0, words = bytes / 4;
-
-	while (words--)
-		writel(*val++, priv->base + reg + (i++ * 4));
-
-	return 0;
-}
-
 static int mtk_efuse_probe(struct platform_device *pdev)
 {
 	struct device *dev = &pdev->dev;
@@ -61,7 +48,6 @@  static int mtk_efuse_probe(struct platform_device *pdev)
 	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 = priv;
 	econfig.dev = dev;