Re: [PATCH v2 0/2] arm: sti: LL_UART updates & STiH418 addition

2020-10-05 Thread Alain Volmat
Hi Russell, Could you have a look a those two patches for the STi platform ? Regards, Alain On Sat, Sep 12, 2020 at 12:13:59PM +0200, Linus Walleij wrote: > On Sun, Aug 30, 2020 at 9:58 PM Alain Volmat wrote: > > > This serie update the STi Platform LL_UART

[PATCH 01/18] spi: stm32-spi: driver uses reset controller only at init

2020-08-05 Thread Alain Volmat
From: Etienne Carriere Remove reset controller device reference from the device private structure since it is used only at probe time and can be discarded once used to reset the SPI device. Signed-off-by: Etienne Carriere Signed-off-by: Alain Volmat --- drivers/spi/spi-stm32.c | 11

[PATCH 02/18] spi: stm32-spi: defer probe for reset

2020-08-05 Thread Alain Volmat
Defer the probe operation when a reset controller device is expected but have not yet been probed. This change replaces use of devm_reset_control_get_exclusive() with devm_reset_control_get_optional_exclusive() as reset controller is optional which is now explicitly stated. Signed-off-by: Alain

[PATCH 11/18] spi: stm32: fix fifo threshold level in case of short transfer

2020-08-05 Thread Alain Volmat
From: Amelie Delaunay When transfer is shorter than half of the fifo, set the data packet size up to transfer size instead of up to half of the fifo. Check also that threshold is set at least to 1 data frame. Signed-off-by: Amelie Delaunay Signed-off-by: Alain Volmat --- drivers/spi/spi

[PATCH 14/18] spi: stm32: improve suspend/resume management

2020-08-05 Thread Alain Volmat
From: Amelie Delaunay This patch adds pinctrl power management, and reconfigure spi controller in case of resume. Signed-off-by: Amelie Delaunay Signed-off-by: Alain Volmat --- drivers/spi/spi-stm32.c | 27 --- 1 file changed, 24 insertions(+), 3 deletions(-) diff

[PATCH 16/18] spi: stm32: always perform registers configuration prior to transfer

2020-08-05 Thread Alain Volmat
SPI registers content may have been lost upon suspend/resume sequence. So, always compute and apply the necessary configuration in stm32_spi_transfer_one_setup routine. Signed-off-by: Alain Volmat --- drivers/spi/spi-stm32.c | 42 +- 1 file changed, 17

[PATCH 12/18] spi: stm32: move spi disable out of irq handler

2020-08-05 Thread Alain Volmat
to defer the execution of spi disable. Signed-off-by: Antonio Borneo Signed-off-by: Alain Volmat --- drivers/spi/spi-stm32.c | 22 +++--- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/drivers/spi/spi-stm32.c b/drivers/spi/spi-stm32.c index 0eda9903e11e

[PATCH 07/18] spi: stm32h7: rework rx fifo read function

2020-08-05 Thread Alain Volmat
From: Amelie Delaunay Remove flush parameter and check RXWNE or RXPLVL when end of transfer flag is set. Signed-off-by: Amelie Delaunay Signed-off-by: Alain Volmat --- drivers/spi/spi-stm32.c | 32 ++-- 1 file changed, 14 insertions(+), 18 deletions(-) diff --git

[PATCH 17/18] spi: stm32: properly handle 0 byte transfer

2020-08-05 Thread Alain Volmat
On 0 byte transfer request, return straight from the xfer function after finalizing the transfer. Signed-off-by: Alain Volmat --- drivers/spi/spi-stm32.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/drivers/spi/spi-stm32.c b/drivers/spi/spi-stm32.c index 177f82700de0..b909afd9e99b

[PATCH 18/18] spi: stm32h7: ensure message are smaller than max size

2020-08-05 Thread Alain Volmat
Ensure that messages given to transfer_one handler can actually be handled by it. For that purpose rely on the SPI framework spi_split_transfers_maxsize function to split messages whenever necessary. Signed-off-by: Alain Volmat --- drivers/spi/spi-stm32.c | 14 ++ 1 file changed, 14

[PATCH 10/18] spi: stm32: wait for completion in transfer_one()

2020-08-05 Thread Alain Volmat
e returned to the framework. Signed-off-by: Antonio Borneo Signed-off-by: Amelie Delaunay Signed-off-by: Alain Volmat --- drivers/spi/spi-stm32.c | 87 +++-- 1 file changed, 62 insertions(+), 25 deletions(-) diff --git a/drivers/spi/spi-stm32.c b/drivers/spi/s

[PATCH 04/18] spi: stm32: use bitfield macros

2020-08-05 Thread Alain Volmat
From: Amelie Delaunay To avoid defining shift and mask separately and hand-coding the bit manipulation, use the bitfield macros. Signed-off-by: Amelie Delaunay Signed-off-by: Alain Volmat --- drivers/spi/spi-stm32.c | 55 - 1 file changed, 18

[PATCH 05/18] spi: stm32h7: replace private SPI_1HZ_NS with NSEC_PER_SEC

2020-08-05 Thread Alain Volmat
From: Amelie Delaunay Replace SPI_1HZ_NS private constant with NSEC_PER_SEC, which is easier to read and understand. Signed-off-by: Amelie Delaunay Signed-off-by: Alain Volmat --- drivers/spi/spi-stm32.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/spi/spi

