Re: [PATCH v4 4/6] drm/sprd: add Unisoc's drm display controller driver

2021-04-07 Thread Chunyan Zhang
On Wed, 7 Apr 2021 at 18:45, Maxime Ripard wrote: > > Hi, > > Adding Jörg, Will and Robin, You forgot to add them actually :) I've added Robin and Joerg. > > On Wed, Mar 31, 2021 at 09:21:19AM +0800, Kevin Tang wrote: > > > > +static u32 check_mmu_isr(struct sprd_dpu *dpu, u32 reg_val) > > > >

[PATCH] iommu: sprd: Fix parameter type warning

2021-03-30 Thread Chunyan Zhang
From: Chunyan Zhang The second parameter of clk_get_optional() is "const char *", so use NULL instead of integer 0 to fix a sparse warning like: ">> drivers/iommu/sprd-iommu.c:456:42: sparse: sparse: Using plain integer as NULL pointer" Also this patch changes t

Re: [RESEND PATCH V6 2/2] PCI: sprd: Add support for Unisoc SoCs' PCIe controller

2021-03-25 Thread Chunyan Zhang
Hi Bjorn, On Wed, 24 Mar 2021 at 04:30, Bjorn Helgaas wrote: > > On Mon, Mar 22, 2021 at 05:18:31PM +0800, Chunyan Zhang wrote: > > From: Hongtao Wu > > > > This series adds PCIe controller driver for Unisoc SoCs. > > This controller is based on DesignWa

[RESEND PATCH V6 2/2] PCI: sprd: Add support for Unisoc SoCs' PCIe controller

2021-03-22 Thread Chunyan Zhang
From: Hongtao Wu This series adds PCIe controller driver for Unisoc SoCs. This controller is based on DesignWare PCIe IP. Signed-off-by: Hongtao Wu Signed-off-by: Chunyan Zhang --- drivers/pci/controller/dwc/Kconfig | 12 + drivers/pci/controller/dwc/Makefile| 1 + drivers/pci

[RESEND PATCH V6 1/2] dt-bindings: PCI: sprd: Document Unisoc PCIe RC host controller

2021-03-22 Thread Chunyan Zhang
From: Hongtao Wu This series adds PCIe bindings for Unisoc SoCs. This controller is based on DesignWare PCIe IP. Reviewed-by: Rob Herring Signed-off-by: Hongtao Wu Signed-off-by: Chunyan Zhang --- .../devicetree/bindings/pci/sprd-pcie.yaml| 93 +++ 1 file changed, 93

[RESEND PATCH V6 0/2] PCI: Add new Unisoc PCIe driver

2021-03-22 Thread Chunyan Zhang
From: Chunyan Zhang This series adds PCIe controller driver for Unisoc SoCs. This controller is based on DesignWare PCIe IP. This RESEND patch set V6 is based on v5.12-rc4. Changes since v5: * Change "GPL v2" to "GPL". * Remove exit_p wrapper which used to define remov

[PATCH v5 2/2] iommu: add Unisoc IOMMU basic driver

2021-03-05 Thread Chunyan Zhang
From: Chunyan Zhang This IOMMU module can be used by Unisoc's multimedia devices, such as display, Image codec(jpeg) and a few signal processors, including VSP(video), GSP(graphic), ISP(image), and CPP(camera pixel processor), etc. Signed-off-by: Chunyan Zhang --- drivers/iommu/Kconfig

[PATCH v5 1/2] dt-bindings: iommu: add bindings for sprd IOMMU

2021-03-05 Thread Chunyan Zhang
From: Chunyan Zhang This IOMMU module can be used by Unisoc's multimedia devices, such as display, Image codec(jpeg) and a few signal processors, including VSP(video), GSP(graphic), ISP(image), and CPP(camera pixel processor), etc. Signed-off-by: Chunyan Zhang --- .../devicetree/bindings

[PATCH v5 0/2] Add Unisoc IOMMU basic driver

