Re: [PATCH v7 14/34] i2c: tegra: Clean up probe function

2020-09-21 Thread Thierry Reding
On Thu, Sep 17, 2020 at 04:46:45PM +0300, Andy Shevchenko wrote: > On Thu, Sep 17, 2020 at 3:37 PM Thierry Reding > wrote: > > On Wed, Sep 09, 2020 at 01:39:46AM +0300, Dmitry Osipenko wrote: > > ... > > > > + ret = devm_request_irq(&pdev

Re: [PATCH v7 12/34] i2c: tegra: Use clk-bulk helpers

2020-09-21 Thread Thierry Reding
On Thu, Sep 17, 2020 at 06:01:56PM +0300, Dmitry Osipenko wrote: [...] > It's still possible to add the clk-num checking, but it should be > unpractical. We could always add it later on if there will be a real > incident. Do you agree? There's also clk_bulk_get(), which allows you to specify the n

Re: [PATCH v7 12/34] i2c: tegra: Use clk-bulk helpers

2020-09-21 Thread Thierry Reding
On Thu, Sep 17, 2020 at 06:01:56PM +0300, Dmitry Osipenko wrote: > 17.09.2020 14:38, Thierry Reding пишет: > > On Wed, Sep 09, 2020 at 01:39:44AM +0300, Dmitry Osipenko wrote: > >> Use clk-bulk helpers and factor out clocks initialization into separate > >> function in

Re: [PATCH v7 12/34] i2c: tegra: Use clk-bulk helpers

2020-09-21 Thread Thierry Reding
On Thu, Sep 17, 2020 at 04:54:28PM +0300, Andy Shevchenko wrote: > On Thu, Sep 17, 2020 at 2:38 PM Thierry Reding > wrote: > > On Wed, Sep 09, 2020 at 01:39:44AM +0300, Dmitry Osipenko wrote: > > > Use clk-bulk helpers and factor out clocks initialization into separate >

Re: [PATCH v7 08/34] i2c: tegra: Remove error message used for devm_request_irq() failure

2020-09-21 Thread Thierry Reding
On Thu, Sep 17, 2020 at 05:59:28PM +0300, Dmitry Osipenko wrote: > 17.09.2020 14:28, Thierry Reding пишет: > > On Wed, Sep 09, 2020 at 01:39:40AM +0300, Dmitry Osipenko wrote: > >> The error message prints number of vIRQ, which isn't a useful information. > >> In p

Re: [PATCH v7 06/34] i2c: tegra: Remove i2c_dev.clk_divisor_non_hs_mode member

2020-09-21 Thread Thierry Reding
On Thu, Sep 17, 2020 at 06:27:28PM +0300, Dmitry Osipenko wrote: > 17.09.2020 14:25, Thierry Reding пишет: > > On Wed, Sep 09, 2020 at 01:39:38AM +0300, Dmitry Osipenko wrote: > >> The "non_hs_mode" divisor value is fixed, thus there is no ne

Re: [PATCH v7 00/34] Improvements for Tegra I2C driver

2020-09-21 Thread Thierry Reding
On Mon, Sep 21, 2020 at 10:18:27AM +, Thierry Reding wrote: > On Wed, 09 Sep 2020 01:39:32 +0300, Dmitry Osipenko wrote: > > Hello! > > > > This series performs refactoring of the Tegra I2C driver code and hardens > > the atomic-transfer mode. > > > >

Re: [PATCH v7 29/34] i2c: tegra: Improve formatting of variables

2020-09-21 Thread Thierry Reding
> Signed-off-by: Dmitry Osipenko > --- > drivers/i2c/busses/i2c-tegra.c | 97 -- > 1 file changed, 45 insertions(+), 52 deletions(-) Tested-by: Thierry Reding

Re: [PATCH v7 30/34] i2c: tegra: Clean up variable names

2020-09-21 Thread Thierry Reding
gt; > All dev/&pdev->dev are replaced with i2c_dev->dev in order to have uniform > code style across the driver. > > Signed-off-by: Dmitry Osipenko > --- > drivers/i2c/busses/i2c-tegra.c | 173 ++++- > 1 file changed, 86 insertions(+), 87 deletions(-) Tested-by: Thierry Reding

Re: [PATCH v7 31/34] i2c: tegra: Clean up printk messages

2020-09-21 Thread Thierry Reding
y: Dmitry Osipenko > Acked-by: Thierry Reding > --- > drivers/i2c/busses/i2c-tegra.c | 37 +- > 1 file changed, 14 insertions(+), 23 deletions(-) Tested-by: Thierry Reding

Re: [PATCH v7 32/34] i2c: tegra: Clean up and improve comments

2020-09-21 Thread Thierry Reding
s/i2c-tegra.c | 88 ++ > 1 file changed, 47 insertions(+), 41 deletions(-) Tested-by: Thierry Reding

Re: [PATCH v7 27/34] i2c: tegra: Check errors for both positive and negative values

2020-09-21 Thread Thierry Reding
_runtime_get_sync() could return positive value on success, hence only > relevant parts of the code are changed by this patch. > > Reviewed-by: Michał Mirosław > Signed-off-by: Dmitry Osipenko > --- > drivers/i2c/busses/i2c-tegra.c | 6 +++--- > 1 file changed, 3 insertions(

Re: [PATCH v7 26/34] i2c: tegra: Factor out hardware initialization into separate function

2020-09-21 Thread Thierry Reding
t; out it in order to have a bit cleaner error handling in tegra_i2c_probe(). > > Signed-off-by: Dmitry Osipenko > Acked-by: Thierry Reding > --- > drivers/i2c/busses/i2c-tegra.c | 32 +++- > 1 file changed, 19 insertions(+), 13 deletions(-) Tested-by: Thierry Reding

Re: [PATCH v7 25/34] i2c: tegra: Factor out register polling into separate function

2020-09-21 Thread Thierry Reding
sses/i2c-tegra.c | 57 +++--- > 1 file changed, 25 insertions(+), 32 deletions(-) Tested-by: Thierry Reding

Re: [PATCH v7 19/34] i2c: tegra: Remove redundant check in tegra_i2c_issue_bus_clear()

2020-09-21 Thread Thierry Reding
On Wed, 09 Sep 2020 01:39:51 +0300, Dmitry Osipenko wrote: > The tegra_i2c_wait_for_config_load() checks for 'has_config_load_reg' by > itself, hence there is no need to duplicate the check. > > Signed-off-by: Dmitry Osipenko > Acked-by: Thierry Reding > --- >

Re: [PATCH v7 00/34] Improvements for Tegra I2C driver

2020-09-21 Thread Thierry Reding
On Wed, 09 Sep 2020 01:39:32 +0300, Dmitry Osipenko wrote: > Hello! > > This series performs refactoring of the Tegra I2C driver code and hardens > the atomic-transfer mode. > > Changelog: > > v7: - Reworked the "Clean up probe function" patch by moving out all > variable renamings into th

Re: [PATCH v7 03/34] i2c: tegra: Handle potential error of tegra_i2c_flush_fifos()

2020-09-21 Thread Thierry Reding
> for completeness. > > Reviewed-by: Michał Mirosław > Signed-off-by: Dmitry Osipenko > Reviewed-by: Thierry Reding > --- > drivers/i2c/busses/i2c-tegra.c | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) Tested-by: Thierry Reding

Re: [PATCH v7 09/34] i2c: tegra: Use reset_control_reset()

2020-09-21 Thread Thierry Reding
ng > a noisy warning if it fails, which will indicate an existence of a severe > problem, while still allow machine to boot up. > > Reviewed-by: Michał Mirosław > Signed-off-by: Dmitry Osipenko > Acked-by: Thierry Reding > --- > drivers/i2c/busses/i2c-tegra.c | 13

Re: [PATCH v7 10/34] i2c: tegra: Use devm_platform_get_and_ioremap_resource()

2020-09-21 Thread Thierry Reding
On Wed, 09 Sep 2020 01:39:42 +0300, Dmitry Osipenko wrote: > Driver now uses devm_platform_get_and_ioremap_resource() which replaces > the typical boilerplate code and makes code cleaner. > > Reviewed-by: Michał Mirosław > Signed-off-by: Dmitry Osipenko > Acked-

Re: [PATCH v7 33/34] i2c: tegra: Clean up whitespaces, newlines and indentation

2020-09-21 Thread Thierry Reding
s / newlines, clears indentation of the code. > > Reviewed-by: Michał Mirosław > Signed-off-by: Dmitry Osipenko > Acked-by: Thierry Reding > --- > drivers/i2c/busses/i2c-tegra.c | 72 +- > 1 file changed, 45 insertions(+), 27 deletions(-) Tested-by: Thierry Reding

Re: [PATCH v7 34/34] i2c: tegra: Improve driver module description

2020-09-21 Thread Thierry Reding
On Wed, 09 Sep 2020 01:40:06 +0300, Dmitry Osipenko wrote: > Use proper spelling of "NVIDIA" and don't designate driver as Tegra2-only > since newer SoC generations are supported as well. > > Reviewed-by: Michał Mirosław > Signed-off-by: Dmitry Osipen

Re: [PATCH v7 20/34] i2c: tegra: Remove "dma" variable from tegra_i2c_xfer_msg()

2020-09-21 Thread Thierry Reding
should be better to have the variable removed. This makes code > more consistent. > > Signed-off-by: Dmitry Osipenko > Acked-by: Thierry Reding > --- > drivers/i2c/busses/i2c-tegra.c | 17 ++++- > 1 file changed, 8 insertions(+), 9 deletions(-) Tested-by: Thierry Reding

Re: [PATCH v7 23/34] i2c: tegra: Factor out error recovery from tegra_i2c_xfer_msg()

2020-09-21 Thread Thierry Reding
On Wed, 09 Sep 2020 01:39:55 +0300, Dmitry Osipenko wrote: > Factor out error recovery code from tegra_i2c_xfer_msg() in order to > make this function easier to read and follow. > > Reviewed-by: Michał Mirosław > Signed-off-by: Dmitry Osipenko > Acked-by: Thierry Reding &g

Re: [PATCH v7 22/34] i2c: tegra: Rename wait/poll functions

2020-09-21 Thread Thierry Reding
On Wed, 09 Sep 2020 01:39:54 +0300, Dmitry Osipenko wrote: > Drop '_timeout' postfix from the wait/poll completion function names in > order to make the names shorter, making code cleaner a tad. > > Reviewed-by: Michał Mirosław > Signed-off-by: Dmitry Osipenko &

Re: [PATCH v7 21/34] i2c: tegra: Don't fall back to PIO mode if DMA configuration fails

2020-09-21 Thread Thierry Reding
to have a > cleaner and simpler code. Now I2C transfer will be failed if DMA > configuration fails. > > Signed-off-by: Dmitry Osipenko > --- > drivers/i2c/busses/i2c-tegra.c | 18 ++ > 1 file changed, 10 insertions(+), 8 deletions(-) Tested-by: Thierry Reding

Re: [PATCH v7 18/34] i2c: tegra: Remove likely/unlikely from the code

2020-09-21 Thread Thierry Reding
> in the code. Hence remove them. > > Reviewed-by: Michał Mirosław > Signed-off-by: Dmitry Osipenko > Acked-by: Thierry Reding > --- > drivers/i2c/busses/i2c-tegra.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) Tested-by: Thierry Reding

