Re: [PATCH 00/44] SPMI patches needed by Hikey 970

2020-08-12 Thread Joe Perches
On Wed, 2020-08-12 at 15:47 -0300, Mauro Carvalho Chehab wrote: > Em Wed, 12 Aug 2020 10:13:51 -0700 > Joe Perches escreveu: > > > Perhaps these trivial bits on top: > > Sounds fine for me. Feel free to send it with your SOB, adding my reviewed by: > > Reviewed-by: Mauro Carvalho Chehab I

Re: [PATCH 00/44] SPMI patches needed by Hikey 970

2020-08-12 Thread Mauro Carvalho Chehab
Em Wed, 12 Aug 2020 11:58:55 -0700 Joe Perches escreveu: > On Wed, 2020-08-12 at 15:47 -0300, Mauro Carvalho Chehab wrote: > > Em Wed, 12 Aug 2020 10:13:51 -0700 > > Joe Perches escreveu: > > > > > Perhaps these trivial bits on top: > > > > Sounds fine for me. Feel free to send it with

Re: [PATCH 06/44] staging: spmi: hisi-spmi-controller: use le32 macros where needed

2020-08-12 Thread Mauro Carvalho Chehab
Em Wed, 12 Aug 2020 09:21:54 -0700 Joe Perches escreveu: > On Wed, 2020-08-12 at 17:56 +0200, Mauro Carvalho Chehab wrote: > > Instead of manually using bswap_32(), just use the > > le32 macros. > > Are you certain this code will now work on any endian cpu? > > Maybe just use __swab32

Re: [PATCH 01/44] staging: spmi: add Hikey 970 SPMI controller driver

