[PATCH 2/5] i2c: tegra: If fifo flush fails return error

2016-08-31 Thread Shardar Shariff Md
During i2c controller initialization, when fifo flush fails return error instead of returning the error during exit. Signed-off-by: Shardar Shariff Md --- Changes in v11: - Fix smatch error for below warning tegra_i2c_init warn: unused return: err = tegra_i2c_flush_fifos() --- --- drivers

[PATCH 1/5] i2c: tegra: use readl_poll_timeout after config_load reg programmed

2016-08-31 Thread Shardar Shariff Md
After CONFIG_LOAD register is programmed instead of explicitly waiting for timeout, use readl_poll_timeout() to check for register value to get updated or wait till timeout. Signed-off-by: Shardar Shariff Md --- Changes in v4: - Split timeout calculation to separate patch Changes in v5: - Move

[PATCH 3/5] i2c: tegra: add separate function for config_load programing

2016-08-31 Thread Shardar Shariff Md
Define separate function for configuration load register handling to make it use by different functions later. Signed-off-by: Shardar Shariff Md --- Changes in v2: - Remove unnecessary paranthesis and align to 80 characters per line Changes in v3: - Add separate function for config load

[PATCH 5/5] i2c: tegra: proper handling of error cases

2016-08-31 Thread Shardar Shariff Md
packet into FIFO which make sure HW to not clear the fifo. Also disable the packet mode before acknowledging errors (ARB lost/NACK error) to not process any stale data. As error interrupts are enabled before posting the packet header use spinlock to avoid preempting. Signed-off-by: Shardar Shariff

[PATCH 4/5] i2c: tegra: use atomic poll function during configuration

2016-08-31 Thread Shardar Shariff Md
Use readl_poll_timeout_atomic() function as *wait_for_config_load() function can be called from interrupt context. Signed-off-by: Shardar Shariff Md --- Changes in v10: - Rebase on top of [PATCH V2 0/9] Some Tegra I2C Updates Changes in v11: - Fix checkpatch error of using in_atomic() API

[PATCH v11 1/5] i2c: tegra: use readl_poll_timeout after config_load reg programmed

2016-08-31 Thread Shardar Shariff Md
After CONFIG_LOAD register is programmed instead of explicitly waiting for timeout, use readl_poll_timeout() to check for register value to get updated or wait till timeout. Signed-off-by: Shardar Shariff Md --- Changes in v4: - Split timeout calculation to separate patch Changes in v5: - Move

[PATCH v11 2/5] i2c: tegra: If fifo flush fails return error

2016-08-31 Thread Shardar Shariff Md
During i2c controller initialization, when fifo flush fails return error instead of returning the error during exit. Signed-off-by: Shardar Shariff Md --- Changes in v11: - Fix smatch error for below warning tegra_i2c_init warn: unused return: err = tegra_i2c_flush_fifos() --- --- drivers

[PATCH v11 4/5] i2c: tegra: use atomic poll function during configuration

2016-08-31 Thread Shardar Shariff Md
Use readl_poll_timeout_atomic() function as *wait_for_config_load() function can be called from interrupt context. Signed-off-by: Shardar Shariff Md --- Changes in v10: - Rebase on top of [PATCH V2 0/9] Some Tegra I2C Updates Changes in v11: - Fix checkpatch error of using in_atomic() API

[PATCH v11 5/5] i2c: tegra: proper handling of error cases

2016-08-31 Thread Shardar Shariff Md
packet into FIFO which make sure HW to not clear the fifo. Also disable the packet mode before acknowledging errors (ARB lost/NACK error) to not process any stale data. As error interrupts are enabled before posting the packet header use spinlock to avoid preempting. Signed-off-by: Shardar Shariff

[PATCH v11 3/5] i2c: tegra: add separate function for config_load programing

