[PATCH RESEND v10 07/11] device-mapping: Introduce DMA range map, supplanting dma_pfn_offset

2020-08-17 Thread Jim Quinlan
The new field 'dma_range_map' in struct device is used to facilitate the use of single or multiple offsets between mapping regions of cpu addrs and dma addrs. It subsumes the role of "dev->dma_pfn_offset" which was only capable of holding a single uniform offset and had no region bounds checking.

[PATCH RESEND v10 00/11] PCI: brcmstb: enable PCIe for STB chips

2020-08-17 Thread Jim Quinlan
Patchset Summary: Enhance a PCIe host controller driver. Because of its unusual design we are foced to change dev->dma_pfn_offset into a more general role allowing multiple offsets. See the 'v1' notes below for more info. v10: Commit: "device-mapping: Introduce DMA range map,

[PATCH] binder: Modify comments

2020-08-17 Thread hui yang
From: YangHui The function name should is binder_alloc_new_buf() Signed-off-by: YangHui --- drivers/android/binder_alloc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/android/binder_alloc.c b/drivers/android/binder_alloc.c index 6960969..8c98d12 100644 ---

Re: [PATCH] block: convert tasklets to use new tasklet_setup() API

2020-08-17 Thread Jens Axboe
On 8/17/20 12:48 PM, Kees Cook wrote: > On Mon, Aug 17, 2020 at 12:44:34PM -0700, Jens Axboe wrote: >> On 8/17/20 12:29 PM, Kees Cook wrote: >>> On Mon, Aug 17, 2020 at 06:56:47AM -0700, Jens Axboe wrote: On 8/17/20 2:15 AM, Allen Pais wrote: > From: Allen Pais > > In preparation

Re: [PATCH] block: convert tasklets to use new tasklet_setup() API

2020-08-17 Thread Jens Axboe
On 8/17/20 12:29 PM, Kees Cook wrote: > On Mon, Aug 17, 2020 at 06:56:47AM -0700, Jens Axboe wrote: >> On 8/17/20 2:15 AM, Allen Pais wrote: >>> From: Allen Pais >>> >>> In preparation for unconditionally passing the >>> struct tasklet_struct pointer to all tasklet >>> callbacks, switch to using

Re: [PATCH] block: convert tasklets to use new tasklet_setup() API

2020-08-17 Thread Kees Cook
On Mon, Aug 17, 2020 at 12:44:34PM -0700, Jens Axboe wrote: > On 8/17/20 12:29 PM, Kees Cook wrote: > > On Mon, Aug 17, 2020 at 06:56:47AM -0700, Jens Axboe wrote: > >> On 8/17/20 2:15 AM, Allen Pais wrote: > >>> From: Allen Pais > >>> > >>> In preparation for unconditionally passing the > >>>

Re: [PATCH] block: convert tasklets to use new tasklet_setup() API

2020-08-17 Thread Kees Cook
On Mon, Aug 17, 2020 at 06:56:47AM -0700, Jens Axboe wrote: > On 8/17/20 2:15 AM, Allen Pais wrote: > > From: Allen Pais > > > > In preparation for unconditionally passing the > > struct tasklet_struct pointer to all tasklet > > callbacks, switch to using the new tasklet_setup() > > and

Re: [PATCH] block: convert tasklets to use new tasklet_setup() API

2020-08-17 Thread Jens Axboe
On 8/17/20 2:15 AM, Allen Pais wrote: > From: Allen Pais > > In preparation for unconditionally passing the > struct tasklet_struct pointer to all tasklet > callbacks, switch to using the new tasklet_setup() > and from_tasklet() to pass the tasklet pointer explicitly. Who came up with the idea

Re: [PATCH 00/16] IOMMU driver for Kirin 960/970

2020-08-17 Thread Joerg Roedel
On Mon, Aug 17, 2020 at 12:53:45PM +0200, Greg Kroah-Hartman wrote: > You can always do this just fine, as one single patch. You do know > about the co-developed-by: line, right? Agreed. Please keep the main iommu driver in one patch and use co-developed-by. This makes it easier for me to review