2020-08-12 Thread Mauro Carvalho Chehab
Em Wed, 12 Aug 2020 18:28:14 +0200 Greg Kroah-Hartman escreveu: > On Wed, Aug 12, 2020 at 05:56:11PM +0200, Mauro Carvalho Chehab wrote: > > From: Mayulong > > > > Add the SPMI controller code required to use the Kirin 970 > > SPMI bus. > > > > [mchehab+hua...@kernel.org: added just the SPMI

Re: [PATCH 00/44] SPMI patches needed by Hikey 970

2020-08-12 Thread Mauro Carvalho Chehab
Em Wed, 12 Aug 2020 10:13:51 -0700 Joe Perches escreveu: > Perhaps these trivial bits on top: Sounds fine for me. Feel free to send it with your SOB, adding my reviewed by: Reviewed-by: Mauro Carvalho Chehab > --- > drivers/staging/hikey9xx/hi6421-spmi-pmic.c | 5 +++-- >

Re: [PATCH 00/44] SPMI patches needed by Hikey 970

2020-08-12 Thread Joe Perches
Perhaps these trivial bits on top: --- drivers/staging/hikey9xx/hi6421-spmi-pmic.c | 5 +++-- drivers/staging/hikey9xx/hi6421v600-regulator.c | 6 +++--- drivers/staging/hikey9xx/hisi-spmi-controller.c | 21 + 3 files changed, 19 insertions(+), 13 deletions(-) diff

Re: [PATCH 06/44] staging: spmi: hisi-spmi-controller: use le32 macros where needed

2020-08-12 Thread Joe Perches
On Wed, 2020-08-12 at 17:56 +0200, Mauro Carvalho Chehab wrote: > Instead of manually using bswap_32(), just use the > le32 macros. Are you certain this code will now work on any endian cpu? Maybe just use __swab32 instead > diff --git a/drivers/staging/hikey9xx/hisi-spmi-controller.c >

Re: [PATCH 01/44] staging: spmi: add Hikey 970 SPMI controller driver

2020-08-12 Thread Greg Kroah-Hartman
On Wed, Aug 12, 2020 at 05:56:11PM +0200, Mauro Carvalho Chehab wrote: > From: Mayulong > > Add the SPMI controller code required to use the Kirin 970 > SPMI bus. > > [mchehab+hua...@kernel.org: added just the SPMI controller on this patch] > > The complete patch is at: > >

Re: [PATCH 10/44] staging: spmi: hisi-spmi-controller: do some code cleanups

2020-08-12 Thread Joe Perches
On Wed, 2020-08-12 at 17:56 +0200, Mauro Carvalho Chehab wrote: > There are several minor things that can be cleanup in > order to make this driver more prepared for leaving staging. trivial style notes: > diff --git a/drivers/staging/hikey9xx/hisi-spmi-controller.c >

Re: [PATCH 20/44] staging: mfd: hi6421-spmi-pmic: fix some coding style issues

2020-08-12 Thread Joe Perches
On Wed, 2020-08-12 at 17:56 +0200, Mauro Carvalho Chehab wrote: > Checkpatch complains about some minor issues inside this > driver that were not addressed by the previous patch. > > Address them. [] > diff --git a/include/linux/mfd/hi6421-spmi-pmic.h > b/include/linux/mfd/hi6421-spmi-pmic.h []

Re: [PATCH 35/44] staging: regulator: hi6421v600-regulator: add a driver-specific debug macro

2020-08-12 Thread Joe Perches
On Wed, 2020-08-12 at 17:56 +0200, Mauro Carvalho Chehab wrote: > Using dev_dbg() is not too nice, as, instead of printing the > name of the regulator, it prints "regulator.", making > harder to associate what is happening with each ldo line. > > So, add a debug-specific macro, which will print

[PATCH] staging: rtl8723bs: os_dep: fix function-name print using __func__

2020-08-12 Thread Mohammed Rushad
This patch to the os_intfs.c fixes the printing of function names using the preferred '"%s...", __func__' and alignment issues as pointed out by the checkpatch.pl tool. Signed-off-by: Mohammed Rushad --- drivers/staging/rtl8723bs/os_dep/os_intfs.c | 56 +++-- 1 file changed, 29

[PATCH 22/44] staging: mfd: hi6421-spmi-pmic: cleanup the code

2020-08-12 Thread Mauro Carvalho Chehab
There are several small cleanups that can be done in order to make the code more prepared to be upstreamed. Suggested-by: Jonathan Cameron Signed-off-by: Mauro Carvalho Chehab --- drivers/staging/hikey9xx/hi6421-spmi-pmic.c | 146 +--- include/linux/mfd/hi6421-spmi-pmic.h

[PATCH 31/44] staging: regulator: hi6421v600-regulator: better handle modes

2020-08-12 Thread Mauro Carvalho Chehab
Instead of implementing a custom set of properties, set valid_modes_mask based on having or not a mask for enabling the eco_mode. This makes the code clearer, and remove some uneeded props from DT. Signed-off-by: Mauro Carvalho Chehab --- .../staging/hikey9xx/hi6421v600-regulator.c | 32

[PATCH 14/44] staging: mfd: hi6421-spmi-pmic: get rid of the static vars

2020-08-12 Thread Mauro Carvalho Chehab
There are several static vars inside this driver. Get rid of them. While here, add a SPDX header file. Signed-off-by: Mauro Carvalho Chehab --- drivers/staging/hikey9xx/hi6421-spmi-pmic.c | 224 include/linux/mfd/hi6421-spmi-pmic.h| 20 +- 2 files changed, 97

[PATCH 12/44] staging: mfd: hi6421-spmi-pmic: get rid of unused code

2020-08-12 Thread Mauro Carvalho Chehab
There are some checks there which could make sense for downstream builds, but doesn't make much sense for upstream ones. They came from the official Hikey970 tree from Linaro, but even there, the commented-out code is not set via other Kconfig vars. So, let's just get rid of that. If needed

[PATCH 40/44] staging: regulator: hi6421v600-regulator: code cleanup

2020-08-12 Thread Mauro Carvalho Chehab
Do some code cleanup in order to make it cleaner for moving it out of staging in the future. Suggested-by: Jonathan Cameron Signed-off-by: Mauro Carvalho Chehab --- .../staging/hikey9xx/hi6421v600-regulator.c | 74 --- 1 file changed, 30 insertions(+), 44 deletions(-) diff

[PATCH 10/44] staging: spmi: hisi-spmi-controller: do some code cleanups

2020-08-12 Thread Mauro Carvalho Chehab
There are several minor things that can be cleanup in order to make this driver more prepared for leaving staging. Suggested-by: Jonathan Cameron Signed-off-by: Mauro Carvalho Chehab --- .../staging/hikey9xx/hisi-spmi-controller.c | 135 +++--- 1 file changed, 51 insertions(+),

[PATCH 23/44] staging: regulator: add a regulator driver for HiSilicon 6421v600 SPMI PMIC

2020-08-12 Thread Mauro Carvalho Chehab
From: Mayulong Add the regulator driver for the LDO lines provided by the HiSilicon 6421v600 SPMI PMIC device. [mchehab+hua...@kernel.org: keep just the regulator driver on this patch, renaming it to better fit at upstream namespace] The compete patch is at:

[PATCH 27/44] staging: regulator: hi6421v600-regulator: change the binding logic

2020-08-12 Thread Mauro Carvalho Chehab
Change the binding logic to ensure that the PMIC SPMI driver will run before the regulator code and add it to the building system. Signed-off-by: Mauro Carvalho Chehab --- .../staging/hikey9xx/hi6421v600-regulator.c | 186 +- 1 file changed, 91 insertions(+), 95 deletions(-)

[PATCH 19/44] staging: mfd: hi6421-spmi-pmic: change namespace on its functions

2020-08-12 Thread Mauro Carvalho Chehab
Rename the functions used internally inside the driver in order for them to follow the driver's name. While here, get rid of some unused definitions at the header file. Signed-off-by: Mauro Carvalho Chehab --- drivers/staging/hikey9xx/hi6421-spmi-pmic.c | 97 +++--

[PATCH 01/44] staging: spmi: add Hikey 970 SPMI controller driver

2020-08-12 Thread Mauro Carvalho Chehab
From: Mayulong Add the SPMI controller code required to use the Kirin 970 SPMI bus. [mchehab+hua...@kernel.org: added just the SPMI controller on this patch] The complete patch is at: https://github.com/96boards-hikey/linux/commit/08464419fba2 Signed-off-by: Mayulong Signed-off-by:

[PATCH 37/44] staging: regulator: hi6421v600-regulator: cleanup DT settings

2020-08-12 Thread Mauro Carvalho Chehab
Currently, an array is used to store both vsel and enable settings, mixing registers, masks and bit settings. Change it in order to have one separate property for each. This makes easier to understand the contents of the DT file, and to describe it at the Documentation/. Signed-off-by: Mauro

[PATCH 11/44] staging: mfd: add a PMIC driver for HiSilicon 6421 SPMI version

2020-08-12 Thread Mauro Carvalho Chehab
From: Mayulong Add the PMIC SPMI driver for the HiSilicon 6421v600. [mchehab+hua...@kernel.org: keep just the MFD driver on this patch, and renamed filenames to better match other upstream drivers] The compete patch is at: https://github.com/96boards-hikey/linux/commit/08464419fba2

[PATCH 29/44] staging: regulator: hi6421v600-regulator: cleanup debug messages

2020-08-12 Thread Mauro Carvalho Chehab
- use dev_foo() instead of pr_foo(); - cleanup the messages, making them more standard and easier to understand. Signed-off-by: Mauro Carvalho Chehab --- .../staging/hikey9xx/hi6421v600-regulator.c | 76 --- 1 file changed, 47 insertions(+), 29 deletions(-) diff --git

[PATCH 16/44] staging: mfd: hi6421-spmi-pmic: change the binding logic

2020-08-12 Thread Mauro Carvalho Chehab
Change the binding logic to ensure that the MFD driver will be load after having the SPMI controller registered. Signed-off-by: Mauro Carvalho Chehab --- drivers/staging/hikey9xx/hi6421-spmi-pmic.c | 84 +++-- 1 file changed, 29 insertions(+), 55 deletions(-) diff --git

[PATCH 30/44] staging: regulator: hi6421v600-regulator: use shorter names for OF properties

2020-08-12 Thread Mauro Carvalho Chehab
Simplify the names of the OF properties, in order to make them similar to other drivers and to make easier to understand what each property means. Signed-off-by: Mauro Carvalho Chehab --- .../staging/hikey9xx/hi6421v600-regulator.c | 52 --- 1 file changed, 21 insertions(+),

[PATCH 39/44] staging: regulator: hi6421v600-regulator: add it to the building system

2020-08-12 Thread Mauro Carvalho Chehab
Change the binding logic to ensure that the PMIC SPMI driver will run before the regulator code and add it to the building system. Signed-off-by: Mauro Carvalho Chehab --- drivers/staging/hikey9xx/Kconfig | 10 +- drivers/staging/hikey9xx/Makefile | 5 +++-- 2 files changed, 12

[PATCH 26/44] staging: regulator: hi6421v600-regulator: coding style fixups

2020-08-12 Thread Mauro Carvalho Chehab
There are several issues on those drivers related to their coding style. Solve most of them. Signed-off-by: Mauro Carvalho Chehab --- .../staging/hikey9xx/hi6421v600-regulator.c | 110 +- 1 file changed, 56 insertions(+), 54 deletions(-) diff --git

[PATCH 38/44] staging: regulator: hi6421v600-regulator: fix some coding style issues

2020-08-12 Thread Mauro Carvalho Chehab
Fix the remaining issues complained by checkpatch. Signed-off-by: Mauro Carvalho Chehab --- .../staging/hikey9xx/hi6421v600-regulator.c | 28 +-- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/drivers/staging/hikey9xx/hi6421v600-regulator.c

[PATCH 34/44] staging: regulator: hi6421v600-regulator: don't use usleep_range for off_on_delay

2020-08-12 Thread Mauro Carvalho Chehab
The regulator's core already handles it. Signed-off-by: Mauro Carvalho Chehab --- drivers/staging/hikey9xx/hi6421v600-regulator.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/staging/hikey9xx/hi6421v600-regulator.c b/drivers/staging/hikey9xx/hi6421v600-regulator.c index

[PATCH 32/44] staging: regulator: hi6421v600-regulator: change namespace

2020-08-12 Thread Mauro Carvalho Chehab
Rename the functions used internally inside the driver in order for them to follow the driver's name. While here, get rid of some unused definitions at the header file. Signed-off-by: Mauro Carvalho Chehab --- .../staging/hikey9xx/hi6421v600-regulator.c | 94 +-- 1 file

[PATCH 33/44] staging: regulator: hi6421v600-regulator: convert to use get/set voltage_sel

2020-08-12 Thread Mauro Carvalho Chehab
As the supported LDOs on this driver are all using a selector, change the implementation to use get_voltage_sel and set_voltage_sel ops. Signed-off-by: Mauro Carvalho Chehab --- .../staging/hikey9xx/hi6421v600-regulator.c | 58 +++ 1 file changed, 22 insertions(+), 36

[PATCH 04/44] staging: spmi: hisi-spmi-controller: fix a typo

2020-08-12 Thread Mauro Carvalho Chehab
chanel -> channel Signed-off-by: Mauro Carvalho Chehab --- drivers/staging/hikey9xx/hisi-spmi-controller.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/hikey9xx/hisi-spmi-controller.c b/drivers/staging/hikey9xx/hisi-spmi-controller.c index

[PATCH 07/44] staging: spmi: hisi-spmi-controller: add debug when values are read/write

2020-08-12 Thread Mauro Carvalho Chehab
It is interesting to be able to check if the driver is doing the right thing. So, add some debug macros to allow checking it. Signed-off-by: Mauro Carvalho Chehab --- drivers/staging/hikey9xx/hisi-spmi-controller.c | 15 --- 1 file changed, 12 insertions(+), 3 deletions(-) diff

[PATCH 35/44] staging: regulator: hi6421v600-regulator: add a driver-specific debug macro

2020-08-12 Thread Mauro Carvalho Chehab
Using dev_dbg() is not too nice, as, instead of printing the name of the regulator, it prints "regulator.", making harder to associate what is happening with each ldo line. So, add a debug-specific macro, which will print the rdev's name, just like the regulator core. Signed-off-by: Mauro

[PATCH 13/44] staging: mfd: hi6421-spmi-pmic: deal with non-static functions

2020-08-12 Thread Mauro Carvalho Chehab
Several functions aren't used outside the mfd driver. So, either remove or make them static. Signed-off-by: Mauro Carvalho Chehab --- drivers/staging/hikey9xx/hi6421-spmi-pmic.c | 147 1 file changed, 24 insertions(+), 123 deletions(-) diff --git

[PATCH 03/44] staging: spmi: hisi-spmi-controller: fix it to probe successfully

2020-08-12 Thread Mauro Carvalho Chehab
Add a MODULE_DEVICE_TABLE() to the driver. Also, the current logic calls platform_set_drvdata(pdev, NULL) if the driver succeeds loading. While here, remove the .owner, as it is not needed upstream anymore. Signed-off-by: Mauro Carvalho Chehab ---

[PATCH 21/44] staging: mfd: hi6421-spmi-pmic: add it to the building system

2020-08-12 Thread Mauro Carvalho Chehab
Now that the driver is ready, place it at the build system. Signed-off-by: Mauro Carvalho Chehab --- drivers/staging/hikey9xx/Kconfig | 17 + drivers/staging/hikey9xx/Makefile | 3 ++- 2 files changed, 19 insertions(+), 1 deletion(-) diff --git

[PATCH 08/44] staging: spmi: hisi-spmi-controller: fix the dev_foo() logic

2020-08-12 Thread Mauro Carvalho Chehab
Right now, driver is printing some messages as: [ 33.833026] (NULL device *): spmi_read_cmd: id:0 addr:0x17, read value: 00 This is because dev_foo() are not using a device with a name set. Change the logic for it to print it right. Signed-off-by: Mauro Carvalho Chehab ---

[PATCH 28/44] staging: regulator: hi6421v600-regulator: cleanup struct hisi_regulator

2020-08-12 Thread Mauro Carvalho Chehab
There are several fields on this struct that can be removed, as they already exists at struct regulator_desc. Remove them, cleaning up the code in the process. While here, rename it to hi6421v600_regulator_info, in order to better match the driver's name. Signed-off-by: Mauro Carvalho Chehab

[PATCH 41/44] staging: hikey9xx: add a TODO list

2020-08-12 Thread Mauro Carvalho Chehab
Place the things that are needed to be able to move those drivers out of staging. Signed-off-by: Mauro Carvalho Chehab --- drivers/staging/hikey9xx/TODO | 5 + 1 file changed, 5 insertions(+) create mode 100644 drivers/staging/hikey9xx/TODO diff --git a/drivers/staging/hikey9xx/TODO

[PATCH 17/44] staging: mfd: hi6421-spmi-pmic: get rid of unused OF properties

2020-08-12 Thread Mauro Carvalho Chehab
There are several OF properties that aren't used by Hikey 970, and some are not even used inside the driver. So, drop them, as as this makes easier to document what's actually used. If latter needed, those could be re-added later. Signed-off-by: Mauro Carvalho Chehab ---

[PATCH 09/44] staging: spmi: hisi-spmi-controller: add it to the building system

2020-08-12 Thread Mauro Carvalho Chehab
Now that the driver was ported to upstream, add it as a SPMI controller. Signed-off-by: Mauro Carvalho Chehab --- drivers/staging/Kconfig | 2 ++ drivers/staging/Makefile | 1 + drivers/staging/hikey9xx/Kconfig | 10 ++ drivers/staging/hikey9xx/Makefile | 3 +++ 4

[PATCH 18/44] staging: mfd: hi6421-spmi-pmic: cleanup OF properties

2020-08-12 Thread Mauro Carvalho Chehab
Simplify the names of the DT properties and do some cleanups, in order to better document them. Signed-off-by: Mauro Carvalho Chehab --- drivers/staging/hikey9xx/hi6421-spmi-pmic.c | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git

[PATCH 06/44] staging: spmi: hisi-spmi-controller: use le32 macros where needed

2020-08-12 Thread Mauro Carvalho Chehab
Instead of manually using bswap_32(), just use the le32 macros. Signed-off-by: Mauro Carvalho Chehab --- .../staging/hikey9xx/hisi-spmi-controller.c | 20 +++ 1 file changed, 7 insertions(+), 13 deletions(-) diff --git a/drivers/staging/hikey9xx/hisi-spmi-controller.c

[PATCH 36/44] staging: regulator: hi6421v600-regulator: initialize ramp_delay

2020-08-12 Thread Mauro Carvalho Chehab
Without that, the regulator's core complains with: ldo17: ramp_delay not set For now, use the enable time, as we don't have any datasheets from this device. Signed-off-by: Mauro Carvalho Chehab --- drivers/staging/hikey9xx/hi6421v600-regulator.c | 3 +++ 1 file changed, 3 insertions(+)

[PATCH 00/44] SPMI patches needed by Hikey 970

2020-08-12 Thread Mauro Carvalho Chehab
Hi Greg, This patch series is part of a work I'm doing in order to be able to support a HiKey 970 board that I recently got on my hands. I received some freedback from Mark and from Jonathan on a first attempt I made to upstream this. I'm opting to submit it via staging, because I had to start

[PATCH 24/44] staging: regulator: hi6421v600-regulator: get rid of unused code

2020-08-12 Thread Mauro Carvalho Chehab
Get rid of the sysfs code and other parts of the driver which aren't needed upstream. If needed later, this patch can be (partially?) reversed. Signed-off-by: Mauro Carvalho Chehab --- .../staging/hikey9xx/hi6421v600-regulator.c | 196 +- 1 file changed, 8 insertions(+), 188

[PATCH 25/44] staging: regulator: hi6421v600-regulator: port it to upstream

2020-08-12 Thread Mauro Carvalho Chehab
The driver was originally written for Kernel 4.9. It needs to be ported to upstream: - Got rid of timeval; - Removed a bogus dependency; - Did cleanups at the header file. Signed-off-by: Mauro Carvalho Chehab --- .../staging/hikey9xx/hi6421v600-regulator.c | 34

[PATCH 05/44] staging: spmi: hisi-spmi-controller: adjust whitespaces at defines

2020-08-12 Thread Mauro Carvalho Chehab
Some defines are not aligned with tab=8, which is the style defined on Linux. Adjust them. Signed-off-by: Mauro Carvalho Chehab --- .../staging/hikey9xx/hisi-spmi-controller.c | 26 ++- 1 file changed, 14 insertions(+), 12 deletions(-) diff --git

[PATCH 02/44] staging: spmi: hisi-spmi-controller: coding style fixup

2020-08-12 Thread Mauro Carvalho Chehab
In order to prepare for upstream, fix most coding style issues. Signed-off-by: Mauro Carvalho Chehab --- .../staging/hikey9xx/hisi-spmi-controller.c | 179 -- 1 file changed, 82 insertions(+), 97 deletions(-) diff --git a/drivers/staging/hikey9xx/hisi-spmi-controller.c

[PATCH 20/44] staging: mfd: hi6421-spmi-pmic: fix some coding style issues

2020-08-12 Thread Mauro Carvalho Chehab
Checkpatch complains about some minor issues inside this driver that were not addressed by the previous patch. Address them. Signed-off-by: Mauro Carvalho Chehab --- drivers/staging/hikey9xx/hi6421-spmi-pmic.c | 4 ++-- include/linux/mfd/hi6421-spmi-pmic.h| 3 ++- 2 files changed, 4

Re: [PATCH 0/3] Modernize tasklet callback API

2020-08-12 Thread Allen
Kees, > Was a Coccinelle script used for any of these conversions? I wonder if > it'd be easier to do a single treewide patch for the more mechanical > changes. No, I should have written one. Will do it. > And, actually, I still think the "prepare" patches should just be > collapsed into the

Re: [PATCH 0/3] Modernize tasklet callback API

2020-08-12 Thread Allen
> > I have a patch set to convert the remaining tasklet usage in sound > drivers to either the threaded IRQ or the work, but it wasn't > submitted / merged for 5.8 due to the obvious conflict with your API > changes. > Each conversion is rather simple, but it's always a question of the > nature of

Re: [PATCH 0/3] Modernize tasklet callback API

2020-08-12 Thread Takashi Iwai
On Tue, 11 Aug 2020 23:33:13 +0200, Kees Cook wrote: > > On Mon, Aug 03, 2020 at 02:16:15PM +0530, Allen wrote: > > Here's the series re-based on top of 5.8 > > https://github.com/allenpais/tasklets/tree/V3 > > Great! > > > Let me know how you would want these to be reviewed. > > Was a