2016-08-31 Thread Shardar Shariff Md
Define separate function for configuration load register handling to make it use by different functions later. Signed-off-by: Shardar Shariff Md --- Changes in v2: - Remove unnecessary paranthesis and align to 80 characters per line Changes in v3: - Add separate function for config load

[PATCH] dmaengine: tegra: crash fix observed during dma client(UART) stress testing

2016-05-03 Thread Shardar Shariff Md
is not emptied. Now when dma driver tasklet callback function tries to check cb_desc and delete the cb_node (re-initialized node) kernel crashes. Fix: Empty the cb_desc data structure during tegra_dma_terminate_all() routine if there are no pending transfers. Signed-off-by: Shardar Shariff Md

[PATCH v8 3/3] i2c: tegra: proper handling of error cases

2016-05-27 Thread Shardar Shariff Md
packet into FIFO which make sure HW to not clear the fifo. Also disable the packet mode before acknowledging errors (ARB lost/NACK error) to not process any stale data. As error interrupts are enabled before posting the packet header use spinlock to avoid preempting. Signed-off-by: Shardar Shariff

[PATCH v8 1/3] i2c: tegra: use readx_poll_timeout after config_load reg programmed

2016-05-27 Thread Shardar Shariff Md
After CONFIG_LOAD register programing instead of explicitly waiting for timeout, use readx_poll_timeout() to check for register value to get updated or wait till timeout. Signed-off-by: Shardar Shariff Md --- Changes in v4: - Split timeout calculation to separate patch Changes in v5: - Move

[PATCH v8 2/3] i2c: tegra: add separate function for config_load programing

2016-05-27 Thread Shardar Shariff Md
Define separate function for configuration load register handling to make it use by different functions later. Signed-off-by: Shardar Shariff Md --- Changes in v2: - Remove unnecessary paranthesis and align to 80 characters per line Changes in v3: - Add separate function for config load

[PATCH v2] dmaengine: tegra-apb: proper default init of channel slave_id

2016-04-22 Thread Shardar Shariff Md
Initialize default channel slave_id(req_sel) to invalid id (i.e max supported slave id + 1) to avoid overwriting of slave_id during tegra_dma_slave_config() with client data if slave_id is not initialized through DT Signed-off-by: Shardar Shariff Md --- - Instead of initializing the slave id to

[PATCH v3] dmaengine: tegra-apb: proper default init of channel slave_id

2016-04-22 Thread Shardar Shariff Md
Initialize default channel slave_id(req_sel) to invalid id (i.e max supported slave id + 1) to avoid overwriting of slave_id during tegra_dma_slave_config() with client data if slave_id is not initialized through DT Signed-off-by: Shardar Shariff Md --- Changes from v1: - Instead of

[PATCH v2] i2c: tegra: proper handling of error cases

2016-04-17 Thread Shardar Shariff Md
into FIFO which make sure HW to not clear the fifo. Also disable the packet mode before acknowledging errors (ARB lost/NACK error) to not process any stale data. As error interrupts are enabled before posting the packet header use spinlock to avoid preempting. Signed-off-by: Shardar Shariff Md

[PATCH v3 1/2] i2c: tegra: add separate function for config_load

2016-04-18 Thread Shardar Shariff Md
macro HZ. Signed-off-by: Shardar Shariff Md Changes since v1: - Add separate function for config load handling --- drivers/i2c/busses/i2c-tegra.c | 39 +-- 1 file changed, 25 insertions(+), 14 deletions(-) diff --git a/drivers/i2c/busses/i2c-tegra.c b/drivers

[PATCH v3 2/2] i2c: tegra: proper handling of error cases

2016-04-18 Thread Shardar Shariff Md
packet into FIFO which make sure HW to not clear the fifo. Also disable the packet mode before acknowledging errors (ARB lost/NACK error) to not process any stale data. As error interrupts are enabled before posting the packet header use spinlock to avoid preempting. Signed-off-by: Shardar Shariff