Re: [PATCH] char: ipmi: convert tasklets to use new tasklet_setup() API

2020-08-17 Thread Corey Minyard
On Mon, Aug 17, 2020 at 02:45:57PM +0530, Allen Pais wrote: > From: Allen Pais > > In preparation for unconditionally passing the > struct tasklet_struct pointer to all tasklet > callbacks, switch to using the new tasklet_setup() > and from_tasklet() to pass the tasklet pointer explicitly. > >

Re: [PATCH 00/16] IOMMU driver for Kirin 960/970

2020-08-17 Thread Greg Kroah-Hartman
On Mon, Aug 17, 2020 at 12:46:17PM +0200, Mauro Carvalho Chehab wrote: > The main reason of submitting via staging is that I need to preserve > the patch that added this driver as-is, in order to preserve its > SoB and not causing legal issues. > > It it is OK for iommu to accept a submission

Re: [PATCH 00/16] IOMMU driver for Kirin 960/970

2020-08-17 Thread Mauro Carvalho Chehab
Em Mon, 17 Aug 2020 11:37:03 +0200 Greg Kroah-Hartman escreveu: > On Mon, Aug 17, 2020 at 11:27:25AM +0200, Mauro Carvalho Chehab wrote: > > Hi Christoph, > > > > Em Mon, 17 Aug 2020 09:21:06 +0100 > > Christoph Hellwig escreveu: > > > > > On Mon, Aug 17, 2020 at 09:49:59AM +0200, Mauro

Re: [PATCH 00/16] IOMMU driver for Kirin 960/970

2020-08-17 Thread Greg Kroah-Hartman
On Mon, Aug 17, 2020 at 11:27:25AM +0200, Mauro Carvalho Chehab wrote: > Hi Christoph, > > Em Mon, 17 Aug 2020 09:21:06 +0100 > Christoph Hellwig escreveu: > > > On Mon, Aug 17, 2020 at 09:49:59AM +0200, Mauro Carvalho Chehab wrote: > > > Add a driver for the Kirin 960/970 iommu. > > > > > >

Re: [PATCH 00/16] IOMMU driver for Kirin 960/970

2020-08-17 Thread Christoph Hellwig
On Mon, Aug 17, 2020 at 11:27:25AM +0200, Mauro Carvalho Chehab wrote: > I need to start from the original patch in order to preserve its > authorship. Nom you don't. We have plenty of example where people submit code written by other, especially when it is significantly reworked, > My plan is

Re: [PATCH 00/16] IOMMU driver for Kirin 960/970

2020-08-17 Thread Mauro Carvalho Chehab
Hi Christoph, Em Mon, 17 Aug 2020 09:21:06 +0100 Christoph Hellwig escreveu: > On Mon, Aug 17, 2020 at 09:49:59AM +0200, Mauro Carvalho Chehab wrote: > > Add a driver for the Kirin 960/970 iommu. > > > > As on the past series, this starts from the original 4.9 driver from > > the 96boards

[PATCH] platform: goldfish: convert tasklets to use new tasklet_setup() API

2020-08-17 Thread Allen Pais
From: Allen Pais In preparation for unconditionally passing the struct tasklet_struct pointer to all tasklet callbacks, switch to using the new tasklet_setup() and from_tasklet() to pass the tasklet pointer explicitly. Signed-off-by: Romain Perier Signed-off-by: Allen Pais ---

[PATCH] net: atm: convert tasklets callbacks to use from_tasklet()

2020-08-17 Thread Allen Pais
From: Allen Pais Update all the callbacks of all tasklets by using from_tasklet() and remove .data field. Signed-off-by: Romain Perier Signed-off-by: Allen Pais --- net/atm/pppoatm.c | 1 - 1 file changed, 1 deletion(-) diff --git a/net/atm/pppoatm.c b/net/atm/pppoatm.c index