Re: [PATCH v7 28/34] i2c: tegra: Consolidate error handling in tegra_i2c_xfer_msg()

2020-09-21 Thread Thierry Reding
sses/i2c-tegra.c | 13 + > 1 file changed, 9 insertions(+), 4 deletions(-) Tested-by: Thierry Reding

Re: [PATCH v7 15/34] i2c: tegra: Reorder location of functions in the code

2020-09-21 Thread Thierry Reding
rototype for tegra_i2c_init(). > > Reviewed-by: Michał Mirosław > Signed-off-by: Dmitry Osipenko > Acked-by: Thierry Reding > --- > drivers/i2c/busses/i2c-tegra.c | 486 - > 1 file changed, 242 insertions(+), 244 deletions(-) Tested-by: Thierry Reding

Re: [PATCH v7 16/34] i2c: tegra: Clean up variable types

2020-09-21 Thread Thierry Reding
On Wed, 09 Sep 2020 01:39:48 +0300, Dmitry Osipenko wrote: > Don't use signed types for unsigned values and use consistent types > for sibling variables. > > Signed-off-by: Dmitry Osipenko > Acked-by: Thierry Reding > --- > drivers/i

Re: [PATCH v7 14/34] i2c: tegra: Clean up probe function

2020-09-21 Thread Thierry Reding
emoval > order. > > Signed-off-by: Dmitry Osipenko > --- > drivers/i2c/busses/i2c-tegra.c | 100 - > 1 file changed, 49 insertions(+), 51 deletions(-) Tested-by: Thierry Reding