[PATCH v4] dmaengine: tegra-apb: proper default init of channel slave_id

2016-04-23 Thread Shardar Shariff Md
Initialize default channel slave_id(req_sel) to invalid id (i.e max supported slave id + 1) to avoid overwriting of slave_id during tegra_dma_slave_config() with client data if slave_id is not initialized through DT Signed-off-by: Shardar Shariff Md --- Changes from v1: - Instead of

[PATCH v4 1/3] i2c: tegra: calculate timeout for config load when needed

2016-04-23 Thread Shardar Shariff Md
Instead of calculating timeout for the config load during init, calculate it after config load register is written by using readx_poll_timeout(). Signed-off-by: Shardar Shariff Md Changes since v1: - Split timeout calculation to seperate patch --- drivers/i2c/busses/i2c-tegra.c | 25

[PATCH v4 2/3] i2c: tegra: add separate function for config_load

2016-04-23 Thread Shardar Shariff Md
Define separate function for configuration load register handling to make it use by different functions later. Signed-off-by: Shardar Shariff Md --- Changes in v2: - Remove unnecessary paranthesis and align to 80 characters per line Changes in v3: - Add separate function for config load

[PATCH v4 3/3] i2c: tegra: proper handling of error cases

2016-04-23 Thread Shardar Shariff Md
packet into FIFO which make sure HW to not clear the fifo. Also disable the packet mode before acknowledging errors (ARB lost/NACK error) to not process any stale data. As error interrupts are enabled before posting the packet header use spinlock to avoid preempting. Signed-off-by: Shardar Shariff

[PATCH v5 1/4] i2c: tegra: disable clock before returning error

2016-04-25 Thread Shardar Shariff Md
Disable clock before returning error in tegra_i2c_init() Signed-off-by: Shardar Shariff Md --- Changes since v1: - Move current patch as separate patch --- drivers/i2c/busses/i2c-tegra.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/i2c/busses/i2c-tegra.c b

[PATCH v5 3/4] i2c: tegra: add separate function for config_load

2016-04-25 Thread Shardar Shariff Md
Define separate function for configuration load register handling to make it use by different functions later. Signed-off-by: Shardar Shariff Md --- Changes in v2: - Remove unnecessary paranthesis and align to 80 characters per line Changes in v3: - Add separate function for config load

[PATCH v5 2/4] i2c: tegra: calculate timeout for config load when needed

2016-04-25 Thread Shardar Shariff Md
Instead of calculating timeout for the config load during init, calculate it after config load register is written by using readx_poll_timeout(). Signed-off-by: Shardar Shariff Md --- Changes in v4: - Split timeout calculation to separate patch Changes in v5: - Move disabling of clock to

[PATCH v5 4/4] i2c: tegra: proper handling of error cases

2016-04-25 Thread Shardar Shariff Md
packet into FIFO which make sure HW to not clear the fifo. Also disable the packet mode before acknowledging errors (ARB lost/NACK error) to not process any stale data. As error interrupts are enabled before posting the packet header use spinlock to avoid preempting. Signed-off-by: Shardar Shariff

[PATCH v6 1/4] i2c: tegra: disable clock before returning error

2016-04-25 Thread Shardar Shariff Md
Disable clock before returning error in tegra_i2c_init() Signed-off-by: Shardar Shariff Md --- Changes in v5: - Move current patch as separate patch Changes in v6: - Remove unnecessary line --- drivers/i2c/busses/i2c-tegra.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff

[PATCH v6 4/4] i2c: tegra: proper handling of error cases

2016-04-25 Thread Shardar Shariff Md
packet into FIFO which make sure HW to not clear the fifo. Also disable the packet mode before acknowledging errors (ARB lost/NACK error) to not process any stale data. As error interrupts are enabled before posting the packet header use spinlock to avoid preempting. Signed-off-by: Shardar Shariff

[PATCH v6 2/4] i2c: tegra: calculate timeout for config load when needed