[PATCH 1/2] misc: ibmvmc: convert tasklets to use new tasklet_setup() API

2020-08-17 Thread Allen Pais
From: Allen Pais In preparation for unconditionally passing the struct tasklet_struct pointer to all tasklet callbacks, switch to using the new tasklet_setup() and from_tasklet() to pass the tasklet pointer explicitly. Signed-off-by: Romain Perier Signed-off-by: Allen Pais ---

[PATCH 1/2] memstick: jmb38x: convert tasklets to use new tasklet_setup() API

2020-08-17 Thread Allen Pais
From: Allen Pais In preparation for unconditionally passing the struct tasklet_struct pointer to all tasklet callbacks, switch to using the new tasklet_setup() and from_tasklet() to pass the tasklet pointer explicitly. Signed-off-by: Romain Perier Signed-off-by: Allen Pais ---

[PATCH 1/2] hsi: nokia-modem: convert tasklets to use new tasklet_setup() API

2020-08-17 Thread Allen Pais
From: Allen Pais In preparation for unconditionally passing the struct tasklet_struct pointer to all tasklet callbacks, switch to using the new tasklet_setup() and from_tasklet() to pass the tasklet pointer explicitly. Signed-off-by: Romain Perier Signed-off-by: Allen Pais ---

[PATCH] firewire: ohci: convert tasklets to use new tasklet_setup() API

2020-08-17 Thread Allen Pais
From: Allen Pais In preparation for unconditionally passing the struct tasklet_struct pointer to all tasklet callbacks, switch to using the new tasklet_setup() and from_tasklet() to pass the tasklet pointer explicitly. Signed-off-by: Romain Perier Signed-off-by: Allen Pais ---

[PATCH 1/2] mailbox: bcm: convert tasklets to use new tasklet_setup() API

2020-08-17 Thread Allen Pais
From: Allen Pais In preparation for unconditionally passing the struct tasklet_struct pointer to all tasklet callbacks, switch to using the new tasklet_setup() and from_tasklet() to pass the tasklet pointer explicitly. Signed-off-by: Romain Perier Signed-off-by: Allen Pais ---

[PATCH] input: serio: convert tasklets to use new tasklet_setup() API

2020-08-17 Thread Allen Pais
From: Allen Pais In preparation for unconditionally passing the struct tasklet_struct pointer to all tasklet callbacks, switch to using the new tasklet_setup() and from_tasklet() to pass the tasklet pointer explicitly. Signed-off-by: Romain Perier Signed-off-by: Allen Pais ---

[PATCH] drivers: s390: convert tasklets to use new tasklet_setup() API

2020-08-17 Thread Allen Pais
From: Allen Pais In preparation for unconditionally passing the struct tasklet_struct pointer to all tasklet callbacks, switch to using the new tasklet_setup() and from_tasklet() to pass the tasklet pointer explicitly. Signed-off-by: Romain Perier Signed-off-by: Allen Pais ---

[PATCH] drivers: vme: convert tasklets to use new tasklet_setup() API

2020-08-17 Thread Allen Pais
From: Allen Pais In preparation for unconditionally passing the struct tasklet_struct pointer to all tasklet callbacks, switch to using the new tasklet_setup() and from_tasklet() to pass the tasklet pointer explicitly. Signed-off-by: Romain Perier Signed-off-by: Allen Pais ---

[PATCH] drivers: rapidio: convert tasklets to use new tasklet_setup() API

2020-08-17 Thread Allen Pais
From: Allen Pais In preparation for unconditionally passing the struct tasklet_struct pointer to all tasklet callbacks, switch to using the new tasklet_setup() and from_tasklet() to pass the tasklet pointer explicitly. Signed-off-by: Romain Perier Signed-off-by: Allen Pais ---

[PATCH] drm: i915: convert tasklets to use new tasklet_setup() API

