* [PATCH v2 RESEND] mfd: hi6421-spmi-pmic: cleanup drvdata
@ 2021-09-15 12:47 Mauro Carvalho Chehab
2021-10-05 7:50 ` Lee Jones
2021-10-06 7:57 ` [GIT PULL] Immutable branch between MFD, Misc and Regulator due for the v5.16 merge window Lee Jones
0 siblings, 2 replies; 6+ messages in thread
From: Mauro Carvalho Chehab @ 2021-09-15 12:47 UTC (permalink / raw)
To: Lee Jones
Cc: linuxarm, mauro.chehab, Mauro Carvalho Chehab, Arnd Bergmann,
Greg Kroah-Hartman, Liam Girdwood, Mark Brown, linux-kernel
There are lots of fields at struct hi6421_spmi_pmic that aren't
used. In a matter of fact, only regmap is needed.
So, drop the struct as a hole, and set just the regmap as
the drvdata.
Acked-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
---
drivers/mfd/hi6421-spmi-pmic.c | 16 +++++----------
drivers/misc/hi6421v600-irq.c | 9 ++++-----
drivers/regulator/hi6421v600-regulator.c | 10 +++++-----
include/linux/mfd/hi6421-spmi-pmic.h | 25 ------------------------
4 files changed, 14 insertions(+), 46 deletions(-)
delete mode 100644 include/linux/mfd/hi6421-spmi-pmic.h
diff --git a/drivers/mfd/hi6421-spmi-pmic.c b/drivers/mfd/hi6421-spmi-pmic.c
index 4f136826681b..c9c0c3d7011f 100644
--- a/drivers/mfd/hi6421-spmi-pmic.c
+++ b/drivers/mfd/hi6421-spmi-pmic.c
@@ -8,7 +8,6 @@
*/
#include <linux/mfd/core.h>
-#include <linux/mfd/hi6421-spmi-pmic.h>
#include <linux/module.h>
#include <linux/platform_device.h>
#include <linux/regmap.h>
@@ -30,19 +29,14 @@ static const struct regmap_config regmap_config = {
static int hi6421_spmi_pmic_probe(struct spmi_device *sdev)
{
struct device *dev = &sdev->dev;
+ struct regmap *regmap;
int ret;
- struct hi6421_spmi_pmic *ddata;
- ddata = devm_kzalloc(dev, sizeof(*ddata), GFP_KERNEL);
- if (!ddata)
- return -ENOMEM;
- ddata->regmap = devm_regmap_init_spmi_ext(sdev, ®map_config);
- if (IS_ERR(ddata->regmap))
- return PTR_ERR(ddata->regmap);
+ regmap = devm_regmap_init_spmi_ext(sdev, ®map_config);
+ if (IS_ERR(regmap))
+ return PTR_ERR(regmap);
- ddata->dev = dev;
-
- dev_set_drvdata(&sdev->dev, ddata);
+ dev_set_drvdata(&sdev->dev, regmap);
ret = devm_mfd_add_devices(&sdev->dev, PLATFORM_DEVID_NONE,
hi6421v600_devs, ARRAY_SIZE(hi6421v600_devs),
diff --git a/drivers/misc/hi6421v600-irq.c b/drivers/misc/hi6421v600-irq.c
index 08535e97ff43..1c763796cf1f 100644
--- a/drivers/misc/hi6421v600-irq.c
+++ b/drivers/misc/hi6421v600-irq.c
@@ -10,7 +10,6 @@
#include <linux/bitops.h>
#include <linux/interrupt.h>
#include <linux/irq.h>
-#include <linux/mfd/hi6421-spmi-pmic.h>
#include <linux/module.h>
#include <linux/of_gpio.h>
#include <linux/platform_device.h>
@@ -220,7 +219,7 @@ static int hi6421v600_irq_probe(struct platform_device *pdev)
struct platform_device *pmic_pdev;
struct device *dev = &pdev->dev;
struct hi6421v600_irq *priv;
- struct hi6421_spmi_pmic *pmic;
+ struct regmap *regmap;
unsigned int virq;
int i, ret;
@@ -229,8 +228,8 @@ static int hi6421v600_irq_probe(struct platform_device *pdev)
* which should first set drvdata. If this doesn't happen, hit
* a warn on and return.
*/
- pmic = dev_get_drvdata(pmic_dev);
- if (WARN_ON(!pmic))
+ regmap = dev_get_drvdata(pmic_dev);
+ if (WARN_ON(!regmap))
return -ENODEV;
priv = devm_kzalloc(dev, sizeof(*priv), GFP_KERNEL);
@@ -238,7 +237,7 @@ static int hi6421v600_irq_probe(struct platform_device *pdev)
return -ENOMEM;
priv->dev = dev;
- priv->regmap = pmic->regmap;
+ priv->regmap = regmap;
spin_lock_init(&priv->lock);
diff --git a/drivers/regulator/hi6421v600-regulator.c b/drivers/regulator/hi6421v600-regulator.c
index 662d87ae61cb..4671678f6b19 100644
--- a/drivers/regulator/hi6421v600-regulator.c
+++ b/drivers/regulator/hi6421v600-regulator.c
@@ -9,8 +9,8 @@
// Guodong Xu <guodong.xu@linaro.org>
#include <linux/delay.h>
-#include <linux/mfd/hi6421-spmi-pmic.h>
#include <linux/module.h>
+#include <linux/of.h>
#include <linux/platform_device.h>
#include <linux/regmap.h>
#include <linux/regulator/driver.h>
@@ -237,7 +237,7 @@ static int hi6421_spmi_regulator_probe(struct platform_device *pdev)
struct hi6421_spmi_reg_priv *priv;
struct hi6421_spmi_reg_info *info;
struct device *dev = &pdev->dev;
- struct hi6421_spmi_pmic *pmic;
+ struct regmap *regmap;
struct regulator_dev *rdev;
int i;
@@ -246,8 +246,8 @@ static int hi6421_spmi_regulator_probe(struct platform_device *pdev)
* which should first set drvdata. If this doesn't happen, hit
* a warn on and return.
*/
- pmic = dev_get_drvdata(pmic_dev);
- if (WARN_ON(!pmic))
+ regmap = dev_get_drvdata(pmic_dev);
+ if (WARN_ON(!regmap))
return -ENODEV;
priv = devm_kzalloc(dev, sizeof(*priv), GFP_KERNEL);
@@ -261,7 +261,7 @@ static int hi6421_spmi_regulator_probe(struct platform_device *pdev)
config.dev = pdev->dev.parent;
config.driver_data = priv;
- config.regmap = pmic->regmap;
+ config.regmap = regmap;
rdev = devm_regulator_register(dev, &info->desc, &config);
if (IS_ERR(rdev)) {
diff --git a/include/linux/mfd/hi6421-spmi-pmic.h b/include/linux/mfd/hi6421-spmi-pmic.h
deleted file mode 100644
index e5b8dbf828b6..000000000000
--- a/include/linux/mfd/hi6421-spmi-pmic.h
+++ /dev/null
@@ -1,25 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0 */
-/*
- * Header file for device driver Hi6421 PMIC
- *
- * Copyright (c) 2013 Linaro Ltd.
- * Copyright (C) 2011 Hisilicon.
- * Copyright (c) 2020-2021 Huawei Technologies Co., Ltd
- *
- * Guodong Xu <guodong.xu@linaro.org>
- */
-
-#ifndef __HISI_PMIC_H
-#define __HISI_PMIC_H
-
-#include <linux/irqdomain.h>
-#include <linux/regmap.h>
-
-struct hi6421_spmi_pmic {
- struct resource *res;
- struct device *dev;
- void __iomem *regs;
- struct regmap *regmap;
-};
-
-#endif /* __HISI_PMIC_H */
--
2.31.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH v2 RESEND] mfd: hi6421-spmi-pmic: cleanup drvdata
2021-09-15 12:47 [PATCH v2 RESEND] mfd: hi6421-spmi-pmic: cleanup drvdata Mauro Carvalho Chehab
@ 2021-10-05 7:50 ` Lee Jones
2021-10-05 7:56 ` Mauro Carvalho Chehab
2021-10-06 7:57 ` [GIT PULL] Immutable branch between MFD, Misc and Regulator due for the v5.16 merge window Lee Jones
1 sibling, 1 reply; 6+ messages in thread
From: Lee Jones @ 2021-10-05 7:50 UTC (permalink / raw)
To: Mauro Carvalho Chehab
Cc: linuxarm, mauro.chehab, Arnd Bergmann, Greg Kroah-Hartman,
Liam Girdwood, Mark Brown, linux-kernel
On Wed, 15 Sep 2021, Mauro Carvalho Chehab wrote:
> There are lots of fields at struct hi6421_spmi_pmic that aren't
> used. In a matter of fact, only regmap is needed.
>
> So, drop the struct as a hole, and set just the regmap as
> the drvdata.
>
> Acked-by: Mark Brown <broonie@kernel.org>
> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
> ---
> drivers/mfd/hi6421-spmi-pmic.c | 16 +++++----------
> drivers/misc/hi6421v600-irq.c | 9 ++++-----
> drivers/regulator/hi6421v600-regulator.c | 10 +++++-----
> include/linux/mfd/hi6421-spmi-pmic.h | 25 ------------------------
> 4 files changed, 14 insertions(+), 46 deletions(-)
> delete mode 100644 include/linux/mfd/hi6421-spmi-pmic.h
For my own reference (apply this as-is to your sign-off block):
Acked-for-MFD-by: Lee Jones <lee.jones@linaro.org>
I intend to take this with a Misc Ack.
--
Lee Jones [李琼斯]
Senior Technical Lead - Developer Services
Linaro.org │ Open source software for Arm SoCs
Follow Linaro: Facebook | Twitter | Blog
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v2 RESEND] mfd: hi6421-spmi-pmic: cleanup drvdata
2021-10-05 7:50 ` Lee Jones
@ 2021-10-05 7:56 ` Mauro Carvalho Chehab
2021-10-05 8:11 ` Lee Jones
0 siblings, 1 reply; 6+ messages in thread
From: Mauro Carvalho Chehab @ 2021-10-05 7:56 UTC (permalink / raw)
To: Lee Jones
Cc: linuxarm, mauro.chehab, Arnd Bergmann, Greg Kroah-Hartman,
Liam Girdwood, Mark Brown, linux-kernel
Em Tue, 5 Oct 2021 08:50:50 +0100
Lee Jones <lee.jones@linaro.org> escreveu:
> On Wed, 15 Sep 2021, Mauro Carvalho Chehab wrote:
>
> > There are lots of fields at struct hi6421_spmi_pmic that aren't
> > used. In a matter of fact, only regmap is needed.
> >
> > So, drop the struct as a hole, and set just the regmap as
> > the drvdata.
> >
> > Acked-by: Mark Brown <broonie@kernel.org>
> > Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
> > ---
> > drivers/mfd/hi6421-spmi-pmic.c | 16 +++++----------
> > drivers/misc/hi6421v600-irq.c | 9 ++++-----
> > drivers/regulator/hi6421v600-regulator.c | 10 +++++-----
> > include/linux/mfd/hi6421-spmi-pmic.h | 25 ------------------------
> > 4 files changed, 14 insertions(+), 46 deletions(-)
> > delete mode 100644 include/linux/mfd/hi6421-spmi-pmic.h
>
> For my own reference (apply this as-is to your sign-off block):
>
> Acked-for-MFD-by: Lee Jones <lee.jones@linaro.org>
>
> I intend to take this with a Misc Ack.
Hi Lee,
Greg already gave you:
https://lore.kernel.org/all/YVLA14jbwqXjNM2f@kroah.com/
Regards,
Mauro
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v2 RESEND] mfd: hi6421-spmi-pmic: cleanup drvdata
2021-10-05 7:56 ` Mauro Carvalho Chehab
@ 2021-10-05 8:11 ` Lee Jones
2021-10-05 8:46 ` Mauro Carvalho Chehab
0 siblings, 1 reply; 6+ messages in thread
From: Lee Jones @ 2021-10-05 8:11 UTC (permalink / raw)
To: Mauro Carvalho Chehab
Cc: linuxarm, mauro.chehab, Arnd Bergmann, Greg Kroah-Hartman,
Liam Girdwood, Mark Brown, linux-kernel
On Tue, 05 Oct 2021, Mauro Carvalho Chehab wrote:
> Em Tue, 5 Oct 2021 08:50:50 +0100
> Lee Jones <lee.jones@linaro.org> escreveu:
>
> > On Wed, 15 Sep 2021, Mauro Carvalho Chehab wrote:
> >
> > > There are lots of fields at struct hi6421_spmi_pmic that aren't
> > > used. In a matter of fact, only regmap is needed.
> > >
> > > So, drop the struct as a hole, and set just the regmap as
> > > the drvdata.
> > >
> > > Acked-by: Mark Brown <broonie@kernel.org>
> > > Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
> > > ---
> > > drivers/mfd/hi6421-spmi-pmic.c | 16 +++++----------
> > > drivers/misc/hi6421v600-irq.c | 9 ++++-----
> > > drivers/regulator/hi6421v600-regulator.c | 10 +++++-----
> > > include/linux/mfd/hi6421-spmi-pmic.h | 25 ------------------------
> > > 4 files changed, 14 insertions(+), 46 deletions(-)
> > > delete mode 100644 include/linux/mfd/hi6421-spmi-pmic.h
> >
> > For my own reference (apply this as-is to your sign-off block):
> >
> > Acked-for-MFD-by: Lee Jones <lee.jones@linaro.org>
> >
> > I intend to take this with a Misc Ack.
>
> Hi Lee,
>
> Greg already gave you:
>
> https://lore.kernel.org/all/YVLA14jbwqXjNM2f@kroah.com/
Yes, I found that after I replied to this one.
I was having some trouble applying it with `b4` just as you replied:
https://lore.kernel.org/tools/CAF2Aj3icJtU+wacosM-LO2aqMChWL69T6bf7dK3xqPMSk6Ux3w@mail.gmail.com/T/#u
I fixed the spelling/grammar mistakes and applied the patch.
--
Lee Jones [李琼斯]
Senior Technical Lead - Developer Services
Linaro.org │ Open source software for Arm SoCs
Follow Linaro: Facebook | Twitter | Blog
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v2 RESEND] mfd: hi6421-spmi-pmic: cleanup drvdata
2021-10-05 8:11 ` Lee Jones
@ 2021-10-05 8:46 ` Mauro Carvalho Chehab
0 siblings, 0 replies; 6+ messages in thread
From: Mauro Carvalho Chehab @ 2021-10-05 8:46 UTC (permalink / raw)
To: Lee Jones
Cc: linuxarm, mauro.chehab, Arnd Bergmann, Greg Kroah-Hartman,
Liam Girdwood, Mark Brown, linux-kernel
Em Tue, 5 Oct 2021 09:11:06 +0100
Lee Jones <lee.jones@linaro.org> escreveu:
> On Tue, 05 Oct 2021, Mauro Carvalho Chehab wrote:
>
> > Em Tue, 5 Oct 2021 08:50:50 +0100
> > Lee Jones <lee.jones@linaro.org> escreveu:
> >
> > > On Wed, 15 Sep 2021, Mauro Carvalho Chehab wrote:
> > >
> > > > There are lots of fields at struct hi6421_spmi_pmic that aren't
> > > > used. In a matter of fact, only regmap is needed.
> > > >
> > > > So, drop the struct as a hole, and set just the regmap as
> > > > the drvdata.
> > > >
> > > > Acked-by: Mark Brown <broonie@kernel.org>
> > > > Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
> > > > ---
> > > > drivers/mfd/hi6421-spmi-pmic.c | 16 +++++----------
> > > > drivers/misc/hi6421v600-irq.c | 9 ++++-----
> > > > drivers/regulator/hi6421v600-regulator.c | 10 +++++-----
> > > > include/linux/mfd/hi6421-spmi-pmic.h | 25 ------------------------
> > > > 4 files changed, 14 insertions(+), 46 deletions(-)
> > > > delete mode 100644 include/linux/mfd/hi6421-spmi-pmic.h
> > >
> > > For my own reference (apply this as-is to your sign-off block):
> > >
> > > Acked-for-MFD-by: Lee Jones <lee.jones@linaro.org>
> > >
> > > I intend to take this with a Misc Ack.
> >
> > Hi Lee,
> >
> > Greg already gave you:
> >
> > https://lore.kernel.org/all/YVLA14jbwqXjNM2f@kroah.com/
>
> Yes, I found that after I replied to this one.
>
> I was having some trouble applying it with `b4` just as you replied:
>
> https://lore.kernel.org/tools/CAF2Aj3icJtU+wacosM-LO2aqMChWL69T6bf7dK3xqPMSk6Ux3w@mail.gmail.com/T/#u
Weird. Yeah, getting acks are sometimes problematic. I remember
having issues with that (a long time ago) with patchwork too.
> I fixed the spelling/grammar mistakes and applied the patch.
Thank you!
Best regards,
Mauro
^ permalink raw reply [flat|nested] 6+ messages in thread
* [GIT PULL] Immutable branch between MFD, Misc and Regulator due for the v5.16 merge window
2021-09-15 12:47 [PATCH v2 RESEND] mfd: hi6421-spmi-pmic: cleanup drvdata Mauro Carvalho Chehab
2021-10-05 7:50 ` Lee Jones
@ 2021-10-06 7:57 ` Lee Jones
1 sibling, 0 replies; 6+ messages in thread
From: Lee Jones @ 2021-10-06 7:57 UTC (permalink / raw)
To: Mauro Carvalho Chehab
Cc: linuxarm, mauro.chehab, Arnd Bergmann, Greg Kroah-Hartman,
Liam Girdwood, Mark Brown, linux-kernel
Enjoy!
The following changes since commit 6880fa6c56601bb8ed59df6c30fd390cc5f6dd8f:
Linux 5.15-rc1 (2021-09-12 16:28:37 -0700)
are available in the Git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd.git ib-mfd-misc-regulator-v5.16
for you to fetch changes up to e68ce0faf29c7c268666e11e95bf27dca97d28b0:
mfd: hi6421-spmi-pmic: Cleanup drvdata to only include regmap (2021-10-05 08:56:08 +0100)
----------------------------------------------------------------
Immutable branch between MFD, Misc and Regulator due for the v5.16 merge window
----------------------------------------------------------------
Mauro Carvalho Chehab (1):
mfd: hi6421-spmi-pmic: Cleanup drvdata to only include regmap
drivers/mfd/hi6421-spmi-pmic.c | 16 +++++-----------
drivers/misc/hi6421v600-irq.c | 9 ++++-----
drivers/regulator/hi6421v600-regulator.c | 10 +++++-----
include/linux/mfd/hi6421-spmi-pmic.h | 25 -------------------------
4 files changed, 14 insertions(+), 46 deletions(-)
delete mode 100644 include/linux/mfd/hi6421-spmi-pmic.h
--
Lee Jones [李琼斯]
Senior Technical Lead - Developer Services
Linaro.org │ Open source software for Arm SoCs
Follow Linaro: Facebook | Twitter | Blog
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2021-10-06 7:57 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-15 12:47 [PATCH v2 RESEND] mfd: hi6421-spmi-pmic: cleanup drvdata Mauro Carvalho Chehab
2021-10-05 7:50 ` Lee Jones
2021-10-05 7:56 ` Mauro Carvalho Chehab
2021-10-05 8:11 ` Lee Jones
2021-10-05 8:46 ` Mauro Carvalho Chehab
2021-10-06 7:57 ` [GIT PULL] Immutable branch between MFD, Misc and Regulator due for the v5.16 merge window Lee Jones
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).