Re: [PATCH v7 17/34] i2c: tegra: Remove outdated barrier()

2020-09-21 Thread Thierry Reding
t; Hence barrier() has no good use anymore, let's remove it. > > Reviewed-by: Michał Mirosław > Signed-off-by: Dmitry Osipenko > Acked-by: Thierry Reding > --- > drivers/i2c/busses/i2c-tegra.c | 13 + > 1 file changed, 5 insertions(+), 8 deletions(-) Tested-by: Thierry Reding

Re: [PATCH v7 13/34] i2c: tegra: Move out all device-tree parsing into tegra_i2c_parse_dt()

2020-09-21 Thread Thierry Reding
On Wed, 09 Sep 2020 01:39:45 +0300, Dmitry Osipenko wrote: > Move out code related to device-tree parsing from the probe function into > tegra_i2c_parse_dt() in order to make code more consistent. > > Reviewed-by: Michał Mirosław > Signed-off-by: Dmitry Osipenko > Acked-

Re: [PATCH v7 24/34] i2c: tegra: Factor out packet header setup from tegra_i2c_xfer_msg()

2020-09-21 Thread Thierry Reding
ction in order to make code easier to read and follow. > > Reviewed-by: Michał Mirosław > Signed-off-by: Dmitry Osipenko > Acked-by: Thierry Reding > --- > drivers/i2c/busses/i2c-tegra.c | 92 -- > 1 file changed, 53 insertions(+), 39 deletions(-) Tested-by: Thierry Reding

Re: [PATCH v7 11/34] i2c: tegra: Use platform_get_irq()

2020-09-21 Thread Thierry Reding
nko > Acked-by: Thierry Reding > --- > drivers/i2c/busses/i2c-tegra.c | 9 +++-- > 1 file changed, 3 insertions(+), 6 deletions(-) Tested-by: Thierry Reding

Re: [PATCH v7 12/34] i2c: tegra: Use clk-bulk helpers

2020-09-21 Thread Thierry Reding
> 1 file changed, 67 insertions(+), 120 deletions(-) Tested-by: Thierry Reding

Re: [PATCH v7 05/34] i2c: tegra: Initialize div-clk rate unconditionally

2020-09-21 Thread Thierry Reding
rate and skips > rate-change if rate is unchanged. > > Reviewed-by: Michał Mirosław > Signed-off-by: Dmitry Osipenko > Acked-by: Thierry Reding > --- > drivers/i2c/busses/i2c-tegra.c | 34 -- > 1 file changed, 16 insertions(+), 18 deletions(-) Tested-by: Thierry Reding

Re: [PATCH v7 08/34] i2c: tegra: Remove error message used for devm_request_irq() failure

2020-09-21 Thread Thierry Reding
Michał Mirosław > Signed-off-by: Dmitry Osipenko > --- > drivers/i2c/busses/i2c-tegra.c | 4 +--- > 1 file changed, 1 insertion(+), 3 deletions(-) Tested-by: Thierry Reding

Re: [PATCH v7 06/34] i2c: tegra: Remove i2c_dev.clk_divisor_non_hs_mode member

2020-09-21 Thread Thierry Reding
can be > united with the timing selection. > > Reviewed-by: Michał Mirosław > Signed-off-by: Dmitry Osipenko > --- > drivers/i2c/busses/i2c-tegra.c | 46 -- > 1 file changed, 21 insertions(+), 25 deletions(-) Tested-by: Thierry Reding