2020-08-17 Thread Allen Pais
From: Allen Pais In preparation for unconditionally passing the struct tasklet_struct pointer to all tasklet callbacks, switch to using the new tasklet_setup() and from_tasklet() to pass the tasklet pointer explicitly and remove the .data field. Signed-off-by: Romain Perier Signed-off-by:

[PATCH] char: ipmi: convert tasklets to use new tasklet_setup() API

2020-08-17 Thread Allen Pais
From: Allen Pais In preparation for unconditionally passing the struct tasklet_struct pointer to all tasklet callbacks, switch to using the new tasklet_setup() and from_tasklet() to pass the tasklet pointer explicitly. Signed-off-by: Romain Perier Signed-off-by: Allen Pais ---

[PATCH] drivers: ntb: convert tasklets to use new tasklet_setup() API

2020-08-17 Thread Allen Pais
From: Allen Pais In preparation for unconditionally passing the struct tasklet_struct pointer to all tasklet callbacks, switch to using the new tasklet_setup() and from_tasklet() to pass the tasklet pointer explicitly. Signed-off-by: Romain Perier Signed-off-by: Allen Pais ---

[PATCH] block: convert tasklets to use new tasklet_setup() API

2020-08-17 Thread Allen Pais
From: Allen Pais In preparation for unconditionally passing the struct tasklet_struct pointer to all tasklet callbacks, switch to using the new tasklet_setup() and from_tasklet() to pass the tasklet pointer explicitly. Signed-off-by: Romain Perier Signed-off-by: Allen Pais ---

[PATCH] drivers: atm: convert tasklets to use new tasklet_setup() API

2020-08-17 Thread Allen Pais
From: Allen Pais In preparation for unconditionally passing the struct tasklet_struct pointer to all tasklet callbacks, switch to using the new tasklet_setup() and from_tasklet() to pass the tasklet pointer explicitly. Signed-off-by: Romain Perier Signed-off-by: Allen Pais ---

[PATCH] driver: hv: convert tasklets to use new tasklet_setup() API

2020-08-17 Thread Allen Pais
From: Allen Pais In preparation for unconditionally passing the struct tasklet_struct pointer to all tasklet callbacks, switch to using the new tasklet_setup() and from_tasklet() to pass the tasklet pointer explicitly. Signed-off-by: Romain Perier Signed-off-by: Allen Pais ---

[PATCH] arch: um: convert tasklets to use new tasklet_setup() API

2020-08-17 Thread Allen Pais
From: Allen Pais In preparation for unconditionally passing the struct tasklet_struct pointer to all tasklet callbacks, switch to using the new tasklet_setup() and from_tasklet() to pass the tasklet pointer explicitly. Signed-off-by: Romain Perier Signed-off-by: Allen Pais ---

Re: [PATCH 00/16] IOMMU driver for Kirin 960/970

2020-08-17 Thread Christoph Hellwig
On Mon, Aug 17, 2020 at 09:49:59AM +0200, Mauro Carvalho Chehab wrote: > Add a driver for the Kirin 960/970 iommu. > > As on the past series, this starts from the original 4.9 driver from > the 96boards tree: > > https://github.com/96boards-hikey/linux/tree/hikey970-v4.9 > > The remaining

[PATCH 01/16] iommu: add support for HiSilicon Kirin 960/970 iommu

2020-08-17 Thread Mauro Carvalho Chehab
From: Chenfeng Add the IOMMU code used on Hikey 960/970 and required for its DRM/KMS driver. [john.stu...@linaro.org: split out all the ion changes, and kept just the iommu bits] [mchehab+hua...@kernel.org: dropped ION and test code] Signed-off-by: Chenfeng Reviewed-by: Suzhuangluan

[PATCH 05/16] iommu: hisi_smmu: remove linux/hisi/hisi-iommu.h