[PATCH 06/18] spi: stm32h7: fix irq handler

2020-08-05 Thread Alain Volmat
TXP and RXP flag in the mask instead of DXP, and then keep the initial handling of TXP and RXP events. Also rephrase comment about EOTIE which is one of the interrupt enable bits. It is not triggered by any event. Signed-off-by: Amelie Delaunay Signed-off-by: Antonio Borneo Signed-off-by: Alain

[PATCH 15/18] spi: stm32: fix stm32_spi_prepare_mbr in case of odd clk_rate

2020-08-05 Thread Alain Volmat
From: Amelie Delaunay Fix spi->clk_rate when it is odd to the nearest lowest even value because minimum SPI divider is 2. Signed-off-by: Amelie Delaunay Signed-off-by: Alain Volmat --- drivers/spi/spi-stm32.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/

[PATCH 00/18] spi: stm32: various driver enhancements

2020-08-05 Thread Alain Volmat
This serie provides spi-stm32 driver enhancements in various area such as: - code simplification - race condition fix - fixes in case of usage of SPI with DMA - suspend/resume fixes - issues triggered by spi-loopback-test Alain Volmat (4): spi: stm32-spi: defer probe for reset spi

[PATCH 13/18] spi: stm32h7: fix handling of dma transfer completed

2020-08-05 Thread Alain Volmat
a callback, signal the end of dma through completion, then delay spi disable until the dma callback has been executed. Signed-off-by: Antonio Borneo Signed-off-by: Amelie Delaunay Signed-off-by: Alain Volmat --- drivers/spi/spi-stm32.c | 37 +++-- 1 file changed, 23

[PATCH 03/18] spi: stm32h7: remove unused mode fault MODF event handling

2020-08-05 Thread Alain Volmat
pt due to MODF event and we do not need to handle it. Remove all the unused code around handling MODF events. Signed-off-by: Antonio Borneo Signed-off-by: Alain Volmat --- drivers/spi/spi-stm32.c | 12 ++-- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/drivers/spi/spi-stm

[PATCH 08/18] spi: stm32h7: fix dbg/warn/err conditions in irq handler

2020-08-05 Thread Alain Volmat
throughput". RX overrun is an error condition that signals a corrupted RX stream both in dma and in irq modes. Report the error and abort the transfer in either cases. Signed-off-by: Amelie Delaunay Signed-off-by: Antonio Borneo Signed-off-by: Alain Volmat --- drivers/spi/spi-stm32.c |

[PATCH 09/18] spi: stm32h7: fix race condition at end of transfer

2020-08-05 Thread Alain Volmat
spi_finalize_current_transfer(). Move the call to spi_finalize_current_transfer() _after_ the call to stm32_spi_disable(). Signed-off-by: Antonio Borneo Signed-off-by: Alain Volmat --- drivers/spi/spi-stm32.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/spi/spi-stm32.c b

[PATCH v2 4/5] spi: stm32: fixes suspend/resume management

2020-08-10 Thread Alain Volmat
From: Amelie Delaunay This patch adds pinctrl power management, and reconfigure spi controller in case of resume. Fixes: 038ac869c9d2 ("spi: stm32: add runtime PM support") Signed-off-by: Amelie Delaunay Signed-off-by: Alain Volmat --- v2: identical to v1 drivers/spi/spi-st

[PATCH v2 1/5] spi: stm32h7: fix race condition at end of transfer

2020-08-10 Thread Alain Volmat
spi_finalize_current_transfer(). Move the call to spi_finalize_current_transfer() _after_ the call to stm32_spi_disable(). Signed-off-by: Antonio Borneo Signed-off-by: Alain Volmat --- v2: identical to v1 drivers/spi/spi-stm32.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers

[PATCH v2 5/5] spi: stm32: always perform registers configuration prior to transfer

2020-08-10 Thread Alain Volmat
SPI registers content may have been lost upon suspend/resume sequence. So, always compute and apply the necessary configuration in stm32_spi_transfer_one_setup routine. Signed-off-by: Alain Volmat --- v2: identical to v1 drivers/spi/spi-stm32.c | 42

[PATCH v2 2/5] spi: stm32: fix fifo threshold level in case of short transfer

2020-08-10 Thread Alain Volmat
From: Amelie Delaunay When transfer is shorter than half of the fifo, set the data packet size up to transfer size instead of up to half of the fifo. Check also that threshold is set at least to 1 data frame. Signed-off-by: Amelie Delaunay Signed-off-by: Alain Volmat --- v2: fix conditional

[PATCH v2 0/5] spi: stm32: various driver fixes

2020-08-10 Thread Alain Volmat
This serie is a reduced version of the serie [spi: stm32: various driver enhancements] previously sent. Alain Volmat (1): spi: stm32: always perform registers configuration prior to transfer Amelie Delaunay (3): spi: stm32: fix fifo threshold level in case of short transfer spi: stm32: fix

[PATCH v2 3/5] spi: stm32: fix stm32_spi_prepare_mbr in case of odd clk_rate

2020-08-10 Thread Alain Volmat
From: Amelie Delaunay Fix spi->clk_rate when it is odd to the nearest lowest even value because minimum SPI divider is 2. Signed-off-by: Amelie Delaunay Signed-off-by: Alain Volmat --- v2: identical to v1 drivers/spi/spi-stm32.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) d