Re: [PATCH v7 07/34] i2c: tegra: Runtime PM always available on Tegra

2020-09-21 Thread Thierry Reding
> > Reviewed-by: Michał Mirosław > Signed-off-by: Dmitry Osipenko > Reviewed-by: Thierry Reding > --- > drivers/i2c/busses/i2c-tegra.c | 29 ++--- > 1 file changed, 6 insertions(+), 23 deletions(-) Tested-by: Thierry Reding

Re: [PATCH v7 04/34] i2c: tegra: Mask interrupt in tegra_i2c_issue_bus_clear()

2020-09-21 Thread Thierry Reding
On Wed, 09 Sep 2020 01:39:36 +0300, Dmitry Osipenko wrote: > The tegra_i2c_issue_bus_clear() may fail and in this case BUS_CLR_DONE > stays unmasked. Hence let's mask it for consistency. This patch doesn't > fix any known problems. > > Signed-off-by: Dmitry Osipenko >

Re: [PATCH v7 02/34] i2c: tegra: Add missing pm_runtime_put()

2020-09-21 Thread Thierry Reding
in a case of pm_runtime_get_sync() error. > > Suggested-by: Andy Shevchenko > Signed-off-by: Dmitry Osipenko > Reviewed-by: Thierry Reding > --- > drivers/i2c/busses/i2c-tegra.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) Tested-by: Thierry Reding

Re: [PATCH v7 01/34] i2c: tegra: Make tegra_i2c_flush_fifos() usable in atomic transfer

2020-09-21 Thread Thierry Reding
2c-tegra.c | 25 - > 1 file changed, 16 insertions(+), 9 deletions(-) Tested-by: Thierry Reding

Re: [PATCH v7 31/34] i2c: tegra: Clean up printk messages

2020-09-17 Thread Thierry Reding
ned-off-by: Dmitry Osipenko > --- > drivers/i2c/busses/i2c-tegra.c | 37 +- > 1 file changed, 14 insertions(+), 23 deletions(-) Acked-by: Thierry Reding signature.asc Description: PGP signature

Re: [PATCH v7 14/34] i2c: tegra: Clean up probe function

2020-09-17 Thread Thierry Reding
On Wed, Sep 09, 2020 at 01:39:46AM +0300, Dmitry Osipenko wrote: > The driver's probe function code is a bit difficult to read. This patch > reorders code of the probe function, forming groups of code that are easy > to work with. The probe tear-down order now matches the driver-removal > order. >

Re: [PATCH v7 16/34] i2c: tegra: Clean up variable types

2020-09-17 Thread Thierry Reding
- > 1 file changed, 19 insertions(+), 19 deletions(-) Acked-by: Thierry Reding signature.asc Description: PGP signature

Re: [PATCH v7 00/34] Improvements for Tegra I2C driver

2020-09-17 Thread Thierry Reding
On Wed, Sep 09, 2020 at 05:49:02PM +0200, Wolfram Sang wrote: > On Wed, Sep 09, 2020 at 06:36:50PM +0300, Dmitry Osipenko wrote: > > 09.09.2020 12:11, Andy Shevchenko пишет: > > > On Wed, Sep 9, 2020 at 1:40 AM Dmitry Osipenko wrote: > > >> > > >> Hello! > > >> > > >> This series performs refactor

Re: [PATCH v7 17/34] i2c: tegra: Remove outdated barrier()

2020-09-17 Thread Thierry Reding
on. > Hence barrier() has no good use anymore, let's remove it. > > Reviewed-by: Michał Mirosław > Signed-off-by: Dmitry Osipenko > --- > drivers/i2c/busses/i2c-tegra.c | 13 + > 1 file changed, 5 insertions(+), 8 deletions(-) Acked-by: Thierry Reding signature.asc Description: PGP signature

Re: [PATCH v7 19/34] i2c: tegra: Remove redundant check in tegra_i2c_issue_bus_clear()

2020-09-17 Thread Thierry Reding
ra.c | 9 - > 1 file changed, 4 insertions(+), 5 deletions(-) Acked-by: Thierry Reding signature.asc Description: PGP signature

Re: [PATCH v7 18/34] i2c: tegra: Remove likely/unlikely from the code

2020-09-17 Thread Thierry Reding
s kind of performance critical. That said, it probably doesn't make a huge difference, so I don't have any objection: Acked-by: Thierry Reding signature.asc Description: PGP signature

Re: [PATCH v7 15/34] i2c: tegra: Reorder location of functions in the code

2020-09-17 Thread Thierry Reding
rototype for tegra_i2c_init(). > > Reviewed-by: Michał Mirosław > Signed-off-by: Dmitry Osipenko > --- > drivers/i2c/busses/i2c-tegra.c | 486 - > 1 file changed, 242 insertions(+), 244 deletions(-) Acked-by: Thierry Reding signature.asc Description: PGP signature

Re: [PATCH v7 34/34] i2c: tegra: Improve driver module description

2020-09-17 Thread Thierry Reding
gt; --- > drivers/i2c/busses/i2c-tegra.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) Acked-by: Thierry Reding signature.asc Description: PGP signature

Re: [PATCH v7 09/34] i2c: tegra: Use reset_control_reset()

