On Mon, Jan 18, 2021 at 02:09:56AM +0100, Johannes Czekay wrote:
> This patch cleans up two "macro argument reuse" warnings by checkpatch.
> This should also make the code much more readable.
>
> Signed-off-by: Johannes Czekay
> Co-developed-by: Nicolai Fischer
> Signed-off-by: Nicolai Fischer
Move it to be inside the private data struct.
Signed-off-by: Mauro Carvalho Chehab
---
drivers/staging/hikey9xx/hi6421v600-regulator.c | 10 ++
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/drivers/staging/hikey9xx/hi6421v600-regulator.c
b/drivers/staging/hikey9xx/hi6421
Fix a few warnings produced by make dt_binding_check.
Signed-off-by: Mauro Carvalho Chehab
---
.../hisilicon,hisi-spmi-controller.yaml | 19 ---
1 file changed, 16 insertions(+), 3 deletions(-)
diff --git a/drivers/staging/hikey9xx/hisilicon,hisi-spmi-controller.yaml
b/dr
During the driver refactor, a regression broke the logic inside
hi6421_spmi_regulator_get_optimum_mode(). Basically, if a LDO
has eco_uA == 0, it doesn't support economic mode. So, it should
return REGULATOR_MODE_NORMAL.
If economic mode is supported, it can return either
REGULATOR_MODE_IDLE or RE
The original driver, which can be seen at
commit 42f24d9d446a ("staging: regulator: add a regulator driver for HiSilicon
6421v600 SPMI PMIC")
had a complex logic to ensure that there won't be multiple power
enable/disable commands running at the same time. At the original
logic, it were ensured th
There's no additionalProperties field at the yaml file, causing
a warning when checking it.
Signed-off-by: Mauro Carvalho Chehab
---
drivers/staging/hikey9xx/hisilicon,hi6421-spmi-pmic.yaml | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/staging/hikey9xx/hisilicon,hi6421-spmi-pmic.
Instead of storing regulator LDO configuration inside the DT, move
it to be part of the driver itself.
Signed-off-by: Mauro Carvalho Chehab
---
.../staging/hikey9xx/hi6421v600-regulator.c | 380 +++---
1 file changed, 152 insertions(+), 228 deletions(-)
diff --git a/drivers/stagin
Remove the GPL boilerplate, as SPDX tag already points to the
license terms and add a new copyright for Huawei.
Signed-off-by: Mauro Carvalho Chehab
---
drivers/staging/hikey9xx/hi6421v600-regulator.c | 10 +-
1 file changed, 1 insertion(+), 9 deletions(-)
diff --git a/drivers/staging/h
In preparation for de-staging, do some cleanups:
- Return error codes from hi6421_spmi_pmic_rmw();
- Remove a debug message;
- Change the module description;
- a few minor coding style adjustments.
Signed-off-by: Mauro Carvalho Chehab
---
.../staging/hikey9xx/hi6421v600-regulator.c | 37 +
Hi Mark/Lee,
This patch series finish addressing support for Hikey 970
SPMI controller, PMIC and regulators.
I removed some unrelated DT patches from this series,
plus the Hikey 970 PHY USB3 code from it, in order to avoid
mixing different stuff on this series[1].
[1] Those unrelated patches wer
Use C99 comments at the beginning of the file and remove
uneeded includes.
Signed-off-by: Mauro Carvalho Chehab
---
.../staging/hikey9xx/hi6421v600-regulator.c | 43 +++
1 file changed, 16 insertions(+), 27 deletions(-)
diff --git a/drivers/staging/hikey9xx/hi6421v600-regulato
While those were useful during port time from downstream
version, let's get rid of them for good, as it is possible to
get about the same things by enabling regulator debugging code.
Signed-off-by: Mauro Carvalho Chehab
---
.../staging/hikey9xx/hi6421v600-regulator.c | 47 ++-
As all regulator-specific properties got moved to be part of the
driver, remove them from the DT spec.
Signed-off-by: Mauro Carvalho Chehab
---
.../hikey9xx/hisilicon,hi6421-spmi-pmic.yaml | 106 +++---
1 file changed, 40 insertions(+), 66 deletions(-)
diff --git a/drivers/staging/
Remove obvious comments and fix the comment for the
HI6421V600_LDO() macro.
While on it, use kernel-doc notation for HI6421V600_LDO(),
as kernel-doc can check if the arguments match its
description.
Signed-off-by: Mauro Carvalho Chehab
---
.../staging/hikey9xx/hi6421v600-regulator.c | 27
The Hisilicon 6421v600 SPMI driver is ready for mainstream.
So, move it from staging.
Signed-off-by: Mauro Carvalho Chehab
---
.../spmi/hisilicon,hisi-spmi-controller.yaml | 75
MAINTAINERS | 7 +
drivers/spmi/Kconfig | 9 +
This driver is ready for mainstream. Move it out of staging.
Signed-off-by: Mauro Carvalho Chehab
---
MAINTAINERS | 7 +-
drivers/regulator/Kconfig | 8 +
drivers/regulator/Makefile| 1 +
drivers/regulator/hi6421v600
Sparse complains about __be32 conversions:
drivers/spmi/hisi-spmi-controller.c
drivers/spmi/hisi-spmi-controller.c:164:24: warning: cast to restricted
__be32
drivers/spmi/hisi-spmi-controller.c
drivers/spmi/hisi-spmi-controller.c:164:24: warning: cast to restricted
__be32
This driver is ready for mainstream. So, move it out of staging.
Signed-off-by: Mauro Carvalho Chehab
---
.../mfd/hisilicon,hi6421-spmi-pmic.yaml | 135 +++
MAINTAINERS | 7 +
drivers/mfd/Kconfig | 15 +
drivers/mfd/Makefil
Em Tue, 19 Jan 2021 09:56:31 +0300
Dan Carpenter escreveu:
> On Thu, Jan 14, 2021 at 09:56:41AM -0800, Joe Perches wrote:
> > On Thu, 2021-01-14 at 18:35 +0100, Mauro Carvalho Chehab wrote:
> > > Instead of using 1/0 for true/false, change the type to boolean
> > > and change the returned value
Em Thu, 14 Jan 2021 19:47:31 -0600
Rob Herring escreveu:
> On Thu, Jan 14, 2021 at 06:35:44PM +0100, Mauro Carvalho Chehab wrote:
> > The phy USB3 driver for Hisilicon 970 (hi3670) is ready
> > for mainstream. Mode it from staging into the main driver's
> > phy/ directory.
> >
> > Signed-off-by:
Add a blank line after maintainers field.
Signed-off-by: Mauro Carvalho Chehab
---
drivers/staging/hikey9xx/phy-hi3670-usb3.yaml | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/staging/hikey9xx/phy-hi3670-usb3.yaml
b/drivers/staging/hikey9xx/phy-hi3670-usb3.yaml
index 125a5d6546ae..
Instead of running a loop up to 100k times, add a small
delay inside it, running it up to 10 times, waiting up
to 100-200 us.
It should be noticed that I don't have the datasheet for
this PHY. So, not sure if this time will cover all
situations.
Signed-off-by: Mauro Carvalho Chehab
---
drivers/
Hi Vinod/Rob,
This series moves the Hikey 970 USB PHY driver out of staging.
Patches 1 to 4 contain the fixes from staging. Patch 5 moves the
driver from staging:
$ git show 82ce73ac9a38 --summary
...
rename drivers/staging/hikey9xx/phy-hi3670-usb3.yaml =>
Documentatio
There are a few issues on this function:
1. Instead of using 1/0 for true/false, change the type to boolean;
2. there's a typo there:
seleted -> selected
3. It's logic is reversed.
Address them.
Signed-off-by: Mauro Carvalho Chehab
---
drivers/staging/hikey9xx/phy-hi3670-usb3.c | 14 ++
Cleanup the bitfield macros by using FIELD_PREP() and GENMASK().
While here, place all hexadecimal values in lowercase.
Signed-off-by: Mauro Carvalho Chehab
---
drivers/staging/hikey9xx/phy-hi3670-usb3.c | 61 ++
1 file changed, 28 insertions(+), 33 deletions(-)
diff --git
The phy USB3 driver for Hisilicon 970 (hi3670) is ready
for mainstream. Mode it from staging into the main driver's
phy/ directory.
Signed-off-by: Mauro Carvalho Chehab
---
.../bindings/phy/hisilicon,hi3670-usb3.yaml | 73 ++
MAINTAINERS | 9 +-
drivers/phy
On Tue, Jan 19, 2021 at 11:14:20AM +0100, Mauro Carvalho Chehab wrote:
> +int hi6421_spmi_pmic_read(struct hi6421_spmi_pmic *pmic, int reg)
> +{
> + struct spmi_device *pdev;
> + u8 read_value = 0;
> + u32 ret;
> +
> + pdev = to_spmi_device(pmic->dev);
> + if (!pdev) {
> +
Em Tue, 19 Jan 2021 13:46:22 +
Mark Brown escreveu:
> On Tue, Jan 19, 2021 at 11:14:20AM +0100, Mauro Carvalho Chehab wrote:
>
> > +int hi6421_spmi_pmic_read(struct hi6421_spmi_pmic *pmic, int reg)
> > +{
> > + struct spmi_device *pdev;
> > + u8 read_value = 0;
> > + u32 ret;
> > +
> >
Remove the GPL boilerplate, as SPDX tag already points to the
license terms and add a new copyright for Huawei.
Signed-off-by: Mauro Carvalho Chehab
---
drivers/staging/hikey9xx/hi6421v600-regulator.c | 10 +-
1 file changed, 1 insertion(+), 9 deletions(-)
diff --git a/drivers/staging/h
Move it to be inside the private data struct.
Signed-off-by: Mauro Carvalho Chehab
---
drivers/staging/hikey9xx/hi6421v600-regulator.c | 10 ++
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/drivers/staging/hikey9xx/hi6421v600-regulator.c
b/drivers/staging/hikey9xx/hi6421
There's no additionalProperties field at the yaml file, causing
a warning when checking it.
Signed-off-by: Mauro Carvalho Chehab
---
drivers/staging/hikey9xx/hisilicon,hi6421-spmi-pmic.yaml | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/staging/hikey9xx/hisilicon,hi6421-spmi-pmic.
Hi Mark/Lee,
This patch series finish addressing support for Hikey 970
SPMI controller, PMIC and regulators.
I removed some unrelated DT patches from this series,
plus the Hikey 970 PHY USB3 code from it, in order to avoid
mixing different stuff on this series[1].
[1] Those unrelated patches wer
There are several uneeded includes. Remove them.
Signed-off-by: Mauro Carvalho Chehab
---
drivers/staging/hikey9xx/hi6421-spmi-pmic.c | 8
1 file changed, 8 deletions(-)
diff --git a/drivers/staging/hikey9xx/hi6421-spmi-pmic.c
b/drivers/staging/hikey9xx/hi6421-spmi-pmic.c
index 9310a9
As all regulator-specific properties got moved to be part of the
driver, remove them from the DT spec.
Signed-off-by: Mauro Carvalho Chehab
---
.../hikey9xx/hisilicon,hi6421-spmi-pmic.yaml | 106 +++---
1 file changed, 40 insertions(+), 66 deletions(-)
diff --git a/drivers/staging/
Sparse complains about __be32 conversions:
drivers/spmi/hisi-spmi-controller.c
drivers/spmi/hisi-spmi-controller.c:164:24: warning: cast to restricted
__be32
drivers/spmi/hisi-spmi-controller.c
drivers/spmi/hisi-spmi-controller.c:164:24: warning: cast to restricted
__be32
The original driver, which can be seen at
commit 42f24d9d446a ("staging: regulator: add a regulator driver for HiSilicon
6421v600 SPMI PMIC")
had a complex logic to ensure that there won't be multiple power
enable/disable commands running at the same time. At the original
logic, it were ensured th
While those were useful during port time from downstream
version, let's get rid of them for good, as it is possible to
get about the same things by enabling regulator debugging code.
Signed-off-by: Mauro Carvalho Chehab
---
.../staging/hikey9xx/hi6421v600-regulator.c | 47 ++-
This driver is ready for mainstream. So, move it out of staging.
Signed-off-by: Mauro Carvalho Chehab
---
.../mfd/hisilicon,hi6421-spmi-pmic.yaml | 135 +
MAINTAINERS | 7 +
drivers/mfd/Kconfig | 15 +
drivers/mfd/Makef
Instead of doing its own SPMI I/O implementation, use the
already-existing regmap one.
Signed-off-by: Mauro Carvalho Chehab
---
drivers/staging/hikey9xx/hi6421-spmi-pmic.c | 115 ++
.../staging/hikey9xx/hi6421v600-regulator.c | 26 ++--
include/linux/mfd/hi6421-spmi-pmic.h
Fix a few warnings produced by make dt_binding_check.
Signed-off-by: Mauro Carvalho Chehab
---
.../hisilicon,hisi-spmi-controller.yaml | 19 ---
1 file changed, 16 insertions(+), 3 deletions(-)
diff --git a/drivers/staging/hikey9xx/hisilicon,hisi-spmi-controller.yaml
b/dr
The Hisilicon 6421v600 SPMI driver is ready for mainstream.
So, move it from staging.
Signed-off-by: Mauro Carvalho Chehab
---
.../spmi/hisilicon,hisi-spmi-controller.yaml | 75
MAINTAINERS | 7 +
drivers/spmi/Kconfig | 9 +
In preparation for de-staging, do some cleanups:
- Return error codes from hi6421_spmi_pmic_rmw();
- Remove a debug message;
- Change the module description;
- a few minor coding style adjustments.
Signed-off-by: Mauro Carvalho Chehab
---
.../staging/hikey9xx/hi6421v600-regulator.c | 37 +
Instead of storing regulator LDO configuration inside the DT, move
it to be part of the driver itself.
Signed-off-by: Mauro Carvalho Chehab
---
.../staging/hikey9xx/hi6421v600-regulator.c | 381 +++---
1 file changed, 153 insertions(+), 228 deletions(-)
diff --git a/drivers/stagin
Remove obvious comments and fix the comment for the
HI6421V600_LDO() macro.
While on it, use kernel-doc notation for HI6421V600_LDO(),
as kernel-doc can check if the arguments match its
description.
Signed-off-by: Mauro Carvalho Chehab
---
.../staging/hikey9xx/hi6421v600-regulator.c | 27
This driver is ready for mainstream. Move it out of staging.
Signed-off-by: Mauro Carvalho Chehab
---
MAINTAINERS | 7 +-
drivers/regulator/Kconfig | 8 +
drivers/regulator/Makefile| 1 +
drivers/regulator/hi6421v600
Remove the GPL boilerplate, as SPDX tag already points to the
license terms and add a new copyright for Huawei.
Signed-off-by: Mauro Carvalho Chehab
---
drivers/staging/hikey9xx/hi6421-spmi-pmic.c | 24 ++---
1 file changed, 7 insertions(+), 17 deletions(-)
diff --git a/drivers/
During the driver refactor, a regression broke the logic inside
hi6421_spmi_regulator_get_optimum_mode(). Basically, if a LDO
has eco_uA == 0, it doesn't support economic mode. So, it should
return REGULATOR_MODE_NORMAL.
If economic mode is supported, it can return either
REGULATOR_MODE_IDLE or RE
Use C99 comments at the beginning of the file and remove
uneeded includes.
Signed-off-by: Mauro Carvalho Chehab
---
.../staging/hikey9xx/hi6421v600-regulator.c | 43 +++
1 file changed, 16 insertions(+), 27 deletions(-)
diff --git a/drivers/staging/hikey9xx/hi6421v600-regulato
On Tue, Jan 19, 2021 at 05:10:45PM +0100, Mauro Carvalho Chehab wrote:
> +static int hi6421_spmi_regulator_get_voltage_sel(struct regulator_dev *rdev)
> +{
> +static int hi6421_spmi_regulator_set_voltage_sel(struct regulator_dev *rdev,
> + unsigned int
Em Tue, 19 Jan 2021 16:19:50 +
Mark Brown escreveu:
> On Tue, Jan 19, 2021 at 05:10:45PM +0100, Mauro Carvalho Chehab wrote:
>
> > +static int hi6421_spmi_regulator_get_voltage_sel(struct regulator_dev
> > *rdev)
> > +{
>
> > +static int hi6421_spmi_regulator_set_voltage_sel(struct regul
50 matches
Mail list logo