Re: [PATCH] nvmem: core: fix nvmem_cell_write inline function

2019-09-09 Thread Nandor Han
On 9/9/19 1:18 PM, Sebastian Reichel wrote: Hi, On Mon, Sep 09, 2019 at 12:26:06PM +0300, Nandor Han wrote: On 9/8/19 3:10 PM, Sebastian Reichel wrote: From: Sebastian Reichel nvmem_cell_write's buf argument uses different types based on the configuration of CONFIG_NVMEM. The fun

Re: [PATCH] nvmem: core: fix nvmem_cell_write inline function

2019-09-09 Thread Nandor Han
On 9/8/19 3:10 PM, Sebastian Reichel wrote: From: Sebastian Reichel nvmem_cell_write's buf argument uses different types based on the configuration of CONFIG_NVMEM. The function prototype for enabled NVMEM uses 'void *' type, but the static dummy function for disabled NVMEM uses 'const char *'

Re: [PATCH] power: reset: make reboot-mode user selectable

2019-09-04 Thread Nandor Han
On 9/3/19 3:04 AM, Sebastian Reichel wrote: Hi, On Mon, Sep 02, 2019 at 11:16:27PM +0200, Arnd Bergmann wrote: On Mon, Sep 2, 2019 at 10:39 PM Sebastian Reichel wrote: This patch does not look good to me. Better patch would be to allow compiling CONFIG_REBOOT_MODE without CONFIG_OF. Obviously

Re: [v5] rtc: pcf85363/pcf85263: fix error that failed to run hwclock -w

2019-08-28 Thread Nandor Han
On 8/29/19 5:14 AM, Biwen Li wrote: Issue: - # hwclock -w hwclock: RTC_SET_TIME: Invalid argument Why: - Relative commit: 8b9f9d4dc511309918c4f6793bae7387c0c638af, this patch will always check for unwritable registers, it will compare reg with max_register in regma

Re: [v4] rtc: pcf85363/pcf85263: fix error that failed to run hwclock -w

2019-08-27 Thread Nandor Han
On 8/27/19 7:37 AM, Biwen Li wrote: - In drivers/rtc/rtc-pcf85363.c, CTRL_STOP_EN is 0x2e, but DT_100THS is 0, max_regiter is 0x2f, then reg will be equal to 0x30, '0x30 < 0x2f' is false,so regmap_writeable will return false. - The pcf85363/pcf85263 has the capability of add

Re: [EXT] Re: [v2] rtc: pcf85363/pcf85263: fix error that failed to run hwclock -w

2019-08-26 Thread Nandor Han
On 8/26/19 7:29 AM, Biwen Li wrote: On 8/16/19 10:40 PM, Li Yang wrote: On Fri, Aug 16, 2019 at 11:30 AM Alexandre Belloni wrote: On 16/08/2019 10:50:49-0500, Li Yang wrote: On Fri, Aug 16, 2019 at 3:05 AM Alexandre Belloni wrote: On 16/08/2019 10:46:36+0800, Biwen Li wrote: Issue:

Re: [v2] rtc: pcf85363/pcf85263: fix error that failed to run hwclock -w

2019-08-20 Thread Nandor Han
On 8/16/19 10:40 PM, Li Yang wrote: On Fri, Aug 16, 2019 at 11:30 AM Alexandre Belloni wrote: On 16/08/2019 10:50:49-0500, Li Yang wrote: On Fri, Aug 16, 2019 at 3:05 AM Alexandre Belloni wrote: On 16/08/2019 10:46:36+0800, Biwen Li wrote: Issue: - # hwclock -w hwclock: RTC_SE

Re: drivers/power/reset/nvmem-reboot-mode.c:27:42: error: passing argument 2 of 'nvmem_cell_write' from incompatible pointer type

2019-08-12 Thread Nandor Han
On 8/11/19 2:43 AM, kbuild test robot wrote: Hi Han, FYI, the error/warning still remains. tree: https://kernel.googlesource.com/pub/scm/linux/kernel/git/torvalds/linux.git master head: dcbb4a153971ff8646af0c963f5698bf21bfbfdc commit: 7a78a7f7695bf9ef9cef3c06fbc5fa4573fd0eef power: reset:

Re: [PATCH] power: reset: nvmem-reboot-mode: add CONFIG_OF dependency

2019-08-05 Thread Nandor Han
On 7/8/19 3:52 PM, Arnd Bergmann wrote: Without CONFIG_OF, we get a build failure in the reboot-mode implementation: drivers/power/reset/reboot-mode.c: In function 'reboot_mode_register': drivers/power/reset/reboot-mode.c:72:2: error: implicit declaration of function 'for_each_property_of_node'