2020-09-17 Thread Thierry Reding
mitting > a noisy warning if it fails, which will indicate an existence of a severe > problem, while still allow machine to boot up. > > Reviewed-by: Michał Mirosław > Signed-off-by: Dmitry Osipenko > --- > drivers/i2c/busses/i2c-tegra.c | 13 ++--- > 1 file

Re: [PATCH v7 33/34] i2c: tegra: Clean up whitespaces, newlines and indentation

2020-09-17 Thread Thierry Reding
sk_irq(i2c_dev, > +I2C_INT_NO_ACK | > +I2C_INT_ARBITRATION_LOST | > +I2C_INT_PACKET_XFER_COMPLETE | > +I2C_INT_TX_FIFO_DATA_REQ | > +I2C_INT_RX_FIFO_DATA_REQ); This now seems inconsistent with the choice in other places in this driver where we wrap only when necessary. I think it would be more consistent to align the subsequent lines with the parameters on the first line. Or alternatively assign to a local variable and pass that to tegra_i2c_mask_irq(). But the above is fine with me as well: Acked-by: Thierry Reding signature.asc Description: PGP signature

Re: [PATCH v7 32/34] i2c: tegra: Clean up and improve comments

2020-09-17 Thread Thierry Reding
On Wed, Sep 09, 2020 at 01:40:04AM +0300, Dmitry Osipenko wrote: > Make all comments to be consistent in regards to capitalization and > punctuation, correct spelling and grammar errors, improve wording. > > Signed-off-by: Dmitry Osipenko > --- > drivers/i2c/busses/i2c-tegra.c | 88 +

Re: [PATCH v7 30/34] i2c: tegra: Clean up variable names

2020-09-17 Thread Thierry Reding
On Wed, Sep 09, 2020 at 01:40:02AM +0300, Dmitry Osipenko wrote: > Rename "ret" variables to "err" in order to make code a bit more > expressive, emphasizing that the returned value is an error code. > Same vice versa, where appropriate. > > Rename variable "reg" to "val" in order to better reflec

Re: [PATCH v7 29/34] i2c: tegra: Improve formatting of variables

2020-09-17 Thread Thierry Reding
On Wed, Sep 09, 2020 at 01:40:01AM +0300, Dmitry Osipenko wrote: > Reorder definition of variables in the code to have them sorted by length > and grouped logically, also replace "unsigned long" with "u32". Do this in > order to make code easier to read. > > Signed-off-by: Dmitry Osipenko > --- >

Re: [PATCH v7 28/34] i2c: tegra: Consolidate error handling in tegra_i2c_xfer_msg()

2020-09-17 Thread Thierry Reding
On Wed, Sep 09, 2020 at 01:40:00AM +0300, Dmitry Osipenko wrote: > Consolidate error handling in tegra_i2c_xfer_msg() into a common code > path in order to make code cleaner. > > Reviewed-by: Michał Mirosław > Signed-off-by: Dmitry Osipenko > --- > drivers/i2c/busses/i2c-tegra.c | 13 +-

Re: [PATCH v7 27/34] i2c: tegra: Check errors for both positive and negative values

2020-09-17 Thread Thierry Reding
On Wed, Sep 09, 2020 at 01:39:59AM +0300, Dmitry Osipenko wrote: > The driver's code is inconsistent in regards to the error values checking. > The correct way should be to check both positive and negative values. > This patch cleans up the error-checks in the code. Note that the > pm_runtime_get_s

Re: [PATCH v7 26/34] i2c: tegra: Factor out hardware initialization into separate function

2020-09-17 Thread Thierry Reding
it, but since I don't feel strongly, I'll leave this up to Wolfram to decide: Acked-by: Thierry Reding signature.asc Description: PGP signature

Re: [PATCH v7 25/34] i2c: tegra: Factor out register polling into separate function

2020-09-17 Thread Thierry Reding
On Wed, Sep 09, 2020 at 01:39:57AM +0300, Dmitry Osipenko wrote: > Factor out register polling into a separate function in order to remove > boilerplate code and make code cleaner. > > Reviewed-by: Michał Mirosław > Signed-off-by: Dmitry Osipenko > --- > drivers/i2c/busses/i2c-tegra.c | 57

Re: [PATCH v7 24/34] i2c: tegra: Factor out packet header setup from tegra_i2c_xfer_msg()

2020-09-17 Thread Thierry Reding
> function in order to make code easier to read and follow. > > Reviewed-by: Michał Mirosław > Signed-off-by: Dmitry Osipenko > --- > drivers/i2c/busses/i2c-tegra.c | 92 -- > 1 file changed, 53 insertions(+), 39 deletions(-) Acked-by: Thierry

Re: [PATCH v7 23/34] i2c: tegra: Factor out error recovery from tegra_i2c_xfer_msg()

2020-09-17 Thread Thierry Reding
sses/i2c-tegra.c | 46 ++ > 1 file changed, 30 insertions(+), 16 deletions(-) Acked-by: Thierry Reding signature.asc Description: PGP signature

Re: [PATCH v7 22/34] i2c: tegra: Rename wait/poll functions

2020-09-17 Thread Thierry Reding
t; --- > drivers/i2c/busses/i2c-tegra.c | 32 ++-- > 1 file changed, 14 insertions(+), 18 deletions(-) Not sure this is really worth it, but I don't feel strongly, so: Acked-by: Thierry Reding signature.asc Description: PGP signature

Re: [PATCH v7 21/34] i2c: tegra: Don't fall back to PIO mode if DMA configuration fails