2020-08-17 Thread Mauro Carvalho Chehab
Just move its contents into drivers/iommu/hisi_smmu.h. Signed-off-by: Mauro Carvalho Chehab --- drivers/staging/hikey9xx/hisi_smmu.h | 8 drivers/staging/hikey9xx/hisi_smmu_lpae.c | 1 - include/linux/hisi/hisi-iommu.h | 13 - 3 files changed, 8

[PATCH 09/16] iommu: hisi_smmu_lpae: use the right code to get domain-priv data

2020-08-17 Thread Mauro Carvalho Chehab
The downstream code needed to use a priv data within the domain struct. Change it to work like other iommu drivers: use dev_iommu_priv_get() and dev_iommu_priv_set() instead. Signed-off-by: Mauro Carvalho Chehab --- drivers/staging/hikey9xx/hisi_smmu.h | 17 --

[PATCH 06/16] iommu: hisilicon: cleanup its code style

2020-08-17 Thread Mauro Carvalho Chehab
Fix most of the things complained by checkpatch on strict mode: - Replaced BUG_ON to WARN_ON; - added SPDX headers; - adjusted alignments; - used --fix-inplace to solve other minor issues. Signed-off-by: Mauro Carvalho Chehab ---

[PATCH 02/16] iommu: hisilicon: remove default iommu_map_sg handler

2020-08-17 Thread Mauro Carvalho Chehab
The code there is just a copy of the default iommu sg handler. Well, callback fops was removed, as all iommu drivers are doing the same. Fixes: d88e61faad52 ("iommu: Remove the ->map_sg indirection") Signed-off-by: Mauro Carvalho Chehab --- drivers/staging/hikey9xx/hisi_smmu_lpae.c | 42

[PATCH 04/16] iommu: hisi_smmu_lpae: rebase it to work with upstream

2020-08-17 Thread Mauro Carvalho Chehab
Currently, this driver OOPSes. It turns that this driver needs to be updated in order to work with the current iommu kAPI. Signed-off-by: Mauro Carvalho Chehab --- drivers/staging/hikey9xx/hisi_smmu.h | 2 + drivers/staging/hikey9xx/hisi_smmu_lpae.c | 81 --- 2 files

[PATCH 00/16] IOMMU driver for Kirin 960/970

2020-08-17 Thread Mauro Carvalho Chehab
Add a driver for the Kirin 960/970 iommu. As on the past series, this starts from the original 4.9 driver from the 96boards tree: https://github.com/96boards-hikey/linux/tree/hikey970-v4.9 The remaining patches add SPDX headers and make it build and run with the upstream Kernel.

[PATCH 08/16] iommu: get rid of map/unmap tile functions

2020-08-17 Thread Mauro Carvalho Chehab
Those are needed by the ION-specific downstream code. Such code would require changes at the core iommu header file. As we won't be using the ION-specific binding, we can just get rid of those. Signed-off-by: Mauro Carvalho Chehab --- drivers/staging/hikey9xx/hisi_smmu_lpae.c | 201

[PATCH 10/16] iommu: hisi_smmu_lpae: convert it to probe_device

2020-08-17 Thread Mauro Carvalho Chehab
The add_device()/remove_device() was removed on Kernel 5.8. Convert the driver to use probe_device/release_device. Signed-off-by: Mauro Carvalho Chehab --- drivers/staging/hikey9xx/hisi_smmu_lpae.c | 31 +-- 1 file changed, 6 insertions(+), 25 deletions(-) diff --git

[PATCH 07/16] iommu: hisi_smmu_lpae: get rid of IOMMU_SEC and IOMMU_DEVICE

2020-08-17 Thread Mauro Carvalho Chehab
Those prot bits aren't needed for Hikey970's GPU code, and depends on some patch not on upstream. So, get rid of them. Signed-off-by: Mauro Carvalho Chehab --- drivers/staging/hikey9xx/hisi_smmu_lpae.c | 41 +-- 1 file changed, 15 insertions(+), 26 deletions(-) diff --git