Re: [PATCH 08/11] spi: stm32: Simplify with dev_err_probe()

2020-09-08 Thread Alain Volmat
On Tue, Sep 01, 2020 at 03:27:10PM +, 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 Reviewed-by: Alain Volmat > --- >

[PATCH v2] mailbox: sti: fix struct description warnings

2020-09-08 Thread Alain Volmat
Fix formating of struct description to avoid warning highlighted by W=1 compilation. Signed-off-by: Alain Volmat --- v2: fixes tag removed drivers/mailbox/mailbox-sti.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/mailbox/mailbox-sti.c b/drivers/mailbox

Re: [PATCH] i2c: stm32: remove unnecessary DMA kernel error log

2020-09-10 Thread Alain Volmat
Hi Holger, Thanks for your patch. there is an ongoing tree wide action to update all those common pattern of checking for the -EPROBE_DEFER. I thus propose, to first integrate the patch [i2c: stm32: Simplify with dev_err_probe()] that has been proposed few days ago, and on top of that add an

[PATCH] i2c: stm32: do not display error when DMA is not requested

2020-09-10 Thread Alain Volmat
DMA usage is optional for the I2C driver. check for the -ENODEV error in order to avoid displaying an error when no DMA has been requested. Signed-off-by: Alain Volmat --- This patch should be applied on top of the patch [i2c: stm32: Simplify with dev_err_probe()] --- drivers/i2c/busses/i2c

Re: [PATCH 1/9] i2c: stm32: Simplify with dev_err_probe()

2020-09-10 Thread Alain Volmat
Hi, On Wed, Sep 02, 2020 at 05:06:35PM +0200, 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 Reviewed-by: Alain Volmat > ---

[PATCH] mailbox: sti: fix struct description warnings

2020-08-31 Thread Alain Volmat
Fix formating of struct description to avoid warning highlighted by W=1 compilation. Fixes: 9ef4546cbd7e ("mailbox: Add support for ST's Mailbox IP") Signed-off-by: Alain Volmat --- drivers/mailbox/mailbox-sti.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git

[PATCH] reset: sti: reset-syscfg: fix struct description warnings

2020-08-31 Thread Alain Volmat
Fix formating of struct description to avoid warning highlighted by W=1 compilation. Fixes: e5d76075d930 ("drivers: reset: STi SoC system configuration reset controller support") Signed-off-by: Alain Volmat --- drivers/reset/sti/reset-syscfg.c | 7 --- 1 file changed, 4 insert

[PATCH v3 2/2] i2c: stm32f7: Add SMBus Host-Notify protocol support

2020-08-02 Thread Alain Volmat
Rely on the core functions to implement the host-notify protocol via the a I2C slave device. Signed-off-by: Alain Volmat --- v3: identical to v2 v2: fix slot #0 usage condition within stm32f7_i2c_get_free_slave_id drivers/i2c/busses/Kconfig | 1 + drivers/i2c/busses/i2c-stm32f7.c

[PATCH] i2c: stm32f7: add SMBus-Alert support

2020-08-02 Thread Alain Volmat
Add support for the SMBus-Alert protocol. Signed-off-by: Alain Volmat --- This patch has to be integrated on top of the patch 'i2c: stm32f7: Add SMBus Host-Notify protocol support' since SMBus Alert is enabled by the DT binding 'smbus' introduced in that patch. drivers/i2c/busses/i2c

[PATCH v3 1/2] i2c: smbus: add core function handling SMBus host-notify

2020-08-02 Thread Alain Volmat
the client. This commit introduces two new core functions * i2c_new_slave_host_notify_device * i2c_free_slave_host_notify_device that take care of registration of the new slave device and callback and will call i2c_handle_smbus_host_notify once a Host-Notify event is received. Signed-off-by: Alain

[PATCH v3 0/2] i2c: stm32: add host-notify support via i2c slave

2020-08-02 Thread Alain Volmat
This serie replaces the previous 'stm32-f7: Addition of SMBus Alert / Host-notify features' serie to only focus on the SMBus Host-Notify feature. It should be applied with "[PATCH] i2c: add binding to mark a bus as SMBus" from Wolfram which defines the newly introduced "smbus&q

[PATCH 0/2] Avoid meaningless DMA error print & use dev_err_probe

2020-09-14 Thread Alain Volmat
(DMA is only optional) and also avoid printing twice an error when a real DMA error is happening. On top of that, dev_err_probe from Krzysztof has been rebased. [1] https://marc.info/?l=linux-i2c=159741480608578=2 [2] https://marc.info/?l=linux-i2c=159973040314193=2 Alain Volmat (1): i2c: stm32

[PATCH v2 2/2] i2c: stm32: Simplify with dev_err_probe()