2020-09-17 Thread Thierry Reding
On Wed, Sep 09, 2020 at 01:39:53AM +0300, Dmitry Osipenko wrote: > The DMA code path has been tested well enough and the DMA configuration > performed by tegra_i2c_config_fifo_trig() shouldn't ever fail in practice. > Hence let's remove the obscure transfer-mode switching in order to have a > clean

Re: [PATCH v7 20/34] i2c: tegra: Remove "dma" variable from tegra_i2c_xfer_msg()

2020-09-17 Thread Thierry Reding
should be better to have the variable removed. This makes code > more consistent. > > Signed-off-by: Dmitry Osipenko > --- > drivers/i2c/busses/i2c-tegra.c | 17 ++++- > 1 file changed, 8 insertions(+), 9 deletions(-) Acked-by: Thierry Reding signature.asc Description: PGP signature

Re: [PATCH v7 12/34] i2c: tegra: Use clk-bulk helpers

2020-09-17 Thread Thierry Reding
On Wed, Sep 09, 2020 at 01:39:44AM +0300, Dmitry Osipenko wrote: > Use clk-bulk helpers and factor out clocks initialization into separate > function in order to make code cleaner. > > The clocks initialization now performed after reset-control initialization > in order to avoid a noisy -PROBE_DEF

Re: [PATCH v7 13/34] i2c: tegra: Move out all device-tree parsing into tegra_i2c_parse_dt()

2020-09-17 Thread Thierry Reding
--- > drivers/i2c/busses/i2c-tegra.c | 10 ++ > 1 file changed, 6 insertions(+), 4 deletions(-) Acked-by: Thierry Reding signature.asc Description: PGP signature

Re: [PATCH v7 11/34] i2c: tegra: Use platform_get_irq()

2020-09-17 Thread Thierry Reding
Dmitry Osipenko > --- > drivers/i2c/busses/i2c-tegra.c | 9 +++-- > 1 file changed, 3 insertions(+), 6 deletions(-) Acked-by: Thierry Reding signature.asc Description: PGP signature

Re: [PATCH v7 10/34] i2c: tegra: Use devm_platform_get_and_ioremap_resource()

2020-09-17 Thread Thierry Reding
rivers/i2c/busses/i2c-tegra.c | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) Acked-by: Thierry Reding signature.asc Description: PGP signature

Re: [PATCH v7 08/34] i2c: tegra: Remove error message used for devm_request_irq() failure

2020-09-17 Thread Thierry Reding
On Wed, Sep 09, 2020 at 01:39:40AM +0300, Dmitry Osipenko wrote: > The error message prints number of vIRQ, which isn't a useful information. > In practice devm_request_irq() never fails, hence let's remove the bogus > message in order to make code cleaner. > > Reviewed-by: Michał Mirosław > Sign

Re: [PATCH v7 07/34] i2c: tegra: Runtime PM always available on Tegra

2020-09-17 Thread Thierry Reding
e code. > > Reviewed-by: Michał Mirosław > Signed-off-by: Dmitry Osipenko > --- > drivers/i2c/busses/i2c-tegra.c | 29 ++--- > 1 file changed, 6 insertions(+), 23 deletions(-) Reviewed-by: Thierry Reding signature.asc Description: PGP signature

Re: [PATCH v7 06/34] i2c: tegra: Remove i2c_dev.clk_divisor_non_hs_mode member

2020-09-17 Thread Thierry Reding
On Wed, Sep 09, 2020 at 01:39:38AM +0300, Dmitry Osipenko wrote: > The "non_hs_mode" divisor value is fixed, thus there is no need to have > the variable i2c_dev.clk_divisor_non_hs_mode struct member. Let's remove > it and move the mode selection into tegra_i2c_init() where it can be > united with

Re: [PATCH v7 02/34] i2c: tegra: Add missing pm_runtime_put()

2020-09-17 Thread Thierry Reding
ng > in a case of pm_runtime_get_sync() error. > > Suggested-by: Andy Shevchenko > Signed-off-by: Dmitry Osipenko > --- > drivers/i2c/busses/i2c-tegra.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) Reviewed-by: Thierry Reding signature.asc Description: PGP signature

Re: [PATCH v7 05/34] i2c: tegra: Initialize div-clk rate unconditionally

2020-09-17 Thread Thierry Reding
caches rate and skips > rate-change if rate is unchanged. > > Reviewed-by: Michał Mirosław > Signed-off-by: Dmitry Osipenko > --- > drivers/i2c/busses/i2c-tegra.c | 34 -- > 1 file changed, 16 insertions(+), 18 deletions(-) Acked-by: Thierry Reding signature.asc Description: PGP signature

Re: [PATCH v7 04/34] i2c: tegra: Mask interrupt in tegra_i2c_issue_bus_clear()

2020-09-17 Thread Thierry Reding
nko > --- > drivers/i2c/busses/i2c-tegra.c | 2 ++ > 1 file changed, 2 insertions(+) Reviewed-by: Thierry Reding signature.asc Description: PGP signature

Re: [PATCH v7 03/34] i2c: tegra: Handle potential error of tegra_i2c_flush_fifos()

2020-09-17 Thread Thierry Reding
or check just > for completeness. > > Reviewed-by: Michał Mirosław > Signed-off-by: Dmitry Osipenko > --- > drivers/i2c/busses/i2c-tegra.c | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) Reviewed-by: Thierry Reding > diff --git a/drivers/i2c/busses/i2c-tegra