[PATCH 16/16] staging: hikey9xx: add an item about the iommu driver

2020-08-17 Thread Mauro Carvalho Chehab
This driver doesn't use a too standard DT. Need to adjust it and the upcoming DRM driver who uses it, in order to do things on a more standard way. Signed-off-by: Mauro Carvalho Chehab --- drivers/staging/hikey9xx/TODO | 1 + 1 file changed, 1 insertion(+) diff --git

[PATCH 13/16] iommu: hisi_smmu_lpae: make OF compatible more standard

2020-08-17 Thread Mauro Carvalho Chehab
Use "manufacturer,model" pattern for the expected compatible string for this board. Most of compatible lines for Huawei's Hisilicon SoCs start with "hisilicon,". Use the same pattern here for this new driver. Signed-off-by: Mauro Carvalho Chehab --- drivers/staging/hikey9xx/hisi_smmu_lpae.c |

[PATCH 11/16] iommu: add Hisilicon Kirin970 iommu at the building system

2020-08-17 Thread Mauro Carvalho Chehab
Now that the iommu driver is ready, add it to the building system. Signed-off-by: Mauro Carvalho Chehab --- drivers/staging/hikey9xx/Kconfig | 9 + drivers/staging/hikey9xx/Makefile | 1 + 2 files changed, 10 insertions(+) diff --git a/drivers/staging/hikey9xx/Kconfig

[PATCH 03/16] iommu: hisilicon: map and unmap ops gained new arguments

2020-08-17 Thread Mauro Carvalho Chehab
As both map() and unmap() ops gained new arguments upstream, update their headers accordingly. Signed-off-by: Mauro Carvalho Chehab --- drivers/staging/hikey9xx/hisi_smmu_lpae.c | 11 ++- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git

[PATCH 12/16] iommu: hisi_smmu_lpae: cleanup printk macros

2020-08-17 Thread Mauro Carvalho Chehab
- Whenever possible, use dev_foo() instead of pr_foo(); - Replace dbg() macro by either pr_debug() or dev_dbg(); - Fix some warnings due to different integer types. - add debug at hisi_smmu_domain_alloc_lpae() to allow checking what domains were mapped. Signed-off-by: Mauro Carvalho Chehab ---

Re: [PATCH] staging: rtl8723bs: fix coding style

2020-08-17 Thread Greg KH
On Mon, Aug 17, 2020 at 06:15:20AM +, Injae Kang wrote: > Fix coding style of core/rtw_cmd.c > > Signed-off-by: Injae Kang > --- > drivers/staging/rtl8723bs/core/rtw_cmd.c | 168 +++ > 1 file changed, 79 insertions(+), 89 deletions(-) > Hi, This is the friendly

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

2020-08-17 Thread Greg Kroah-Hartman
On Mon, Aug 17, 2020 at 09:10:19AM +0200, Mauro Carvalho Chehab wrote: > 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. Do you feel this is good enough for me to add to my tree now? Or do you want me

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

2020-08-17 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 v3 24/44] staging: regulator: hi6421v600-regulator: get rid of unused code

2020-08-17 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 v3 40/44] staging: regulator: hi6421v600-regulator: code cleanup

2020-08-17 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 | 80 --- 1 file changed, 33 insertions(+), 47 deletions(-) diff

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

2020-08-17 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 v3 30/44] staging: regulator: hi6421v600-regulator: use shorter names for OF properties

2020-08-17 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 v3 35/44] staging: regulator: hi6421v600-regulator: add a driver-specific debug macro

2020-08-17 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 v3 02/44] staging: spmi: hisi-spmi-controller: coding style fixup

2020-08-17 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 v3 20/44] staging: mfd: hi6421-spmi-pmic: fix some coding style issues

2020-08-17 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| 2 +- 2 files changed, 3

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

2020-08-17 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 | 150 +++--- 1 file changed, 61 insertions(+),

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