2021-03-05 Thread Chunyan Zhang
From: Chunyan Zhang Changes since v4 (https://lkml.org/lkml/2021/2/4/85): * Rebased on v5.12-rc1; * Dropped using syscon node for mapping registers according to Rob's comments. Changes since v3 (https://lkml.org/lkml/2021/2/3/161): * Rebased on iommu/next, and fixed compile error reported

Re: [PATCH v3 1/2] dt-bindings: iommu: add bindings for sprd iommu

2021-03-03 Thread Chunyan Zhang
Hi Robin, On Tue, 16 Feb 2021 at 23:10, Robin Murphy wrote: > > >>> > >>> On Wed, Feb 03, 2021 at 05:07:26PM +0800, Chunyan Zhang wrote: > >>>> From: Chunyan Zhang > >>>> > >>>> This iommu module can be used by Unisoc's

Re: [PATCH v3 1/2] dt-bindings: iommu: add bindings for sprd iommu

2021-02-25 Thread Chunyan Zhang
On Tue, 16 Feb 2021 at 23:10, Robin Murphy wrote: > > On 2021-02-10 19:21, Rob Herring wrote: > > On Fri, Feb 5, 2021 at 1:21 AM Chunyan Zhang wrote: > >> > >> Hi Rob, > >> > >> On Fri, 5 Feb 2021 at 07:25, Rob Herring wrote: > >>> &

Re: [PATCH v3 1/2] dt-bindings: iommu: add bindings for sprd iommu

2021-02-25 Thread Chunyan Zhang
On Thu, 11 Feb 2021 at 03:21, Rob Herring wrote: > > On Fri, Feb 5, 2021 at 1:21 AM Chunyan Zhang wrote: > > > > Hi Rob, > > > > On Fri, 5 Feb 2021 at 07:25, Rob Herring wrote: > > > > > > On Wed, Feb 03, 2021 at 05:07:26PM +0800,

Re: [PATCH v3 1/2] dt-bindings: iommu: add bindings for sprd iommu

2021-02-04 Thread Chunyan Zhang
Hi Rob, On Fri, 5 Feb 2021 at 07:25, Rob Herring wrote: > > On Wed, Feb 03, 2021 at 05:07:26PM +0800, Chunyan Zhang wrote: > > From: Chunyan Zhang > > > > This iommu module can be used by Unisoc's multimedia devices, such as > > display, Image codec(jpeg) and a fe

[PATCH] mailbox: sprd: correct definition of SPRD_OUTBOX_FIFO_FULL

2021-02-04 Thread Chunyan Zhang
From: Magnum Shan According to the specification, bit[2] represents SPRD_OUTBOX_FIFO_FULL, not bit[0], so correct it. Fixes: ca27fc26cd22 ("mailbox: sprd: Add Spreadtrum mailbox driver") Signed-off-by: Magnum Shan Signed-off-by: Chunyan Zhang --- drivers/mailbox/sprd-mailbox.c | 2

[PATCH v4 2/2] iommu: add Unisoc IOMMU basic driver

2021-02-03 Thread Chunyan Zhang
From: Chunyan Zhang This IOMMU module can be used by Unisoc's multimedia devices, such as display, Image codec(jpeg) and a few signal processors, including VSP(video), GSP(graphic), ISP(image), and CPP(camera pixel processor), etc. Signed-off-by: Chunyan Zhang --- drivers/iommu/Kconfig

[PATCH v4 1/2] dt-bindings: iommu: add bindings for sprd IOMMU

2021-02-03 Thread Chunyan Zhang
From: Chunyan Zhang This IOMMU module can be used by Unisoc's multimedia devices, such as display, Image codec(jpeg) and a few signal processors, including VSP(video), GSP(graphic), ISP(image), and CPP(camera pixel processor), etc. Signed-off-by: Chunyan Zhang --- .../devicetree/bindings

[PATCH v4 0/2] Add Unisoc IOMMU basic driver

2021-02-03 Thread Chunyan Zhang
From: Chunyan Zhang Changes since v3: * Rebased on iommu/next, and fixed compile error reported by kernel test robot ; * %s/iommu/IOMMU/ properly in the whole patchset. Changes since v2: * Added a WARN and return 0 if an invalid iova was passed to sprd_iommu_iova_to_phys(); * Changed the name

Re: [PATCH v3 2/2] iommu: add Unisoc iommu basic driver

2021-02-03 Thread Chunyan Zhang
On Thu, 4 Feb 2021 at 01:44, Randy Dunlap wrote: > > On 2/3/21 1:07 AM, Chunyan Zhang wrote: > > diff --git a/drivers/iommu/Kconfig b/drivers/iommu/Kconfig > > index 192ef8f61310..99e7712f3903 100644 > > --- a/drivers/iommu/Kconfig > > +++ b/drivers/iommu/Kconfig &

[PATCH v3 2/2] iommu: add Unisoc iommu basic driver

2021-02-03 Thread Chunyan Zhang
From: Chunyan Zhang This iommu module can be used by Unisoc's multimedia devices, such as display, Image codec(jpeg) and a few signal processors, including VSP(video), GSP(graphic), ISP(image), and CPP(camera pixel processor), etc. Signed-off-by: Chunyan Zhang --- drivers/iommu/Kconfig

[PATCH v3 1/2] dt-bindings: iommu: add bindings for sprd iommu

2021-02-03 Thread Chunyan Zhang
From: Chunyan Zhang This iommu module can be used by Unisoc's multimedia devices, such as display, Image codec(jpeg) and a few signal processors, including VSP(video), GSP(graphic), ISP(image), and CPP(camera pixel processor), etc. Signed-off-by: Chunyan Zhang --- .../devicetree/bindings

[PATCH v3 0/2] Add Unisoc iommu basic driver

2021-02-03 Thread Chunyan Zhang
From: Chunyan Zhang Changes since v2: * Added a WARN and return 0 if an invalid iova was passed to sprd_iommu_iova_to_phys(); * Changed the name of sprd_iommu_write(); * Revised CONFIG_SPRD_IOMMU help graph in Kconfig. * Revised comments for the struct sprd_iommu_device; * Converted to use &quo

Re: [PATCH 2/2] iommu: add Unisoc iommu basic driver

2021-02-02 Thread Chunyan Zhang
On Wed, 3 Feb 2021 at 02:02, Robin Murphy wrote: > > On 2021-02-02 14:41, Joerg Roedel wrote: > > On Tue, Feb 02, 2021 at 02:34:34PM +, Robin Murphy wrote: > >> Nope, I believe if Arm Ltd. had any involvement in this I'd know about it > >> :) > > > > Okay, got confused by thinking of ARM as

Re: [PATCH 2/2] iommu: add Unisoc iommu basic driver

2021-02-02 Thread Chunyan Zhang
On Tue, 2 Feb 2021 at 22:14, Joerg Roedel wrote: > > On Tue, Feb 02, 2021 at 06:42:57PM +0800, Chunyan Zhang wrote: > > +static phys_addr_t sprd_iommu_iova_to_phys(struct iommu_domain *domain, > > +dma_addr_t iova) > > +{ > >

[PATCH 2/2] iommu: add Unisoc iommu basic driver

2021-02-02 Thread Chunyan Zhang
From: Chunyan Zhang This iommu module can be used by Unisoc's multimedia devices, such as display, Image codec(jpeg) and a few signal processors, including VSP(video), GSP(graphic), ISP(image), and CPP(camera pixel processor), etc. Signed-off-by: Chunyan Zhang --- drivers/iommu/Kconfig

[PATCH v2 1/2] dt-bindings: iommu: add bindings for sprd iommu

2021-02-01 Thread Chunyan Zhang
From: Chunyan Zhang This iommu module can be used by Unisoc's multimedia devices, such as display, Image codec(jpeg) and a few signal processors, including VSP(video), GSP(graphic), ISP(image), and CPP(camera pixel processor), etc. Signed-off-by: Chunyan Zhang --- .../devicetree/bindings

[PATCH v2 2/2] iommu: add Unisoc iommu basic driver

2021-02-01 Thread Chunyan Zhang
From: Chunyan Zhang This iommu module can be used by Unisoc's multimedia devices, such as display, Image codec(jpeg) and a few signal processors, including VSP(video), GSP(graphic), ISP(image), and CPP(camera pixel processor), etc. Signed-off-by: Chunyan Zhang --- drivers/iommu/Kconfig

[PATCH v2 0/2] Add Unisoc iommu basic driver

2021-02-01 Thread Chunyan Zhang
From: Chunyan Zhang Changes since v1: * Fixed compile errors reported by kernel test robot . * Changed to use syscon to get mapped registers for iommu and media devices to avoid double map issue. * Addressed Robin's comments: - Added including offset in the returned physical address

Re: [PATCH v1 2/2] iommu: add Unisoc iommu basic driver

2021-01-27 Thread Chunyan Zhang
On Fri, 22 Jan 2021 at 05:46, Robin Murphy wrote: > > On 2021-01-21 11:23, Chunyan Zhang wrote: > > From: Chunyan Zhang > > > > This patch only adds display iommu support, the driver was tested with sprd > > dpu and image codec processor. > > > > The io

[PATCH v1 2/2] iommu: add Unisoc iommu basic driver

2021-01-21 Thread Chunyan Zhang
From: Chunyan Zhang This patch only adds display iommu support, the driver was tested with sprd dpu and image codec processor. The iommu support for others would be added once finished tests with those devices, such as a few signal processors, including VSP(video), GSP(graphic), ISP(image

[PATCH v1 0/2] Add Unisoc iommu basic driver

2021-01-21 Thread Chunyan Zhang
From: Chunyan Zhang Changes since RFC v2: * Addressed Robin's comments: - Add COMPILE_TEST support; - Use DMA allocator for PTE; - Revised to avoid resource leak issue; - Added ->iotlb_sync implemented; - Moved iommu group allocation to probe; - Changed some function names to make them s

[PATCH v1 1/2] dt-bindings: iommu: add bindings for sprd iommu

2021-01-21 Thread Chunyan Zhang
From: Chunyan Zhang This patch adds bindings to support display and Image codec(jpeg) iommu instance. The iommu support for others would be added once finished tests with those devices, such as a few signal processors, including VSP(video), GSP(graphic), ISP(image), and camera CPP, etc. Signed

Re: [RFC PATCH 1/2] dt-bindings: iommu: add bindings for sprd iommu

2021-01-21 Thread Chunyan Zhang
On Wed, 13 Jan 2021 at 21:47, Rob Herring wrote: > > On Fri, Jan 8, 2021 at 5:34 AM Chunyan Zhang wrote: > > > > On Fri, 8 Jan 2021 at 10:25, Rob Herring wrote: > > > > > > On Wed, Dec 23, 2020 at 07:16:32PM +0800, Chunyan Zhang wrote: > > > >

Re: [RFC PATCH V2 2/2] iommu: add Unisoc iommu basic driver

2021-01-20 Thread Chunyan Zhang
On Wed, 20 Jan 2021 at 20:29, Robin Murphy wrote: > > On 2021-01-20 11:40, Chunyan Zhang wrote: > [...] > >>> + pgt_base_iova = dom->pgt_va + > >>> + ((iova - mdata->iova_start) >> SPRD_IOMMU_PAGE_SHIFT); > >>> + > >

Re: [RFC PATCH V2 2/2] iommu: add Unisoc iommu basic driver

2021-01-20 Thread Chunyan Zhang
Hi Robin, On Wed, 13 Jan 2021 at 03:10, Robin Murphy wrote: > > On 2021-01-08 11:38, Chunyan Zhang wrote: > > From: Chunyan Zhang > > > > This patch only adds display iommu support, the driver was tested with sprd > > dpu. > > > > The iommu support for

Re: [PATCH] coresight: etm4x: add AMBA id for Cortex-A55 and Cortex-A75

2021-01-17 Thread Chunyan Zhang
On Fri, 15 Jan 2021 at 18:18, Mike Leach wrote: > > Hi Chunyan, > > On Fri, 15 Jan 2021 at 08:39, Chunyan Zhang wrote: > > > > From: Bin Ji > > > > Add ETM amba id to support Cortex-A55(Ananke) and Cortex-A75(Promethus). > > > > Signed-

[PATCH V2] coresight: etm4x: add AMBA id for Cortex-A55 and Cortex-A75

2021-01-17 Thread Chunyan Zhang
From: Chunyan Zhang Add AMBA UCI id to support Cortex-A55(Ananke) and Cortex-A75(Promethus). Signed-off-by: Bin Ji Signed-off-by: Chunyan Zhang --- Changes since v1: * Addressed Mike's comments - changed to use CS_AMBA_UCI_ID(). --- drivers/hwtracing/coresight/coresight-etm4x-core.c | 2

[PATCH] coresight: etm4x: add AMBA id for Cortex-A55 and Cortex-A75

2021-01-15 Thread Chunyan Zhang
From: Bin Ji Add ETM amba id to support Cortex-A55(Ananke) and Cortex-A75(Promethus). Signed-off-by: Bin Ji Signed-off-by: Chunyan Zhang --- drivers/hwtracing/coresight/coresight-etm4x-core.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/hwtracing/coresight/coresight-etm4x

[RFC PATCH V2 2/2] iommu: add Unisoc iommu basic driver

2021-01-08 Thread Chunyan Zhang
From: Chunyan Zhang This patch only adds display iommu support, the driver was tested with sprd dpu. The iommu support for others would be added once finished tests with those devices, such as Image codec(jpeg) processor, a few signal processors, including VSP(video), GSP(graphic), ISP(image

[RFC PATCH V2 0/2] Add Unisoc iommu basic driver

2021-01-08 Thread Chunyan Zhang
From: Chunyan Zhang Changes since RFC v1: * Rebased on v5.11-rc1; * Changed sprd-iommu to tristate; * Removed check for args_count of iommu OF node, since there's no args for sprd-iommu device node; * Added another IP version (i.e. vau); * Removed unnecessary configs selection from

[RFC PATCH V2 1/2] dt-bindings: iommu: add bindings for sprd iommu

2021-01-08 Thread Chunyan Zhang
From: Chunyan Zhang This patch only adds bindings to support display iommu. The iommu support for others would be added once finished tests with those devices, such as Image codec(jpeg) processor, a few signal processors, including VSP(video), GSP(graphic), ISP(image), and camera CPP, etc

Re: [RFC PATCH 1/2] dt-bindings: iommu: add bindings for sprd iommu

2021-01-08 Thread Chunyan Zhang
On Fri, 8 Jan 2021 at 10:25, Rob Herring wrote: > > On Wed, Dec 23, 2020 at 07:16:32PM +0800, Chunyan Zhang wrote: > > From: Chunyan Zhang > > > > This patch only adds bindings to support display iommu, support for others > > would be added once finished tests wit

Re: [PATCH v2] i2c: sprd: use a specific timeout to avoid system hang up issue

2021-01-04 Thread Chunyan Zhang
On Tue, 5 Jan 2021 at 02:24, Wolfram Sang wrote: > > On Mon, Dec 14, 2020 at 12:58:50PM +0800, Chunyan Zhang wrote: > > From: Chunyan Zhang > > > > If the i2c device SCL bus being pulled up due to some exception before > > message transfer done, the system cannot re

[RFC PATCH 2/2] iommu: add Unisoc iommu basic driver

2020-12-23 Thread Chunyan Zhang
From: Chunyan Zhang This patch only adds display iommu support, the driver was tested with sprd dpu. The iommu support for others would be added once finished tests with those devices, such as Image codec(jpeg) processor, a few signal processors, including VSP(video), GSP(graphic), ISP(image

[RFC PATCH 1/2] dt-bindings: iommu: add bindings for sprd iommu

2020-12-23 Thread Chunyan Zhang
From: Chunyan Zhang This patch only adds bindings to support display iommu, support for others would be added once finished tests with those devices, such as Image codec(jpeg) processor, a few signal processors, including VSP(video), GSP(graphic), ISP(image), and camera CPP, etc. Signed-off

[PATCH v2] i2c: sprd: use a specific timeout to avoid system hang up issue

2020-12-13 Thread Chunyan Zhang
From: Chunyan Zhang If the i2c device SCL bus being pulled up due to some exception before message transfer done, the system cannot receive the completing interrupt signal any more, it would not exit waiting loop until MAX_SCHEDULE_TIMEOUT jiffies eclipse, that would make the system seemed hang

[PATCH] i2c: sprd: use a specific timeout to avoid system hang up issue

2020-12-11 Thread Chunyan Zhang
From: Chunyan Zhang If the i2c device SCL bus being pulled up due to some exception before message transfer done, the system cannot receive the completing interrupt signal any more, it would not exit waiting loop until MAX_SCHEDULE_TIMEOUT jiffies eclipse, that would make the system seemed hang

[PATCH] gpio: eic-sprd: break loop when getting NULL device resource

2020-12-08 Thread Chunyan Zhang
From: Chunyan Zhang EIC controller have unfixed numbers of banks on different Spreadtrum SoCs, and each bank has its own base address, the loop of getting there base address in driver should break if the resource gotten via platform_get_resource() is NULL already. The later ones would be all

Re: [PATCH 1/2] mmc: sdhci-sprd: drop of_match_ptr from of_device_id table

2020-11-22 Thread Chunyan Zhang
es > compile warning (!CONFIG_OF on x86_64): > > drivers/mmc/host/sdhci-sprd.c:723:34: warning: > ‘sdhci_sprd_of_match’ defined but not used [-Wunused-const-variable=] > > Reported-by: kernel test robot > Signed-off-by: Krzysztof Kozlowski Acked-by: Chunyan Zhang

Re: [PATCH] rtc: sc27xx: Always read normal alarm

2020-11-17 Thread Chunyan Zhang
ne nit suggestion: add a comma before "a .read_alarm is ..." > to false. > > Signed-off-by: Alexandre Belloni Reviewed-by: Chunyan Zhang Cheers, Chunyan > --- > drivers/rtc/rtc-sc27xx.c | 38 ++ > 1 file changed, 2 insertions(+), 36 del

[PATCH v2 1/3] input: sc27xx: Add support for sc2730 and sc2721

2020-11-16 Thread Chunyan Zhang
From: Nemo Han Add new compatible strings and match data to support sc2730 and sc2721 which are two varieties of SC27XX family. Signed-off-by: Nemo Han Signed-off-by: Chunyan Zhang --- drivers/input/misc/sc27xx-vibra.c | 64 ++- 1 file changed, 54 insertions

[PATCH v2 3/3] dt-bindings: input: Add compatible string for SC2721 and SC2730

2020-11-16 Thread Chunyan Zhang
From: Chunyan Zhang Add new compatible strings to support sc2730 and sc2721 which are two varieties of SC27XX family. Signed-off-by: Chunyan Zhang --- .../devicetree/bindings/input/sprd,sc27xx-vibrator.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Documentation/devicetree

[PATCH v2 0/3] Add support for sc2730 and sc2721

2020-11-16 Thread Chunyan Zhang
This patchset add new compatible strings and match data to support sc2730 and sc2721, also convert the bindings to yaml schema. Changes since v1: * fixed the error when running dt_binding_check; Chunyan Zhang (2): dt-bindings: input: Convert sc27xx-vibra.txt to json-schema dt-bindings

[PATCH v2 2/3] dt-bindings: input: Convert sc27xx-vibra.txt to json-schema

2020-11-16 Thread Chunyan Zhang
From: Chunyan Zhang Convert the sprd sc27xx vibrator binding to DT schema using json-schema. Signed-off-by: Chunyan Zhang --- .../bindings/input/sprd,sc27xx-vibra.txt | 23 -- .../bindings/input/sprd,sc27xx-vibrator.yaml | 46 +++ 2 files changed, 46 insertions

Re: [PATCH 2/3] dt-bindings: input: Convert sc27xx-vibra.txt to json-schema

2020-11-16 Thread Chunyan Zhang
On Mon, 16 Nov 2020 at 22:54, Rob Herring wrote: > > On Fri, 13 Nov 2020 19:34:50 +0800, Chunyan Zhang wrote: > > From: Chunyan Zhang > > > > Convert the sprd sc27xx vibrator binding to DT schema using json-schema. > > > > Signed-off-by: Chunyan Zhang > &g

[PATCH 2/3] dt-bindings: input: Convert sc27xx-vibra.txt to json-schema

2020-11-13 Thread Chunyan Zhang
From: Chunyan Zhang Convert the sprd sc27xx vibrator binding to DT schema using json-schema. Signed-off-by: Chunyan Zhang --- .../bindings/input/sprd,sc27xx-vibra.txt | 23 -- .../bindings/input/sprd,sc27xx-vibrator.yaml | 44 +++ 2 files changed, 44 insertions

[PATCH 3/3] dt-bindings: input: Add compatible string for SC2721 and SC2730

2020-11-13 Thread Chunyan Zhang
From: Chunyan Zhang Add new compatible strings to support sc2730 and sc2721 which are two varieties of SC27XX family. Signed-off-by: Chunyan Zhang --- .../devicetree/bindings/input/sprd,sc27xx-vibrator.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Documentation/devicetree

[PATCH 1/3] input: sc27xx: Add support for sc2730 and sc2721

2020-11-13 Thread Chunyan Zhang
From: Nemo Han Add new compatible strings and match data to support sc2730 and sc2721 which are two varieties of SC27XX family. Signed-off-by: Nemo Han Signed-off-by: Chunyan Zhang --- drivers/input/misc/sc27xx-vibra.c | 64 ++- 1 file changed, 54 insertions

[RESEND PATCH 1/2] hwspinlock: sprd: fixed warning of unused variable 'sprd_hwspinlock_of_match'

2020-11-11 Thread Chunyan Zhang
From: Chunyan Zhang The macro function of_match_ptr() is NULL if CONFIG_OF is not set, in this case Clang compiler would complain the of_device_id variable is unused. Reported-by: kernel test robot Fixes: d8c81aba ("hwspinlock: sprd: Add hardware spinlock driver") Signed-off-b

[PATCH v3 2/3] watchdog: sprd: check busy bit before new loading rather than after that

2020-11-08 Thread Chunyan Zhang
chdog driver") Signed-off-by: Lingling Xu Signed-off-by: Chunyan Zhang Reviewed-by: Guenter Roeck --- drivers/watchdog/sprd_wdt.c | 25 + 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/drivers/watchdog/sprd_wdt.c b/drivers/watchdog/sprd_wdt.c index f3

[PATCH v3 3/3] watchdog: sprd: change to use usleep_range() instead of busy loop

2020-11-08 Thread Chunyan Zhang
From: Chunyan Zhang After changing to check busy bit for the previous loading operation instead of the current one, for most of cases, the busy bit is not set for the first time of read, so there's no need to check so frequently, so this patch use usleep_range() to replace cpu_relax() to avoid

[PATCH v3 0/3] A few fixes to sprd watchdog driver

2020-11-08 Thread Chunyan Zhang
From: Chunyan Zhang A few issues about sprd watchdog driver were found recently, this patchset would fix them. Changes since v2: * Added Guenter Roeck's Reviewed-by on patch 2,3; Changes since v1: * Added Reviewed-by from Guenter Roeck; * Abandon original patch 2, add a new patch to use

[PATCH v3 1/3] watchdog: sprd: remove watchdog disable from resume fail path

2020-11-08 Thread Chunyan Zhang
sure other parts in the kernel can run normally. [ chunyan: Massaged changelog ] Fixes: 477603467009 ("watchdog: Add Spreadtrum watchdog driver") Signed-off-by: Lingling Xu Signed-off-by: Chunyan Zhang Reviewed-by: Guenter Roeck --- drivers/watchdog/sprd_wdt.c | 9 ++--- 1 file

Re: [PATCH] spi: add runtime PM for transfer_one_message

2020-11-02 Thread Chunyan Zhang
On Tue, 3 Nov 2020 at 02:17, Mark Brown wrote: > > On Mon, Nov 02, 2020 at 07:22:39PM +0800, Chunyan Zhang wrote: > > From: Chunyan Zhang > > > Before transfer message, spi devices probably have been in runtime > > suspended, > > that would cause the kernel cr

Re: [PATCH v2 1/2] hwspinlock: sprd: fixed warning of unused variable 'sprd_hwspinlock_of_match'

2020-11-02 Thread Chunyan Zhang
On Tue, 3 Nov 2020 at 07:58, Bjorn Andersson wrote: > > On Mon 02 Nov 17:34 CST 2020, Baolin Wang wrote: > > > On Friday, October 30, 2020, Chunyan Zhang wrote: > > > From: Chunyan Zhang > > > > > > The macro function of_match_ptr() is NULL if CONFI

[PATCH] spi: add runtime PM for transfer_one_message

2020-11-02 Thread Chunyan Zhang
From: Chunyan Zhang Before transfer message, spi devices probably have been in runtime suspended, that would cause the kernel crash on some platforms once access spi registers, such as on Unisoc's SoCs. The spi devices can be suspended until message transfer completed. Also this patch move

Re: [PATCH] spi: sprd: add runtime pm for transfer message

2020-11-01 Thread Chunyan Zhang
On Fri, 30 Oct 2020 at 21:42, Mark Brown wrote: > > On Fri, Oct 30, 2020 at 03:24:44PM +0800, Chunyan Zhang wrote: > > From: Bangzheng Liu > > > > Before transfer one message, spi core would set chipselect, sprd spi > > device should be resumed from runtime s

[PATCH] spi: sprd: add runtime pm for transfer message

2020-10-30 Thread Chunyan Zhang
. Fixes: e7d973a31c24 ("spi: sprd: Add SPI driver for Spreadtrum SC9860") Signed-off-by: Bangzheng Liu Signed-off-by: Chunyan Zhang --- drivers/spi/spi-sprd.c | 16 +--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/drivers/spi/spi-sprd.c b/drivers/spi/spi-sp

Re: [PATCH 9/9] mfd: sprd-sc27xx-spi: remove unnecessary CONFIG_PM_SLEEP

2020-10-29 Thread Chunyan Zhang
Hi Coiby, After removing CONFIG_PM_SLEEP, sprd_pmic_suspend/resume() would not be built into symbol table with clang compiler though, that would cause clang compiler report warnings of "unused function" if CONFIG_PM_SLEEP is not set. So I also prefer to add a __maybe_unused instead as other

[PATCH v2 2/2] hwspinlock: sprd: use module_platform_driver() instead postcore initcall

2020-10-29 Thread Chunyan Zhang
From: Chunyan Zhang The hardware spinlock devices are defined in the DT, there's no need for init calls order, remove boilerplate code by using module_platform_driver. Signed-off-by: Chunyan Zhang --- drivers/hwspinlock/sprd_hwspinlock.c | 13 + 1 file changed, 1 insertion(+), 12

[PATCH v2 0/2] fixes and improvement for sprd hwspinlock

2020-10-29 Thread Chunyan Zhang
From: Chunyan Zhang Changes since v1: * Change to add __maybe_unsed rather than not use of_match_ptr(). Chunyan Zhang (2): hwspinlock: sprd: fixed warning of unused variable 'sprd_hwspinlock_of_match' hwspinlock: sprd: use module_platform_driver() instead postcore initcall drivers

[PATCH v2 1/2] hwspinlock: sprd: fixed warning of unused variable 'sprd_hwspinlock_of_match'

2020-10-29 Thread Chunyan Zhang
From: Chunyan Zhang The macro function of_match_ptr() is NULL if CONFIG_OF is not set, then Clang compiler would complain the of_device_id variable is unused. But using of_match_ptr() is space saving, for this case, the unused structure 'sprd_hwspinlock_of_match' would be not built into symbol

[PATCH v2 3/3] watchdog: sprd: change to use usleep_range() instead of busy loop

2020-10-29 Thread Chunyan Zhang
From: Chunyan Zhang After changing to check busy bit for the previous loading operation instead of the current one, for most of cases, the busy bit is not set for the first time of read, so there's no need to check so frequently, so this patch use usleep_range() to replace cpu_relax() to avoid

[PATCH v2 3/3] watchdog: sprd: change to use usleep_range() instead of busy loop

2020-10-28 Thread Chunyan Zhang
From: Chunyan Zhang After changing to check busy bit for the previous loading operation instead of the current one, for most of cases, the busy bit is not set for the first time of read, so there's no need to check so frequently, so this patch use usleep_range() to replace cpu_relax() to avoid

[PATCH v2 2/3] watchdog: sprd: check busy bit before new loading rather than after that

2020-10-28 Thread Chunyan Zhang
chdog driver") Signed-off-by: Lingling Xu Signed-off-by: Chunyan Zhang --- drivers/watchdog/sprd_wdt.c | 25 + 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/drivers/watchdog/sprd_wdt.c b/drivers/watchdog/sprd_wdt.c index f3c90b4afead..b9b1daa9e

[PATCH v2 0/3] A few fixes to sprd watchdog driver

2020-10-28 Thread Chunyan Zhang
From: Chunyan Zhang A few issues about sprd watchdog driver were found recently, this patchset would fix them. Changes since v1: * Added Reviewed-by from Guenter Roeck; * Abandon original patch 2, add a new patch to use usleep_range() instead of busy loop; * Revised the max times of loop, also

[PATCH v2 1/3] watchdog: sprd: remove watchdog disable from resume fail path

2020-10-28 Thread Chunyan Zhang
sure other parts in the kernel can run normally. [ chunyan: Massaged changelog ] Fixes: 477603467009 ("watchdog: Add Spreadtrum watchdog driver") Signed-off-by: Lingling Xu Signed-off-by: Chunyan Zhang Reviewed-by: Guenter Roeck --- drivers/watchdog/sprd_wdt.c | 9 ++--- 1 file

Re: [PATCH 1/3] watchdog: sprd: should not disable watchdog in resume

2020-10-27 Thread Chunyan Zhang
On Mon, 26 Oct 2020 at 22:27, Guenter Roeck wrote: > > On 10/26/20 1:09 AM, Chunyan Zhang wrote: > > From: Lingling Xu > > > > Don't disable watchdog in resume process, otherwise system would crash > > once kick watchdog. > > > > This is a bit misl

Re: [PATCH 2/3] watchdog: sprd: change timeout value from 1000 to 2000

2020-10-27 Thread Chunyan Zhang
On Mon, 26 Oct 2020 at 22:36, Guenter Roeck wrote: > > On 10/26/20 1:09 AM, Chunyan Zhang wrote: > > From: Lingling Xu > > > > Because cpu_relax() takes different time on different SoCs, for some rare > > cases, it would take more than 1000 cycles for waitting

Re: [PATCH 3/3] watchdog: sprd: check busy bit before kick watchdog

2020-10-27 Thread Chunyan Zhang
On Mon, 26 Oct 2020 at 22:44, Guenter Roeck wrote: > > On 10/26/20 1:09 AM, Chunyan Zhang wrote: > > From: Lingling Xu > > > > As the specification described, checking busy bit must be done before kick > > watchdog. > > > > That is a key functional

[PATCH 0/3] A few fixes to sprd watchdog driver

2020-10-26 Thread Chunyan Zhang
From: Chunyan Zhang A few issues about sprd watchdog driver were found recently, this patchset would fix them. Lingling Xu (3): watchdog: sprd: should not disable watchdog in resume watchdog: sprd: change timeout value from 1000 to 2000 watchdog: sprd: check busy bit before kick watchdog

[PATCH 3/3] watchdog: sprd: check busy bit before kick watchdog

2020-10-26 Thread Chunyan Zhang
From: Lingling Xu As the specification described, checking busy bit must be done before kick watchdog. Fixes: 477603467009 ("watchdog: Add Spreadtrum watchdog driver") Signed-off-by: Lingling Xu Signed-off-by: Chunyan Zhang --- drivers/watchdog/sprd_wdt.c | 27 ++--

[PATCH 1/3] watchdog: sprd: should not disable watchdog in resume

2020-10-26 Thread Chunyan Zhang
From: Lingling Xu Don't disable watchdog in resume process, otherwise system would crash once kick watchdog. Fixes: 477603467009 ("watchdog: Add Spreadtrum watchdog driver") Signed-off-by: Lingling Xu Signed-off-by: Chunyan Zhang --- drivers/watchdog/sprd_wdt.c | 9 ++--- 1 fi

[PATCH 2/3] watchdog: sprd: change timeout value from 1000 to 2000

2020-10-26 Thread Chunyan Zhang
("watchdog: Add Spreadtrum watchdog driver") Signed-off-by: Lingling Xu Signed-off-by: Chunyan Zhang --- drivers/watchdog/sprd_wdt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/watchdog/sprd_wdt.c b/drivers/watchdog/sprd_wdt.c index f3c90b4afead..4f

[PATCH 0/3] sprd watchdog a few fixes

2020-10-26 Thread Chunyan Zhang
From: Chunyan Zhang A few issues about sprd watchdog driver were found recently, this patchset would fix them. Lingling Xu (3): watchdog: sprd: should not disable watchdog in resume watchdog: sprd: change timeout value from 1000 to 2000 watchdog: sprd: check busy bit before kick watchdog

[PATCH 2/2] hwspinlock: sprd: use module_platform_driver() instead postcore initcall

2020-10-26 Thread Chunyan Zhang
From: Chunyan Zhang The hardware spinlock devices are defined in the DT, there's no need for init calls order, remove boilerplate code by using module_platform_driver. Signed-off-by: Chunyan Zhang --- drivers/hwspinlock/sprd_hwspinlock.c | 13 + 1 file changed, 1 insertion(+), 12

[PATCH 1/2] hwspinlock: sprd: fixed warning of unused variable 'sprd_hwspinlock_of_match'

2020-10-26 Thread Chunyan Zhang
From: Chunyan Zhang The macro function of_match_ptr() is NULL if CONFIG_OF is not set, in this case Clang compiler would complain the of_device_id variable is unused. Reported-by: kernel test robot Fixes: d8c81aba ("hwspinlock: sprd: Add hardware spinlock driver") Signed-off-b

[PATCH 2/2] hwspinlock: sprd: use module_platform_driver() instead postcore initcall

2020-10-26 Thread Chunyan Zhang
From: Chunyan Zhang The hardware spinlock devices are defined in the DT, there's no need for iinit calls order, remove boilerplate code by using module_platform_driver. Signed-off-by: Chunyan Zhang --- drivers/hwspinlock/sprd_hwspinlock.c | 13 + 1 file changed, 1 insertion(+), 12

Re: [PATCH RFC v7 1/6] dt-bindings: display: add Unisoc's drm master bindings

2020-09-29 Thread Chunyan Zhang
evin Tang wrote: > > > > From: Kevin Tang > > > > > > > > The Unisoc DRM master device is a virtual device needed to list all > > > > DPU devices or other display interface nodes that comprise the > > > > graphics subsystem > > > &

Re: [PATCH -next] pinctrl: sprd: use module_platform_driver to simplify the code

2020-09-14 Thread Chunyan Zhang
On Mon, 14 Sep 2020 at 14:32, Liu Shixin wrote: > > module_platform_driver() makes the code simpler by eliminating > boilerplate code. > > Signed-off-by: Liu Shixin Acked-by: Chunyan Zhang Thanks, Chunyan > --- > drivers/pinctrl/sprd/pinctrl-sprd-sc9860.c | 13 +-

Re: [PATCH 02/11] spi: sprd: Simplify with dev_err_probe()

2020-09-08 Thread Chunyan Zhang
On Tue, 1 Sep 2020 at 23:27, Krzysztof Kozlowski wrote: > > Common pattern of handling deferred probe can be simplified with > dev_err_probe(). Less code and the error value gets printed. > > Signed-off-by: Krzysztof Kozlowski Acked-by: Chunyan Zhang Thanks, Chunyan > ---

Re: [PATCH 01/11] spi: sprd: Release DMA channel also on probe deferral

2020-09-08 Thread Chunyan Zhang
DMA mode support") > Cc: > Signed-off-by: Krzysztof Kozlowski Acked-by: Chunyan Zhang Thanks, Chunyan > --- > drivers/spi/spi-sprd.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/spi/spi-sprd.c b/drivers/spi/spi-sprd.c > index 6678f

[PATCH v2] gpio: sprd: Clear interrupt when setting the type as edge

2020-08-31 Thread Chunyan Zhang
("gpio: Add GPIO driver for Spreadtrum SC9860 platform") Signed-off-by: Taiping Lai Signed-off-by: Chunyan Zhang --- * Changes since v1: - Rebased on v5.9-rc1. --- drivers/gpio/gpio-sprd.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/gpio/gpio-sprd.c b/drivers/gpio/g

Re: [PATCH 5/6] pwm: sprd: Simplify with dev_err_probe()

2020-08-26 Thread Chunyan Zhang
On Wed, 26 Aug 2020 at 22:48, Krzysztof Kozlowski wrote: > > Common pattern of handling deferred probe can be simplified with > dev_err_probe(). Less code and also it prints the error value. > > Signed-off-by: Krzysztof Kozlowski Acked-by: Chunyan Zhang Thanks! > ---

Re: [PATCH] gpio: sprd: Clear interrupt when setting the type as edge

2020-08-19 Thread Chunyan Zhang
[reply behalf on Taipin] Hi Baolin, On Sat, 1 Aug 2020 at 07:59, Baolin Wang wrote: > > On Wed, Jul 29, 2020 at 5:35 PM Chunyan Zhang wrote: > > > > From: Taiping Lai > > > > The raw interrupt status of GPIO maybe set before the interrupt is enabled, > &g

[PATCH v3] mfd: sprd: Add wakeup capability for PMIC irq

2020-08-17 Thread Chunyan Zhang
this issue, as well as removing the IRQF_NO_SUSPEND flag to allow PMIC irq to be a wakeup source. Reported-by: Chunyan Zhang Signed-off-by: Baolin Wang Tested-by: Chunyan Zhang --- Changes from v2: * rebased on v5.9-rc1; Changes from v1: * addressed comments from Lee; * added tested-by from

[PATCH V13] printk: Add monotonic, boottime, and realtime timestamps

2020-07-29 Thread Chunyan Zhang
From: Prarit Bhargava printk.time=1/CONFIG_PRINTK_TIME=1 adds a unmodified local hardware clock timestamp to printk messages. The local hardware clock loses time each day making it difficult to determine exactly when an issue has occurred in the kernel log, and making it difficult to determine

[PATCH V13] printk: Add monotonic, boottime, and realtime timestamps

2020-07-29 Thread Chunyan Zhang
From: Prarit Bhargava printk.time=1/CONFIG_PRINTK_TIME=1 adds a unmodified local hardware clock timestamp to printk messages. The local hardware clock loses time each day making it difficult to determine exactly when an issue has occurred in the kernel log, and making it difficult to determine

[PATCH] gpio: sprd: Clear interrupt when setting the type as edge

2020-07-29 Thread Chunyan Zhang
: 9a3821c2bb47 ("gpio: Add GPIO driver for Spreadtrum SC9860 platform") Signed-off-by: Taiping Lai Signed-off-by: Chunyan Zhang --- drivers/gpio/gpio-sprd.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/gpio/gpio-sprd.c b/drivers/gpio/gpio-sprd.c index d7314d39ab65..36ea8a3bd

[PATCH v2 1/2] math64: New DIV_S64_ROUND_CLOSEST helper

2020-07-24 Thread Chunyan Zhang
From: Chunyan Zhang Provide DIV_S64_ROUND_CLOSEST helper which uses div_s64 to perform division rounded to the closest integer using signed 64bit dividend and signed 32bit divisor. Signed-off-by: Chunyan Zhang --- include/linux/math64.h | 19 +++ 1 file changed, 19 insertions

[PATCH v2 0/2] fix an overflow error on sc27xx power supply

2020-07-24 Thread Chunyan Zhang
From: Chunyan Zhang The patch 2/2 fixes an overflow error by changing to 64-bit divide operations. In order to avoid compile error on 32-bit architectures, this patchset also introduced a new 64-bit helper in patch 1/2. Changes since v1: (https://lkml.org/lkml/2020/7/17/63) - Added new help

  1   2   3   4   5   6   7   8   9   10   >