Re: [PATCH v4 0/2] Use NVMEM as reboot-mode write interface

2019-06-27 Thread Nandor Han
Hi, Changes since v3: - documentation updated according to the comments Thanks, queued. Please fix your git/mail setup, I had to fix the line endings (\r\n -> \n) to apply this. -- Sebastian Ok. Thanks Sebastian. -- Nandor

Re: [PATCH v3 2/2] dt-bindings: power: reset: add document for NVMEM based reboot-mode

2019-05-10 Thread Nandor Han
On 5/1/19 1:47 AM, Rob Herring wrote: Hi Rob, Thanks for review. @@ -0,0 +1,32 @@ +NVMEM reboot mode driver + +This driver gets reboot mode magic value from reboot-mode driver +and stores it in a NVMEM cell named "reboot-mode". Then the bootloader +can read it and take different action accord

Re: [PATCH v2 1/2] power: reset: nvmem-reboot-mode: use NVMEM as reboot mode write interface

2019-04-17 Thread Nandor Han
On 4/18/19 12:56 AM, Sebastian Reichel wrote: On Thu, Apr 11, 2019 at 05:54:09AM +, Han Nandor wrote: Add a new reboot mode write interface that is using an NVMEM cell to store the reboot mode magic. Signed-off-by: Nandor Han --- +module_platform_driver(nvmem_reboot_mode_driver

Re: [PATCH 1/1] rtc: ds3232: get SRAM access using NVMEM Framework

2019-04-08 Thread Nandor Han
On 4/6/19 12:44 AM, Alexandre Belloni wrote: Hi, On 05/04/2019 11:14:35+, Han Nandor wrote: ` # hexdump -n 10 -C /sys/bus/nvmem/devices/ds3232_sram0/nvmem 74 65 73 74 69 6e 67 0a 00 00|testing...| 000a ` Thanks for that nice description! Glad tha

Re: [RFC PATCH 0/1] Verify if register is writeable before a write operation

2019-04-02 Thread Nandor Han
On 4/2/19 12:06 PM, Mark Brown wrote: On Tue, Apr 02, 2019 at 08:01:21AM +, Han Nandor wrote: Description --- This is an RFC because I don't know if this is a bug or a normal use case. It seems that the function `_regmap_raw_write_impl` from the regmap framework verifies that a regis

Re: EXT: Re: [PATCHv1] Input: atmel_mxt_ts - fix the firmware update

2018-04-17 Thread Nandor Han
On 23/03/18 21:47, Nick Dyer wrote: On Thu, Mar 22, 2018 at 05:43:30PM +0100, Sebastian Reichel wrote: The automatic update mechanism will trigger an update if the info block CRCs are different between maxtouch configuration file (maxtouch.cfg) and chip. The driver compared the CRCs without ret

Re: EXT: [PATCH 3/4] gpio: Remove VLA from xra1403 driver

2018-03-12 Thread Nandor Han
On 10/03/18 02:10, Laura Abbott wrote: The new challenge is to remove VLAs from the kernel (see https://lkml.org/lkml/2018/3/7/621) This patch replaces a VLA with an appropriate call to kmalloc_array. Signed-off-by: Laura Abbott --- This looks good to me. Reviewed-by: Nandor Han Nandor

[PATCH v3 0/2] XRA1403,gpio - add XRA1403 gpio expander driver

2017-05-14 Thread Nandor Han
dependency and be more clear. - include "seq_file.h" header. Note: documentation patches were accepted already. Changes since v1: - use regmap for driver - small changes to documentation Nandor Han (2): gpio - Add EXAR XRA140

[PATCH v3 2/2] Add XRA1403 support to MAINTAINERS file

2017-05-14 Thread Nandor Han
Add XRA1403 support to MAINTAINERS list. Signed-off-by: Nandor Han --- MAINTAINERS | 8 1 file changed, 8 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index f9deb67..db86335 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -14078,6 +14078,14 @@ L: linux-kernel@vger.kernel.org

[PATCH v3 1/2] gpio - Add EXAR XRA1403 SPI GPIO expander driver

2017-05-14 Thread Nandor Han
This driver support basic XRA1403 functionalities: - set gpio direction - get gpio direction - set gpio high/low - get gpio status Signed-off-by: Nandor Han Signed-off-by: Semi Malinen --- drivers/gpio/Kconfig| 5 + drivers/gpio/Makefile | 1 + drivers/gpio

[PATCH v2 4/4] Add XRA1403 support to MAINTAINERS file

2017-04-13 Thread Nandor Han
Add XRA1403 support to MAINTAINERS list. Signed-off-by: Nandor Han --- MAINTAINERS | 8 1 file changed, 8 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index 892e958..0c5b984 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -14013,6 +14013,14 @@ L: linux-kernel@vger.kernel.org

[PATCH v2 2/4] gpio - Add EXAR XRA1403 SPI GPIO expander driver

2017-04-13 Thread Nandor Han
This is a simple driver that provides a /sys/class/gpio interface for controlling and configuring the GPIO lines. It does not provide support for chip select or interrupts. Signed-off-by: Nandor Han Signed-off-by: Semi Malinen --- drivers/gpio/Kconfig| 5 + drivers/gpio/Makefile

[PATCH v2 0/4] XRA1403,gpio - add XRA1403 gpio expander driver

2017-04-13 Thread Nandor Han
states: [0, 0, 0, 0] [\] [0: 0, 1: 0, 2: 0, 3: 0] ... [\] [0: 1, 1: 1, 2: 1, 3: 1] When using `gpio-hammer` I also attached an oscilloscope to one of the pins and I was able to monitor and validate the GPIO status. Nandor Han (4): dt-bindings: gpio - add exar to vendor prefixes list gpio - Add E

[PATCH v2 1/4] dt-bindings: gpio - add exar to vendor prefixes list

2017-04-13 Thread Nandor Han
Add Exar Corporation to vendors list. Signed-off-by: Nandor Han --- Documentation/devicetree/bindings/vendor-prefixes.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/vendor-prefixes.txt b/Documentation/devicetree/bindings/vendor-prefixes.txt index

[PATCH v2 3/4] doc,dts - add XRA1403 DTS binding documentation

2017-04-13 Thread Nandor Han
Add the XRA1403 DTS binding documentation. Signed-off-by: Nandor Han --- .../devicetree/bindings/gpio/gpio-xra1403.txt | 46 ++ 1 file changed, 46 insertions(+) create mode 100644 Documentation/devicetree/bindings/gpio/gpio-xra1403.txt diff --git a/Documentation

[PATCH 2/3] doc,dts - add XRA1403 DTS binding documentation

2017-03-27 Thread Nandor Han
Add the XRA1403 DTS binding documentation. Signed-off-by: Nandor Han --- .../devicetree/bindings/gpio/gpio-xra1403.txt | 37 ++ 1 file changed, 37 insertions(+) create mode 100644 Documentation/devicetree/bindings/gpio/gpio-xra1403.txt diff --git a/Documentation

[PATCH 0/3] XRA1403,gpio - add XRA1403 gpio expander driver

2017-03-27 Thread Nandor Han
with the configured value. Nandor Han (3): gpio - Add EXAR XRA1403 SPI GPIO expander driver doc,dts - add XRA1403 DTS binding documentation Add XRA1403 support to MAINTAINERS file .../devicetree/bindings/gpio/gpio-xra1403.txt | 37 +++ .../devicetree/bindings/vendor-prefixes.txt

[PATCH 3/3] Add XRA1403 support to MAINTAINERS file

2017-03-27 Thread Nandor Han
Add the XRA1403 support to MAINTAINERS list. Signed-off-by: Nandor Han --- MAINTAINERS | 8 1 file changed, 8 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index 58b3a22..539c88c 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -13903,6 +13903,14 @@ L: linux-kernel

[PATCH 1/3] gpio - Add EXAR XRA1403 SPI GPIO expander driver

2017-03-27 Thread Nandor Han
This is a simple driver that provides a /sys/class/gpio interface for controlling and configuring the GPIO lines. It does not provide support for chip select or interrupts. Signed-off-by: Nandor Han Signed-off-by: Semi Malinen --- .../devicetree/bindings/vendor-prefixes.txt| 1

[PATCH 1/1] dmaengine: imx-sdma - correct the dma transfer residue calculation

2016-10-11 Thread Nandor Han
, to avoid using an uninitialized value in residue calculation when dma status is checked without waiting dma complete event. Signed-off-by: Nandor Han --- drivers/dma/imx-sdma.c | 13 + 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/drivers/dma/imx-sdma.c b/drivers/dma

[PATCH 0/1] dmaengine: imx-sdma - fix the dma residue calculation

2016-10-11 Thread Nandor Han
/driver/IMX-uart`) that no data is lost. Nandor Han (1): dmaengine: imx-sdma - correct the dma transfer residue calculation drivers/dma/imx-sdma.c | 13 + 1 file changed, 9 insertions(+), 4 deletions(-) -- 2.7.1

[PATCH 4/4] serial: imx-serial - update RX error counters when DMA is used

2016-08-08 Thread Nandor Han
Update error counters when DMA is used for receiving data. Do this by using DMA transaction error event instead error interrupts to reduce interrupt load. Tested-by: Peter Senna Tschudin Acked-by: Peter Senna Tschudin Signed-off-by: Nandor Han --- drivers/tty/serial/imx.c | 32

[PATCH 2/4] dmaengine: imx-sdma - update the residue calculation for cyclic channels

2016-08-08 Thread Nandor Han
and use the bd->mode.count to calculate the residue. Tested-by: Peter Senna Tschudin Acked-by: Peter Senna Tschudin Reviewed-by: Vinod Koul Signed-off-by: Nandor Han --- drivers/dma/imx-sdma.c | 20 ++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/driv

[PATCH 1/4] dmaengine: imx-sdma - reduce transfer latency for DMA cyclic clients

2016-08-08 Thread Nandor Han
: Vinod Koul Signed-off-by: Nandor Han --- drivers/dma/imx-sdma.c | 36 1 file changed, 16 insertions(+), 20 deletions(-) diff --git a/drivers/dma/imx-sdma.c b/drivers/dma/imx-sdma.c index 03ec76f..aa35a77 100644 --- a/drivers/dma/imx-sdma.c +++ b/drivers/dma

[PATCH 0/4] serial,dmaengine: use DMA cyclic for IMX UART driver

2016-08-08 Thread Nandor Han
sent 4 packets (1028, 2048, 2048, 2048) and check that 7172 bytes were received using the command: `watch -n1 cat /proc/tty/driver/IMX-uart` Result: serinfo:1.0 driver revision: 2: uart:IMX mmio:0x5000C000 irq:49 tx:0 rx:7172 RTS|CTS|DTR|DSR|CD Nandor Han (4): dmaengin

[PATCH 3/4] serial: imx-serial - update UART IMX driver to use cyclic DMA

2016-08-08 Thread Nandor Han
-uart` Tested-by: Peter Senna Tschudin Acked-by: Peter Senna Tschudin Signed-off-by: Nandor Han --- drivers/tty/serial/imx.c | 141 ++- 1 file changed, 78 insertions(+), 63 deletions(-) diff --git a/drivers/tty/serial/imx.c b/drivers/tty/serial/imx.c

Re: EXT: Re: [PATCH RFC 1/4] dma: imx-sdma - reduce transfer latency for DMA cyclic clients

2016-07-01 Thread Nandor Han
On 28/06/16 17:34, Vinod Koul wrote: On Thu, Jun 09, 2016 at 03:16:30PM +0300, Nandor Han wrote: Having the SDMA driver use a tasklet for running the clients callback introduce some issues: - probability to have desynchronized data because of the race condition created since the DMA

[PATCH RFC 1/4] dma: imx-sdma - reduce transfer latency for DMA cyclic clients

2016-06-09 Thread Nandor Han
possibility where DMA transaction status might be changed by the time is read. The responsibility of the SDMA interrupt latency is moved to the SDMA clients which case by case should defer the work to bottom-halves when needed. Signed-off-by: Nandor Han --- drivers/dma/imx-sdma.c | 36

[PATCH RFC 0/4] serial,dma: use DMA cyclic for IMX UART driver

2016-06-09 Thread Nandor Han
sent 4 packets (1028, 2048, 2048, 2048) and check that 7172 bytes were received using the command: `watch -n1 cat /proc/tty/driver/IMX-uart` Result: serinfo:1.0 driver revision: 2: uart:IMX mmio:0x5000C000 irq:49 tx:0 rx:7172 RTS|CTS|DTR|DSR|CD Nandor Han (4): dma: imx-sd

[PATCH RFC 2/4] dma: imx-sdma - update the residue calculation for cyclic channels

2016-06-09 Thread Nandor Han
and use the bd->mode.count to calculate the residue. Signed-off-by: Nandor Han --- drivers/dma/imx-sdma.c | 20 ++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/drivers/dma/imx-sdma.c b/drivers/dma/imx-sdma.c index e497847..9da258a 100644 --- a/drivers/dma/

[PATCH RFC 4/4] serial: imx-serial - update RX error counters when DMA is used

2016-06-09 Thread Nandor Han
Update error couters when DMA is used for receiving data. Do this by using DMA transaction error event instead error interrupts to reduce interrupt load. Signed-off-by: Nandor Han --- drivers/tty/serial/imx.c | 32 1 file changed, 32 insertions(+) diff --git a

[PATCH RFC 3/4] serial: imx-serial - update UART IMX driver to use cyclic DMA

2016-06-09 Thread Nandor Han
-uart` Signed-off-by: Nandor Han --- drivers/tty/serial/imx.c | 141 ++- 1 file changed, 78 insertions(+), 63 deletions(-) diff --git a/drivers/tty/serial/imx.c b/drivers/tty/serial/imx.c index 0df2b1c..1912136 100644 --- a/drivers/tty/serial/imx.c +++ b