2020-08-17 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 v3 32/44] staging: regulator: hi6421v600-regulator: change namespace

2020-08-17 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 v3 05/44] staging: spmi: hisi-spmi-controller: adjust whitespaces at defines

2020-08-17 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 v3 37/44] staging: regulator: hi6421v600-regulator: cleanup DT settings

2020-08-17 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 v3 11/44] staging: mfd: add a PMIC driver for HiSilicon 6421 SPMI version

2020-08-17 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 v3 19/44] staging: mfd: hi6421-spmi-pmic: change namespace on its functions

2020-08-17 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 v3 08/44] staging: spmi: hisi-spmi-controller: fix the dev_foo() logic

2020-08-17 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 v3 29/44] staging: regulator: hi6421v600-regulator: cleanup debug messages

2020-08-17 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 v3 27/44] staging: regulator: hi6421v600-regulator: change the binding logic

2020-08-17 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 v3 26/44] staging: regulator: hi6421v600-regulator: coding style fixups

2020-08-17 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 v3 16/44] staging: mfd: hi6421-spmi-pmic: change the binding logic

2020-08-17 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 v3 13/44] staging: mfd: hi6421-spmi-pmic: deal with non-static functions

2020-08-17 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 v3 25/44] staging: regulator: hi6421v600-regulator: port it to upstream

2020-08-17 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 v3 12/44] staging: mfd: hi6421-spmi-pmic: get rid of unused code

2020-08-17 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 v3 03/44] staging: spmi: hisi-spmi-controller: fix it to probe successfully

2020-08-17 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 v3 22/44] staging: mfd: hi6421-spmi-pmic: cleanup the code

2020-08-17 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 | 151 +--- include/linux/mfd/hi6421-spmi-pmic.h

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

2020-08-17 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 v3 23/44] staging: regulator: add a regulator driver for HiSilicon 6421v600 SPMI PMIC

2020-08-17 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 v3 21/44] staging: mfd: hi6421-spmi-pmic: add it to the building system

2020-08-17 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 v3 04/44] staging: spmi: hisi-spmi-controller: fix a typo

2020-08-17 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 v3 06/44] staging: spmi: hisi-spmi-controller: use le32 macros where needed

2020-08-17 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 v3 33/44] staging: regulator: hi6421v600-regulator: convert to use get/set voltage_sel

2020-08-17 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 v3 39/44] staging: regulator: hi6421v600-regulator: add it to the building system

2020-08-17 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 v3 00/44] SPMI patches needed by Hikey 970

2020-08-17 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. Regards, Mauro. v1: submitted to drivers/{mfd,spmi,regulator} v2: - submitted via staging, mainly to preserve original authorship and his SoB; -

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

2020-08-17 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 v3 09/44] staging: spmi: hisi-spmi-controller: add it to the building system

2020-08-17 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 v3 31/44] staging: regulator: hi6421v600-regulator: better handle modes

2020-08-17 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 v3 18/44] staging: mfd: hi6421-spmi-pmic: cleanup OF properties

2020-08-17 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 v3 07/44] staging: spmi: hisi-spmi-controller: add debug when values are read/write

2020-08-17 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 v3 38/44] staging: regulator: hi6421v600-regulator: fix some coding style issues

2020-08-17 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 v3 01/44] staging: spmi: add Hikey 970 SPMI controller driver

2020-08-17 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 v3 34/44] staging: regulator: hi6421v600-regulator: don't use usleep_range for off_on_delay

2020-08-17 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] staging: rtl8723bs: fix coding style

2020-08-17 Thread Injae Kang
Fix coding style of core/rtw_cmd.c Signed-off-by: Injae Kang --- drivers/staging/rtl8723bs/core/rtw_cmd.c | 168 +++ 1 file changed, 79 insertions(+), 89 deletions(-) diff --git a/drivers/staging/rtl8723bs/core/rtw_cmd.c b/drivers/staging/rtl8723bs/core/rtw_cmd.c index