Re: [PATCH v7 01/34] i2c: tegra: Make tegra_i2c_flush_fifos() usable in atomic transfer

2020-09-17 Thread Thierry Reding
On Wed, Sep 09, 2020 at 01:39:33AM +0300, Dmitry Osipenko wrote: > The tegra_i2c_flush_fifos() shouldn't sleep in atomic transfer and jiffies > are not updating if interrupts are disabled. Let's switch to use iopoll > API helpers for register-polling. The iopoll API provides helpers for both > atom

Re: [PATCH -next] PCI: tegra: convert to use DEFINE_SEQ_ATTRIBUTE macro

2020-09-17 Thread Thierry Reding
On Wed, Sep 16, 2020 at 10:50:25AM +0800, Liu Shixin wrote: > Use DEFINE_SEQ_ATTRIBUTE macro to simplify the code. > > Signed-off-by: Liu Shixin > --- > drivers/pci/controller/pci-tegra.c | 28 +++- > 1 file changed, 3 insertions(+), 25 deletions(-)

Re: [PATCH] memory: tegra: Correct num_tlb_lines for tegra210

2020-09-17 Thread Thierry Reding
> drivers/memory/tegra/tegra210.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) Please send this as part of a series including: https://patchwork.ozlabs.org/project/linux-tegra/patch/20200916002359.10823-1-nicoleots...@gmail.com/ Adding Joerg for visibility. From the Tegra

Re: [PATCH] iommu/tegra-smmu: Fix tlb_mask