2020-09-14 Thread Alain Volmat
From: Krzysztof Kozlowski 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 Signed-off-by: Alain Volmat --- v2: rebased on top of patch [i2c: stm32: fix error message on upon

[PATCH 1/2] i2c: stm32: fix error message on upon dma_request_chan & defer handling

2020-09-14 Thread Alain Volmat
information than what is already reported within the stm32_i2c_dma_request function. CC: Krzysztof Kozlowski CC: Holger Assmann Signed-off-by: Alain Volmat --- This patch replaces the patch [i2c: stm32: do not display error when DMA is not requested] previously sent on the mailing list

Re: [PATCH] i2c: stm32: do not display error when DMA is not requested

2020-09-10 Thread Alain Volmat
On Thu, Sep 10, 2020 at 12:06:07PM +0200, Wolfram Sang wrote: > On Thu, Sep 10, 2020 at 11:32:29AM +0200, Alain Volmat wrote: > > DMA usage is optional for the I2C driver. check for the -ENODEV > > error in order to avoid displaying an error when no DMA > > has been requested

[PATCH] mailbox: sti: fix struct description warnings

2020-09-10 Thread Alain Volmat
' Signed-off-by: Alain Volmat Reviewed-by: Lee Jones --- drivers/mailbox/mailbox-sti.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/mailbox/mailbox-sti.c b/drivers/mailbox/mailbox-sti.c index 2baf69a0b81c..0f2bc09c364d 100644 --- a/drivers/mailbox/mailbox

[PATCH 2/2] i2c: stm32: name slave slot to ease maintenance

2020-09-15 Thread Alain Volmat
Name slave slots in order to ease code maintenance. Signed-off-by: Alain Volmat --- drivers/i2c/busses/i2c-stm32f7.c | 22 ++ 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/drivers/i2c/busses/i2c-stm32f7.c b/drivers/i2c/busses/i2c-stm32f7.c index 0880f6a4cd44

[PATCH 1/2] i2c: stm32: fix slot id after introduction of host-notify support

2020-09-15 Thread Alain Volmat
Commit 68302245720a ("i2c: stm32f7: Add SMBus Host-Notify protocol support") added a new slot specific for handling host-notify however failed to update the previous slot ID leading to having the 7bit address only slot with the wrong number. Signed-off-by: Alain Volmat --- drivers/

[PATCH v2 0/2] arm: sti: LL_UART updates & STiH418 addition

2020-08-30 Thread Alain Volmat
This serie update the STi Platform LL_UART code to rely on DEBUG_UART_PHYS & DEBUG_UART_VIRT and add the STiH418 SoC support. Alain Volmat (2): arm: use DEBUG_UART_PHYS and DEBUG_UART_VIRT for sti LL_UART arm: sti LL_UART: add STiH418 SBC UART0 support arch/arm/Kconfig.debug

[PATCH v2 2/2] arm: sti LL_UART: add STiH418 SBC UART0 support

2020-08-30 Thread Alain Volmat
Add the entry for the STiH418 SBC UART0 low level uart. Signed-off-by: Alain Volmat --- arch/arm/Kconfig.debug | 19 +-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/arch/arm/Kconfig.debug b/arch/arm/Kconfig.debug index e97d6e5c8898..447d177fcf8d 100644

[PATCH v2 1/2] arm: use DEBUG_UART_PHYS and DEBUG_UART_VIRT for sti LL_UART

2020-08-30 Thread Alain Volmat
Update the sti platform LL_UART support to rely on CONFIG_DEBUG_UART_PHYS and CONFIG_DEBUG_UART_VIRT from Kconfig Signed-off-by: Alain Volmat --- arch/arm/Kconfig.debug | 23 --- arch/arm/include/debug/sti.S | 26 ++ 2 files changed, 14

[PATCH 0/3] Enable CPUFreq for STi stih418 SoC.

2020-08-31 Thread Alain Volmat
This serie enables cpufreq for the STi stih418 SoC. Alain Volmat (3): cpufreq: sti-cpufreq: add stih418 support cpufreq: dt-platdev: Blacklist st,stih418 SoC cpufreq: arm: Kconfig: add CPUFREQ_DT depend for STI CPUFREQ drivers/cpufreq/Kconfig.arm | 2 +- drivers/cpufreq/cpufreq

[PATCH 1/3] cpufreq: sti-cpufreq: add stih418 support

2020-08-31 Thread Alain Volmat
The STiH418 can be controlled the same way as STiH407 & STiH410 regarding cpufreq. Signed-off-by: Alain Volmat --- drivers/cpufreq/sti-cpufreq.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/cpufreq/sti-cpufreq.c b/drivers/cpufreq/sti-cpufreq.c i

[PATCH 2/3] cpufreq: dt-platdev: Blacklist st,stih418 SoC

2020-08-31 Thread Alain Volmat
Add st,stih418 SoC in the blacklist since the cpufreq driver for this platform is already registering the driver. Signed-off-by: Alain Volmat --- drivers/cpufreq/cpufreq-dt-platdev.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/cpufreq/cpufreq-dt-platdev.c b/drivers/cpufreq

[PATCH 3/3] cpufreq: arm: Kconfig: add CPUFREQ_DT depend for STI CPUFREQ

2020-08-31 Thread Alain Volmat
The sti cpufreq driver is relying on the CPUFREQ_DT driver hence add the depends within the Kconfig.arm Signed-off-by: Alain Volmat --- drivers/cpufreq/Kconfig.arm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/cpufreq/Kconfig.arm b/drivers/cpufreq/Kconfig.arm index

[PATCH 0/5] spi: stm32: various driver fixes

2020-08-07 Thread Alain Volmat
This serie is a reduced version of the serie [spi: stm32: various driver enhancements] previously sent. Alain Volmat (1): spi: stm32: always perform registers configuration prior to transfer Amelie Delaunay (3): spi: stm32: fix fifo threshold level in case of short transfer spi: stm32: fix

[PATCH 5/5] spi: stm32: always perform registers configuration prior to transfer

2020-08-07 Thread Alain Volmat
SPI registers content may have been lost upon suspend/resume sequence. So, always compute and apply the necessary configuration in stm32_spi_transfer_one_setup routine. Signed-off-by: Alain Volmat --- drivers/spi/spi-stm32.c | 42 +- 1 file changed, 17

[PATCH 4/5] spi: stm32: fixes suspend/resume management

2020-08-07 Thread Alain Volmat
From: Amelie Delaunay This patch adds pinctrl power management, and reconfigure spi controller in case of resume. Fixes: 038ac869c9d2 ("spi: stm32: add runtime PM support") Signed-off-by: Amelie Delaunay Signed-off-by: Alain Volmat --- drivers/spi/spi-st

[PATCH 3/5] spi: stm32: fix stm32_spi_prepare_mbr in case of odd clk_rate

2020-08-07 Thread Alain Volmat
From: Amelie Delaunay Fix spi->clk_rate when it is odd to the nearest lowest even value because minimum SPI divider is 2. Signed-off-by: Amelie Delaunay Signed-off-by: Alain Volmat --- drivers/spi/spi-stm32.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/

[PATCH 2/5] spi: stm32: fix fifo threshold level in case of short transfer

2020-08-07 Thread Alain Volmat
From: Amelie Delaunay When transfer is shorter than half of the fifo, set the data packet size up to transfer size instead of up to half of the fifo. Check also that threshold is set at least to 1 data frame. Signed-off-by: Amelie Delaunay Signed-off-by: Alain Volmat --- drivers/spi/spi

[PATCH 1/5] spi: stm32h7: fix race condition at end of transfer

2020-08-07 Thread Alain Volmat
spi_finalize_current_transfer(). Move the call to spi_finalize_current_transfer() _after_ the call to stm32_spi_disable(). Signed-off-by: Antonio Borneo Signed-off-by: Alain Volmat --- drivers/spi/spi-stm32.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/spi/spi-stm32.c b

Re: [PATCH 02/18] spi: stm32-spi: defer probe for reset

2020-08-07 Thread Alain Volmat
On Wed, Aug 05, 2020 at 11:49:06AM +0100, Mark Brown wrote: > On Wed, Aug 05, 2020 at 09:01:57AM +0200, Alain Volmat wrote: > > > - rst = devm_reset_control_get_exclusive(>dev, NULL); > > - if (!IS_ERR(rst)) { > > + rst = devm_reset_control_get_op

Re: [PATCH v2 0/2] arm: sti: LL_UART updates & STiH418 addition

2020-09-18 Thread Alain Volmat
Hi Linus On Sat, Sep 12, 2020 at 12:13:59PM +0200, Linus Walleij wrote: > On Sun, Aug 30, 2020 at 9:58 PM Alain Volmat wrote: > > > This serie update the STi Platform LL_UART code to rely on > > DEBUG_UART_PHYS & DEBUG_UART_VIRT and add the STiH418 SoC support. &

Re: [PATCH 2/2] ARM: dts: sti: Introduce 4KOpen (stih418-b2264) board

2021-01-28 Thread Alain Volmat
Hi Arnd, thanks for the comments and sorry for the large 'To' list. In my v2 I'll limit to Patrice Chotard (STi maintainer). On Thu, Jan 28, 2021 at 02:08:51PM +0100, Arnd Bergmann wrote: > On Thu, Jan 28, 2021 at 8:58 AM Alain Volmat wrote: > > > > 4KOpen (B2264) i

[PATCH 2/2] ARM: dts: sti: Introduce 4KOpen (stih418-b2264) board

2021-01-28 Thread Alain Volmat
4KOpen (B2264) is a board based on the STMicroelectronics STiH418 soc: - 2GB DDR - HDMI - Ethernet 1000-BaseT - PCIe (mini PCIe connector) - MicroSD slot - USB2 and USB3 connectors - Sata - 40 pins GPIO header Signed-off-by: Alain Volmat --- arch/arm/boot/dts/Makefile

[PATCH 1/2] ARM: dts: sti: add the spinor controller node within stih407-family

2021-01-28 Thread Alain Volmat
add the spinor controller node within stih407-family. Signed-off-by: Alain Volmat --- arch/arm/boot/dts/stih407-family.dtsi | 15 +++ 1 file changed, 15 insertions(+) diff --git a/arch/arm/boot/dts/stih407-family.dtsi b/arch/arm/boot/dts/stih407-family.dtsi index 23a1746f3baa

[PATCH v2 0/3] Introduction of STiH418 based 4KOpen board

2021-01-28 Thread Alain Volmat
is not available on this platform and is thus disabled. Alain Volmat (3): ARM: dts: sti: add the spinor controller node within stih407-family ARM: dts: sti: disable rng11 on the stih418 platform ARM: dts: sti: Introduce 4KOpen (stih418-b2264) board arch/arm/boot/dts/Makefile| 3

[PATCH v2 1/3] ARM: dts: sti: add the spinor controller node within stih407-family

2021-01-28 Thread Alain Volmat
The STiH407 family (and further versions STiH410/STiH418) embedded a serial flash controller allowing fast access to SPI-NOR. This commit adds the corresponding node, relying on the st-spi-fsm drivers. Signed-off-by: Alain Volmat --- v2: commit log improvement arch/arm/boot/dts/stih407

[PATCH v2 3/3] ARM: dts: sti: Introduce 4KOpen (stih418-b2264) board

2021-01-28 Thread Alain Volmat
4KOpen (B2264) is a board based on the STMicroelectronics STiH418 soc: - 2GB DDR - HDMI - Ethernet 1000-BaseT - PCIe (mini PCIe connector) - MicroSD slot - USB2 and USB3 connectors - Sata - 40 pins GPIO header Signed-off-by: Alain Volmat --- v2: fix bootargs (removal of console

[PATCH v2 0/3] Introduction of STiH418 based 4KOpen board

2021-01-28 Thread Alain Volmat
is not available on this platform and is thus disabled. Alain Volmat (3): ARM: dts: sti: add the spinor controller node within stih407-family ARM: dts: sti: disable rng11 on the stih418 platform ARM: dts: sti: Introduce 4KOpen (stih418-b2264) board arch/arm/boot/dts/Makefile| 3

[PATCH v2 2/3] ARM: dts: sti: disable rng11 on the stih418 platform

2021-01-28 Thread Alain Volmat
The rng11 is not available on the STiH418 hence is disabled in the stih418.dtsi Signed-off-by: Alain Volmat --- arch/arm/boot/dts/stih418.dtsi | 4 1 file changed, 4 insertions(+) diff --git a/arch/arm/boot/dts/stih418.dtsi b/arch/arm/boot/dts/stih418.dtsi index a05e2278b448..39a249983496

Re: [PATCH] [v2] i2c: stm32f7: Fix runtime PM imbalance on error

2020-05-31 Thread Alain Volmat
Hi, Reviewed-by: Alain Volmat Thanks, Alain On Wed, May 27, 2020 at 01:38:53AM +, Dinghao Liu wrote: > pm_runtime_get_sync() increments the runtime PM usage counter even > the call returns an error code. Thus a pairing decrement is needed > on the error handling path to keep th

Re: [PATCH] i2c: stm32f7: Fix runtime PM imbalance in stm32f7_i2c_reg_slave

2020-05-26 Thread Alain Volmat
Hi Dinghao, Thanks for the patch. Indeed, this should be fixed. Overall, there are several other calls to pm_runtime_get_sync within this driver, would you like to fix them all at once ? On Thu, May 21, 2020 at 03:05:07PM +0800, Dinghao Liu wrote: > pm_runtime_get_sync() increments the runtime

Re: [PATCH 1/4] i2c: smbus: add core function handling SMBus host-notify

2020-05-26 Thread Alain Volmat
On Sat, May 23, 2020 at 10:46:25AM +, Wolfram Sang wrote: > > Adding Benjamin who mainly implemented this. > > On Tue, May 05, 2020 at 07:51:08AM +0200, Alain Volmat wrote: > > SMBus Host-Notify protocol, from the adapter point of view > > consist of receiving

Re: [PATCH 3/4] dt-bindings: i2c-stm32: add SMBus Alert bindings

2020-05-26 Thread Alain Volmat
On Sat, May 23, 2020 at 10:36:01AM +, w...@kernel.org wrote: > > > > > +st,smbus-alert: > > > > + description: Enable the SMBus Alert feature > > > > + $ref: /schemas/types.yaml#/definitions/flag > > > > + > > > > > > We already have smbus_alert interrupt. Can't you

Re: [PATCH 4/4] i2c: stm32f7: Add SMBus-specific protocols support

2020-05-26 Thread Alain Volmat
On Sat, May 23, 2020 at 01:01:40PM +0200, Wolfram Sang wrote: > > > +static int stm32f7_i2c_reg_client(struct i2c_client *client) > > +{ > > + struct stm32f7_i2c_dev *i2c_dev = i2c_get_adapdata(client->adapter); > > + int ret; > > + > > + if (client->flags & I2C_CLIENT_HOST_NOTIFY) { > > +

Re: Re: [PATCH] i2c: stm32f7: Fix runtime PM imbalance in stm32f7_i2c_reg_slave

2020-05-26 Thread Alain Volmat
On Tue, May 26, 2020 at 09:00:23PM +0800, dinghao@zju.edu.cn wrote: > > > Overall, there are several other calls to pm_runtime_get_sync within this > > driver, would you like to fix them all at once ? > > > > Sure, I will send a new patch to merge them all. Thanks, you might want to add a

[PATCH] i2c: i2c-stm32f7: remove warning when compiling with W=1

2019-10-04 Thread Alain Volmat
Remove the following warning: drivers/i2c/busses/i2c-stm32f7.c:315: warning: cannot understand function prototype: 'struct stm32f7_i2c_spec i2c_specs[] = Signed-off-by: Alain Volmat --- drivers/i2c/busses/i2c-stm32f7.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers

Re: [PATCH] i2c: i2c-stm32f7: remove warning when compiling with W=1

2019-10-07 Thread Alain Volmat
ion prototype after the comment. Regards, Alain > > Thanks > > On 10/4/19 4:55 PM, Alain Volmat wrote: > > Remove the following warning: > > > > drivers/i2c/busses/i2c-stm32f7.c:315: > > warning: cannot understand function prototype: > > 's

[PATCH] i2c: fix missing pm_runtime_put_sync in i2c_device_probe

2020-04-30 Thread Alain Volmat
("i2c: Prevent runtime suspend of adapter when Host Notify is required") Signed-off-by: Alain Volmat --- drivers/i2c/i2c-core-base.c | 22 -- 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/drivers/i2c/i2c-core-base.c b/drivers/i2c/i2c-core-base.c index 13

[PATCH] i2c: i2c-stm32f7: rework slave_id allocation

2019-10-15 Thread Alain Volmat
when performing a 7-bits address allocation. Fixes: 60d609f3 ("i2c: i2c-stm32f7: Add slave support") Signed-off-by: Alain Volmat --- drivers/i2c/busses/i2c-stm32f7.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/i2c/busses/i2c-stm32f7.c b/drivers/i2c/

[PATCH v2] i2c: i2c-stm32f7: remove warning when compiling with W=1

2019-10-15 Thread Alain Volmat
: i2c-stm32f7: add driver") Signed-off-by: Alain Volmat --- Changes in v2: update commit description --- drivers/i2c/busses/i2c-stm32f7.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/i2c/busses/i2c-stm32f7.c b/drivers/i2c/busses/i2c-stm32f7.c index d36cf08461f7..7a

[PATCH v2 3/4] dt-bindings: i2c-stm32: add SMBus Alert bindings

2020-06-25 Thread Alain Volmat
ing cannot be used and a dedicated binding is introduced. Signed-off-by: Alain Volmat --- v2: Clarify commit message Documentation/devicetree/bindings/i2c/st,stm32-i2c.yaml | 4 1 file changed, 4 insertions(+) diff --git a/Documentation/devicetree/bindings/i2c/st,stm32-i2c.yaml b/Doc

[PATCH v2 0/4] stm32-f7: Addition of SMBus Alert / Host-notify features

2020-06-25 Thread Alain Volmat
This serie adds SMBus Alert and SMBus Host-Notify features for the i2c-stm32f7. This serie v2 rework comments from the 1st serie and replace the very generic reg_client / unreg_client callback with HOST_NOTIFY only reg_hnotify_cli and unreg_hnotify_cli callbacks. Alain Volmat (4): i2c: smbus

[PATCH v2 4/4] i2c: stm32f7: Add SMBus-specific protocols support

2020-06-25 Thread Alain Volmat
ed for all IRQ generated by the stm32 I2C controller. Signed-off-by: Alain Volmat --- v2: adapt code to use reg_hnotify_cli / unreg_hnotify_cli instead of reg_client / unreg_client clarify commit message drivers/i2c/busses/Kconfig | 1 + drivers/i2c/busses/i2c-stm32

[PATCH v2 2/4] i2c: addition of client hnotify reg/unreg callbacks

2020-06-25 Thread Alain Volmat
Addition of two callbacks reg_hnotify_cli and unreg_hnotify_cli that can be implemented by adapter drivers in order to take action whenever a client with HOST_NOTIFY flag is being registered to it. Signed-off-by: Alain Volmat --- v2: replace generic client reg/unreg callbacks with host-notify

[PATCH v2 1/4] i2c: smbus: add core function handling SMBus host-notify

2020-06-25 Thread Alain Volmat
the client. This commit introduces two new core functions * i2c_new_smbus_host_notify_device * i2c_free_smbus_host_notify_device that take care of registration of the new slave device and callback and will call i2c_handle_smbus_host_notify once a Host-Notify event is received. Signed-off-by: Alain

[PATCH 1/2] media: stm32-dcmi: create video dev within notifier bound

2020-07-28 Thread Alain Volmat
with the release which is already done within the notifier unbind handler. Fixes: 37404f91ef8b ("[media] stm32-dcmi: STM32 DCMI camera interface driver") Signed-off-by: Alain Volmat --- drivers/media/platform/stm32/stm32-dcmi.c | 23 --- 1 file changed, 12 insertions(+), 11

[PATCH 0/2] Error handling fixes in stm32-dcmi driver

2020-07-28 Thread Alain Volmat
and but never deleted upon removal of the module if sensor initialization is failing) Alain Volmat (2): media: stm32-dcmi: create video dev within notifier bound media: stm32-dcmi: fix probe error path & module remove drivers/media/platform/stm32/stm32-dcmi.c | 29 + 1

[PATCH 2/2] media: stm32-dcmi: fix probe error path & module remove

2020-07-28 Thread Alain Volmat
This commit add missing vb2_queue_release calls with the probe error path and module remove. Missing v4l2_async_notifier_unregister is also added within the probe error path Fixes: 37404f91ef8b ("[media] stm32-dcmi: STM32 DCMI camera interface driver") Signed-off-by: Alain Volmat --

Re: [PATCH v2 1/2] i2c: smbus: add core function handling SMBus host-notify

2020-07-28 Thread Alain Volmat
> > * i2c_free_slave_host_notify_device > > that take care of registration of the new slave device and > > callback and will call i2c_handle_smbus_host_notify once a > > Host-Notify event is received. > > > > Signed-off

[PATCH 3/4] dt-bindings: i2c-stm32: add SMBus Alert bindings

2020-05-04 Thread Alain Volmat
Add a new binding of the i2c-stm32f7 driver to enable the handling of the SMBUS-Alert Signed-off-by: Alain Volmat --- Documentation/devicetree/bindings/i2c/st,stm32-i2c.yaml | 4 1 file changed, 4 insertions(+) diff --git a/Documentation/devicetree/bindings/i2c/st,stm32-i2c.yaml b

[PATCH 2/4] i2c: addition of client reg/unreg callbacks

2020-05-04 Thread Alain Volmat
Addition of two callbacks reg_client and unreg_client that can be implemented by adapter drivers in order to take action whenever a client is being registered to it. Signed-off-by: Alain Volmat --- drivers/i2c/i2c-core-base.c | 11 +++ include/linux/i2c.h | 6 ++ 2 files

[PATCH 1/4] i2c: smbus: add core function handling SMBus host-notify

2020-05-04 Thread Alain Volmat
the client. This commit introduces two new core functions * i2c_new_smbus_host_notify_device * i2c_free_smbus_host_notify_device that take care of registration of the new slave device and callback and will call i2c_handle_smbus_host_notify once a Host-Notify event is received. Signed-off-by: Alain

[PATCH 0/4] stm32-f7: Addition of SMBus Alert / Host-notify features

2020-05-04 Thread Alain Volmat
when there is a client requesting the host-notify. (Since SMBus host-notify is using the address 0x08 which is a valid I2C address, keeping host-notify always enabled would make the 0x08 I2C slave address non usable). Alain Volmat (4): i2c: smbus: add core function handling SMBus host-notify

[PATCH 4/4] i2c: stm32f7: Add SMBus-specific protocols support

2020-05-04 Thread Alain Volmat
This patch adds the support for SMBus Host notify and SMBus Alert extensions protocols Signed-off-by: Alain Volmat --- drivers/i2c/busses/Kconfig | 1 + drivers/i2c/busses/i2c-stm32f7.c | 198 +-- 2 files changed, 189 insertions(+), 10 deletions(-) diff

Re: [PATCH 3/4] dt-bindings: i2c-stm32: add SMBus Alert bindings

2020-05-12 Thread Alain Volmat
Hello Rob, On Wed, May 13, 2020 at 02:19:32AM +, Rob Herring wrote: > On Tue, May 05, 2020 at 07:51:10AM +0200, Alain Volmat wrote: > > Add a new binding of the i2c-stm32f7 driver to enable the handling > > of the SMBUS-Alert > > > > Signed-off-by: Alain Volmat

Re: [PATCH 3/4] dt-bindings: i2c-stm32: add SMBus Alert bindings

2020-05-18 Thread Alain Volmat
Gentle Reminder, as I wrote in my previous responce, smbus_alert interrupt refers to an host and not a client. And since we do not have a dedicated irq for smbus_alert, I propose to add this st, binding to enable the smbus_alert mechanism. On Wed, May 13, 2020 at 07:42:31AM +0200, Alain Volmat

Re: [PATCH 4/4] i2c: stm32f7: Add SMBus-specific protocols support

2020-06-30 Thread Alain Volmat
Hi Wolfram, > I meant a generic binding for the host-controller. It could be seen as a > HW description if we need HostNotify on that bus or not. > > Maybe it becomes more clear with the R-Car I2C controller as an example. > It only supports one slave address. If I want HostNotify there, I can't

Re: [PATCH v2 1/4] i2c: smbus: add core function handling SMBus host-notify

2020-07-02 Thread Alain Volmat
Hi Wolfram, > Okay, now I got it to work, I also noted a few more issues. > > First, I'd suggest s/i2c_smbus_host_notify/i2c_slave_host_notify/g for > all occurences in this patch. This makes a stronger distinction between > the generic HostNotify support and the slave specific one. Ok with

[PATCH 1/2] i2c: smbus: add core function handling SMBus host-notify

2020-07-02 Thread Alain Volmat
the client. This commit introduces two new core functions * i2c_new_slave_host_notify_device * i2c_free_slave_host_notify_device that take care of registration of the new slave device and callback and will call i2c_handle_smbus_host_notify once a Host-Notify event is received. Signed-off-by: Alain

[PATCH 2/2] i2c: stm32f7: Add SMBus Host-Notify protocol support

2020-07-02 Thread Alain Volmat
Rely on the core functions to implement the host-notify protocol via the a I2C slave device. Signed-off-by: Alain Volmat --- drivers/i2c/busses/Kconfig | 1 + drivers/i2c/busses/i2c-stm32f7.c | 110 +-- 2 files changed, 96 insertions(+), 15 deletions

[PATCH 0/2] i2c: stm32: add host-notify support via i2c slave

2020-07-02 Thread Alain Volmat
This serie replaces the previous 'stm32-f7: Addition of SMBus Alert / Host-notify features' serie to only focus on the SMBus Host-Notify feature. It should be applied with "[PATCH] i2c: add binding to mark a bus as SMBus" from Wolfram which defines the newly introduced "smbus&q

[PATCH v2 0/2] i2c: stm32: add host-notify support via i2c slave

2020-07-03 Thread Alain Volmat
This serie replaces the previous 'stm32-f7: Addition of SMBus Alert / Host-notify features' serie to only focus on the SMBus Host-Notify feature. It should be applied with "[PATCH] i2c: add binding to mark a bus as SMBus" from Wolfram which defines the newly introduced "smbus&q

  1   2   3   >