2016-04-25 Thread Shardar Shariff Md
Instead of calculating timeout for the config load during init, calculate it after config load register is written by using readx_poll_timeout(). Signed-off-by: Shardar Shariff Md --- Changes in v4: - Split timeout calculation to separate patch Changes in v5: - Move disabling of clock to

[PATCH v6 3/4] i2c: tegra: add separate function for config_load

2016-04-25 Thread Shardar Shariff Md
Define separate function for configuration load register handling to make it use by different functions later. Signed-off-by: Shardar Shariff Md --- Changes in v2: - Remove unnecessary paranthesis and align to 80 characters per line Changes in v3: - Add separate function for config load

[PATCH v7 2/4] i2c: tegra: calculate timeout for config load when needed

2016-04-25 Thread Shardar Shariff Md
Instead of calculating timeout for the config load during init, calculate it after config load register is written by using readx_poll_timeout(). Signed-off-by: Shardar Shariff Md --- Changes in v4: - Split timeout calculation to separate patch Changes in v5: - Move disabling of clock to

[PATCH v7 1/4] i2c: tegra: disable clock before returning error

2016-04-25 Thread Shardar Shariff Md
Disable clock before returning error in tegra_i2c_init() as its leaves i2c clock ON in case of error and never turns off again as it will have unbalanced clock enable/disable Signed-off-by: Shardar Shariff Md --- Changes in v5: - Move current patch as separate patch Changes in v6: - Remove

[PATCH v7 3/4] i2c: tegra: add separate function for config_load

2016-04-25 Thread Shardar Shariff Md
Define separate function for configuration load register handling to make it use by different functions later. Signed-off-by: Shardar Shariff Md --- Changes in v2: - Remove unnecessary paranthesis and align to 80 characters per line Changes in v3: - Add separate function for config load

[PATCH v7 4/4] i2c: tegra: proper handling of error cases

2016-04-25 Thread Shardar Shariff Md
packet into FIFO which make sure HW to not clear the fifo. Also disable the packet mode before acknowledging errors (ARB lost/NACK error) to not process any stale data. As error interrupts are enabled before posting the packet header use spinlock to avoid preempting. Signed-off-by: Shardar Shariff

[PATCH] dmaengine: tegra-apb: proper default init of channel slave_id

2016-03-30 Thread Shardar Shariff Md
Initialize default channel slave_id(req_sel) to -1 to avoid overwriting of slave_id with client data as zero is the valid slave_id(request_select). Signed-off-by: Shardar Shariff Md --- drivers/dma/tegra20-apb-dma.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a

[PATCH] gpio: max77620: add compatible string to device id list

2016-11-16 Thread Shardar Shariff Md
From: Venkat Reddy Talla Adding max20024 compatible string to the device id list to support both max77620 and max20024 devices. Signed-off-by: Venkat Reddy Talla --- drivers/gpio/gpio-max77620.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpio/gpio-max77620.c b/drivers/gpio/gpi

[PATCH] regulator: max77620: remove unused variable

2016-11-15 Thread Shardar Shariff Md
From: Venkat Reddy Talla max77620_reuglator_pdata structure variable reg_idata is not used anywhere in the regulator driver, so removing it. Signed-off-by: Venkat Reddy Talla --- drivers/regulator/max77620-regulator.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/regulator/max7762

[PATCH v9 1/4] i2c: tegra: use readl_poll_timeout after config_load reg programmed

2016-08-29 Thread Shardar Shariff Md
After CONFIG_LOAD register is programmed instead of explicitly waiting for timeout, use readx_poll_timeout() to check for register value to get updated or wait till timeout. Signed-off-by: Shardar Shariff Md --- Changes in v4: - Split timeout calculation to separate patch Changes in v5: - Move

[PATCH v9 3/4] i2c: tegra: use atomic poll function during configuration