2020-09-17 Thread Thierry Reding
d Krzysztof (Cc'ed for visibility) are aware of both patches. From the Tegra side: Acked-by: Thierry Reding > diff --git a/drivers/iommu/tegra-smmu.c b/drivers/iommu/tegra-smmu.c > index 84fdee473873..0becdbfea306 100644 > --- a/drivers/iommu/tegra-smmu.c > +++ b/driv

Re: [PATCH RESEND v10 0/4] Support DRM bridges on NVIDIA Tegra

2020-09-17 Thread Thierry Reding
On Fri, Aug 14, 2020 at 01:06:52AM +0300, Dmitry Osipenko wrote: > Hello, > > This series adds initial support for the DRM bridges to NVIDIA Tegra DRM > driver. This is required by newer device-trees where we model the LVDS > encoder bridge properly. In particular this series is needed in order to

Re: [PATCH v3 10/10] ARM: tegra: nexus7: Add SMB347 battery charger

2020-09-17 Thread Thierry Reding
On Fri, Aug 14, 2020 at 12:34:09AM +0300, Dmitry Osipenko wrote: > From: David Heidelberg > > SMB347 is a battery charger controller which is found on the Nexus 7 > device. > > Signed-off-by: David Heidelberg > Signed-off-by: Dmitry Osipenko > --- > .../tegra30-asus-nexus7-grouper-common.dtsi

Re: [PATCH v2 1/4] dt-bindings: reserved-memory: Document "active" property

2020-09-15 Thread Thierry Reding
On Mon, Sep 14, 2020 at 04:08:29PM -0600, Rob Herring wrote: > On Fri, Sep 04, 2020 at 02:59:57PM +0200, Thierry Reding wrote: > > From: Thierry Reding > > > > Reserved memory regions can be marked as "active" if hardware is > > expected to access the regions

[RFC 4/4] iommu/tegra-smmu: Add support for reserved regions

2020-09-04 Thread Thierry Reding
From: Thierry Reding The Tegra DRM driver currently uses the IOMMU API explicitly. This means that it has fine-grained control over when exactly the translation through the IOMMU is enabled. This currently happens after the driver probes, so the driver is in a DMA quiesced state when the IOMMU

[PATCH v2 1/4] dt-bindings: reserved-memory: Document "active" property

2020-09-04 Thread Thierry Reding
From: Thierry Reding Reserved memory regions can be marked as "active" if hardware is expected to access the regions during boot and before the operating system can take control. One example where this is useful is for the operating system to infer whether the region needs to be identi

[PATCH v2 2/4] iommu: Implement of_iommu_get_resv_regions()

2020-09-04 Thread Thierry Reding
From: Thierry Reding This is an implementation that IOMMU drivers can use to obtain reserved memory regions from a device tree node. It uses the reserved-memory DT bindings to find the regions associated with a given device. These regions will be used to create 1:1 mappings in the IOMMU domain

[PATCH v2 3/4] iommu: dma: Use of_iommu_get_resv_regions()

2020-09-04 Thread Thierry Reding
From: Thierry Reding For device tree nodes, use the standard of_iommu_get_resv_regions() implementation to obtain the reserved memory regions associated with a device. Cc: Rob Herring Cc: Frank Rowand Cc: devicet...@vger.kernel.org Signed-off-by: Thierry Reding --- drivers/iommu/dma-iommu.c

Re: [PATCH] PCI: tegra: Convert to MSI domains

2020-09-04 Thread Thierry Reding
On Fri, Sep 04, 2020 at 08:45:01AM -0300, Jason Gunthorpe wrote: > On Fri, Sep 04, 2020 at 12:56:13PM +0200, Thierry Reding wrote: > > +static void tegra_msi_irq_mask(struct irq_data *d) > > +{ > > + struct tegra_msi *msi = irq_data_get_irq_chip_data(d); > >

Re: [PATCH RESEND v3] iommu/tegra-smmu: Add missing locks around mapping operations

2020-09-04 Thread Thierry Reding
On Fri, Sep 04, 2020 at 11:05:19AM +0200, Joerg Roedel wrote: > On Fri, Aug 14, 2020 at 07:22:52PM +0300, Dmitry Osipenko wrote: > > The mapping operations of the Tegra SMMU driver are subjected to a race > > condition issues because SMMU Address Space isn't allocated and freed > > atomically, whil

Re: [PATCH v5] iommu/tegra-smmu: Add locking around mapping operations

2020-09-04 Thread Thierry Reding
ed, 84 insertions(+), 11 deletions(-) Seems to work fine. Tested on Jetson TX1 with display and GPU, which are the primary users of the SMMU. Tested-by: Thierry Reding Acked-by: Thierry Reding signature.asc Description: PGP signature

[PATCH] PCI: tegra: Convert to MSI domains

2020-09-04 Thread Thierry Reding
clean up and address TODOs from Marc's draft] Signed-off-by: Thierry Reding --- This is basically Marc's patch from here: https://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms.git/commit/?h=irq/tegra-msi&id=8ba6858f07a7554d4e56a6d5103cd914dcf23af0 That didn't work

[PATCH] memory: tegra: Remove GPU from DRM IOMMU group

2020-09-01 Thread Thierry Reding
From: Thierry Reding Commit 63a613fdb16c ("memory: tegra: Add gr2d and gr3d to DRM IOMMU group") added the GPU to the DRM IOMMU group, which doesn't make any sense. This causes problems when Nouveau tries to attach to the SMMU and causes it to fall back to using the DMA API. Remo

Re: [PATCH v2 12/12] xhci: tegra: enable ELPG for runtime/system PM

2020-08-31 Thread Thierry Reding
On Mon, Aug 31, 2020 at 12:40:43PM +0800, JC Kuo wrote: > This commit implements the complete programming sequence for ELPG > entry and exit. > > 1. At ELPG entry, invokes tegra_xusb_padctl_enable_phy_sleepwalk() > and tegra_xusb_padctl_enable_phy_wake() to configure XUSB PADCTL > sleepwa

Re: [PATCH v2 11/12] usb: host: xhci-tegra: unlink power domain devices

2020-08-31 Thread Thierry Reding
On Mon, Aug 31, 2020 at 12:40:42PM +0800, JC Kuo wrote: > This commit unlinks xhci-tegra platform device with ss/host power > domain devices. Reasons for this change is - at elpg entry, phy > sleepwalk and wake configuration need to be done before powering > down ss/host partitions, and phy need be

Re: [PATCH v2 09/12] phy: tegra: xusb: t186: support wake and sleepwalk

2020-08-31 Thread Thierry Reding
On Mon, Aug 31, 2020 at 12:40:40PM +0800, JC Kuo wrote: > This commit implements Tegra186/Tegra194 XUSB PADCTL/AO wake and > sleepwalk operations. > > Signed-off-by: JC Kuo > --- > drivers/phy/tegra/xusb-tegra186.c | 656 ++ > 1 file changed, 656 insertions(+) Same c

Re: [PATCH v2 08/12] phy: tegra: xusb: t210: support wake and sleepwalk

2020-08-31 Thread Thierry Reding
On Mon, Aug 31, 2020 at 12:40:39PM +0800, JC Kuo wrote: > This commit implements Tegra210 XUSB PADCTL wake and sleepwalk > routines. Sleepwalk logic is in PMC (always-on) hardware block. > PMC driver provides managed access to the sleepwalk registers > via regmap framework. > > Signed-off-by: JC K

Re: [PATCH v2 06/12] soc/tegra: pmc: provide usb sleepwalk register map

2020-08-31 Thread Thierry Reding
On Mon, Aug 31, 2020 at 12:40:37PM +0800, JC Kuo wrote: > This commit implements a register map which grants USB (UTMI and HSIC) > sleepwalk registers access to USB phy drivers. The USB sleepwalk logic > is in PMC hardware block but USB phy drivers have the best knowledge > of proper programming se

Re: [PATCH v2 05/12] phy: tegra: xusb: add sleepwalk and suspend/resume

2020-08-31 Thread Thierry Reding
Again, use a capital letter to start the subject after the prefix. On Mon, Aug 31, 2020 at 12:40:36PM +0800, JC Kuo wrote: > This commit adds sleepwalk/wake and suspend/resume interfaces > to Tegra XUSB PHY driver. > > Tegra XUSB host controller driver makes use of sleepwalk functions > to enable

Re: [PATCH v2 04/12] phy: tegra: xusb: t210: add lane_iddq operations

2020-08-31 Thread Thierry Reding
On Mon, Aug 31, 2020 at 12:40:35PM +0800, JC Kuo wrote: > As per Tegra210 TRM, before changing lane assignments, driver should > keep lanes in IDDQ and sleep state; after changing lane assignments, > driver should bring lanes out of IDDQ. > This commit implements the required operations. > > Signe

Re: [PATCH v2 03/12] phy: tegra: xusb: t210: rearrange UPHY init

2020-08-31 Thread Thierry Reding
Please start commit subjects with a capital letter after the prefix. Also, please avoid t210 as abbreviation and use tegra210 instead. The above should be something like: phy: tegra: xusb: tegra210: Rearrange UPHY init Or perhaps: phy: tegra: xusb: Rearrange UPHY init on Tegra210 On Mo

<    1   2   3   4   5   6   7   8   9   10   >