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
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
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
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
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 +++--
>
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
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
>
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:
>
>
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
>
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
[]
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
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
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
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
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
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
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
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(+),
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:
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(-)
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 +++--
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:
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
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
- 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
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
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(+),
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
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
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
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
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
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
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
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
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
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
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
---
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
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
---
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
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
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
---
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
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
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
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(+)
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
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
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
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
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
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
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
>
> 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
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
56 matches
Mail list logo