2016-08-29 Thread Shardar Shariff Md
Use readl_poll_timeout_atomic() function as *wait_for_config_load() function can be called from atomic context. Signed-off-by: Shardar Shariff Md --- drivers/i2c/busses/i2c-tegra.c | 9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/drivers/i2c/busses/i2c-tegra.c b

[PATCH v9 2/4] i2c: tegra: add separate function for config_load programing

2016-08-29 Thread Shardar Shariff Md
Define separate function for configuration load register handling to make it use by different functions later. Signed-off-by: Shardar Shariff Md --- Changes in v2: - Remove unnecessary paranthesis and align to 80 characters per line Changes in v3: - Add separate function for config load

[PATCH v9 4/4] i2c: tegra: proper handling of error cases

2016-08-29 Thread Shardar Shariff Md
packet into FIFO which make sure HW to not clear the fifo. Also disable the packet mode before acknowledging errors (ARB lost/NACK error) to not process any stale data. As error interrupts are enabled before posting the packet header use spinlock to avoid preempting. Signed-off-by: Shardar Shariff

[PATCH v10 2/4] i2c: tegra: add separate function for config_load programing

2016-08-30 Thread Shardar Shariff Md
Define separate function for configuration load register handling to make it use by different functions later. Signed-off-by: Shardar Shariff Md --- Changes in v2: - Remove unnecessary paranthesis and align to 80 characters per line Changes in v3: - Add separate function for config load

[PATCH v10 1/4] i2c: tegra: use readl_poll_timeout after config_load reg programmed

2016-08-30 Thread Shardar Shariff Md
After CONFIG_LOAD register is programmed instead of explicitly waiting for timeout, use readl_poll_timeout() to check for register value to get updated or wait till timeout. Signed-off-by: Shardar Shariff Md --- Changes in v4: - Split timeout calculation to separate patch Changes in v5: - Move

[PATCH v10 3/4] i2c: tegra: use atomic poll function during configuration

2016-08-30 Thread Shardar Shariff Md
Use readl_poll_timeout_atomic() function as *wait_for_config_load() function can be called from atomic context. Signed-off-by: Shardar Shariff Md --- Changes in v10: - Rebase on top of [PATCH V2 0/9] Some Tegra I2C Updates --- --- drivers/i2c/busses/i2c-tegra.c | 9 +++-- 1 file changed, 7

[PATCH v10 4/4] i2c: tegra: proper handling of error cases

2016-08-30 Thread Shardar Shariff Md
packet into FIFO which make sure HW to not clear the fifo. Also disable the packet mode before acknowledging errors (ARB lost/NACK error) to not process any stale data. As error interrupts are enabled before posting the packet header use spinlock to avoid preempting. Signed-off-by: Shardar Shariff

[PATCH 1/2] i2c: tegra: enable multi master mode

2016-03-14 Thread Shardar Shariff Md
aster-mode" property to enable multimaster specific prerequisites: 1. Enable 1st level clock always set. 2. Disable 2nd level clock gating (slcg which is supported from T124 SOC and later chips) Signed-off-by: Shardar Shariff Md --- drivers/i2c/busses/i

[PATCH 2/2] i2c: tegra: add multimaster mode property to binding

2016-03-14 Thread Shardar Shariff Md
- Document the usage "nvidia,multimaster-mode" property for enabling multimaster mode. - Add compatible string for Tegra 210 SOC. Signed-off-by: Shardar Shariff Md --- Documentation/devicetree/bindings/i2c/nvidia,tegra20-i2c.txt | 4 1 file changed, 4 insertions(+) di

[PATCH v2] i2c: tegra: enable multi master mode

2016-03-14 Thread Shardar Shariff Md
s for multi-master bus if "multi-master" dt property entry is added. 1. Enable 1st level clock always set. 2. Disable 2nd level clock gating (slcg which is supported from T124 SOC and later chips) Signed-off-by: Shardar Shariff Md --- drivers/i2c/busses/i