Re: [PATCH v4 19/21] regulator: hi6421v600-regulator: move it from staging

2021-01-20 Thread Mauro Carvalho Chehab
Em Wed, 20 Jan 2021 17:07:44 + Mark Brown escreveu: > On Wed, Jan 20, 2021 at 12:02:44AM +0100, Mauro Carvalho Chehab wrote: > > Mark Brown escreveu: > > > > Now that the driver has been converted to regmap these are just > > > duplicates of the regmap helpers. You may also be able to

[PATCH v5 14/21] staging: hikey9xx: spmi driver: convert to regmap

2021-01-20 Thread Mauro Carvalho Chehab
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

[PATCH v5 02/21] staging: hikey9xx: hisilicon, hi6421-spmi-pmic.yaml: simplify props

2021-01-20 Thread Mauro Carvalho Chehab
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

[PATCH v5 05/21] staging: hikey9xx: hi6421v600-regulator: move LDO config from DT

2021-01-20 Thread Mauro Carvalho Chehab
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

[PATCH v5 08/21] staging: hikey9xx: hi6421v600-regulator: do some cleanups

2021-01-20 Thread Mauro Carvalho Chehab
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

[PATCH v5 17/21] staging: hikey9xx: hi6421v600-regulator: use some regmap helpers

2021-01-20 Thread Mauro Carvalho Chehab
Now that the driver was ported to use regmap, let's use some help functions in order to simplify the code a little bit. Suggested-by: Mark Brown Signed-off-by: Mauro Carvalho Chehab --- .../staging/hikey9xx/hi6421v600-regulator.c | 45 ++- 1 file changed, 3 insertions(+), 42

[PATCH v5 18/21] spmi: hisi-spmi-controller: move driver from staging

2021-01-20 Thread Mauro Carvalho Chehab
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 | 0 MAINTAINERS | 7 +++ drivers/spmi/Kconfig

[PATCH v5 00/21] Move Hisilicon 6421v600 SPMI driver set out of staging

2021-01-20 Thread Mauro Carvalho Chehab
Hi Mark/Lee, This patch series finish addressing support for Hikey 970 SPMI controller, PMIC and regulators. This version was generated with -M, in order to make easier to merge upstream. Also, rebased on the top of v5.10, without any dependencies from the other patch series I'm submitting for

[PATCH v5 01/21] staging: hikey9xx: hisilicon, hisi-spmi-controller.yaml fix bindings

2021-01-20 Thread Mauro Carvalho Chehab
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

[PATCH v5 19/21] mfd: hi6421-spmi-pmic: move driver from staging

2021-01-20 Thread Mauro Carvalho Chehab
This driver is ready for mainstream. So, move it out of staging. Signed-off-by: Mauro Carvalho Chehab --- .../mfd}/hisilicon,hi6421-spmi-pmic.yaml | 0 MAINTAINERS | 7 +++ drivers/mfd/Kconfig | 15 +++

[PATCH v5 09/21] staging: hikey9xx: hi6421v600-regulator: update copyright

2021-01-20 Thread Mauro Carvalho Chehab
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

[PATCH v5 11/21] staging: hikey9xx: hi6421v600-regulator: cleanup comments

2021-01-20 Thread Mauro Carvalho Chehab
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

[PATCH v5 16/21] staging: hikey9xx: hi6421-spmi-pmic: simplify includes

2021-01-20 Thread Mauro Carvalho Chehab
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

[PATCH v5 03/21] staging: hikey9xx: hisi-spmi-controller: clean sparse warnings

2021-01-20 Thread Mauro Carvalho Chehab
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

[PATCH v5 15/21] staging: hikey9xx: hi6421-spmi-pmic: update copyright

2021-01-20 Thread Mauro Carvalho Chehab
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

[PATCH v5 20/21] regulator: hi6421v600-regulator: move it from staging

2021-01-20 Thread Mauro Carvalho Chehab
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

[PATCH v5 12/21] staging: hikey9xx: hi6421v600-regulator: fix get_optimum_mode

2021-01-20 Thread Mauro Carvalho Chehab
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

[PATCH v5 04/21] staging: hikey9xx: hi6421v600-regulator: do some cleanups

2021-01-20 Thread Mauro Carvalho Chehab
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

[PATCH v5 13/21] staging: hikey9xx: hisilicon, hi6421-spmi-pmic.yaml: cleanup a warning

2021-01-20 Thread Mauro Carvalho Chehab
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

[PATCH v5 06/21] staging: hikey9xx: hi6421v600-regulator: cleanup debug msgs

2021-01-20 Thread Mauro Carvalho Chehab
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 ++-

[PATCH v5 07/21] staging: hikey9xx: hi6421v600-regulator: get rid of an static data

2021-01-20 Thread Mauro Carvalho Chehab
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

[PATCH v5 10/21] staging: hikey9xx: hi6421v600-regulator: fix delay logic

2021-01-20 Thread Mauro Carvalho Chehab
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

Re: [PATCH v4 19/21] regulator: hi6421v600-regulator: move it from staging

2021-01-20 Thread Mark Brown
On Wed, Jan 20, 2021 at 12:02:44AM +0100, Mauro Carvalho Chehab wrote: > Mark Brown escreveu: > > Now that the driver has been converted to regmap these are just > > duplicates of the regmap helpers. You may also be able to use them for > > the disable() and is_enabled() operations, I didn't