public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
* [PATCH v4 0/3] i2c: mv64xxx: Fix clock resource for Armada 7K/8K
       [not found] <20180116163540.1092-1-gregory.clement@free-electrons.com>
@ 2018-01-24  6:35 ` Wolfram Sang
       [not found] ` <20180116163540.1092-2-gregory.clement@free-electrons.com>
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 6+ messages in thread
From: Wolfram Sang @ 2018-01-24  6:35 UTC (permalink / raw)
  To: linux-arm-kernel

On Tue, Jan 16, 2018 at 05:35:37PM +0100, Gregory CLEMENT wrote:

> This short series fixes the way the clocks are used for the mv64xxx
> controller embedded in the Marvell Armada 7K/8K SoCs. On these SoCs a
> second one is needed in order to clock the registers. It was not
> noticed until now because we relied on the bootloader and also because
> the clock driver was wrong.
> 
> Thanks to this fix, it would be possible to fix the clock driver
> without introducing a regression.
> 
> The first patch is just a small cleanup found when I wrote the main
> patch.
> 
> The last patch is not related to the series but as Wolfram to have a
> maintainer for this driver I added the patch here.

Thomas, Andrew, Maxime, any tags you'd like to donate?

>  - Add a maintainer for the i2c-mv64xxx driver, requested

Well, I'd say "asked for"...

> by Woflram Sang

... whoever that guy is ;)

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20180124/a7061a6c/attachment.sig>

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH v4 1/3] i2c: mv64xxx: Remove useless test before clk_disable_unprepare
       [not found] ` <20180116163540.1092-2-gregory.clement@free-electrons.com>
@ 2018-01-26 17:40   ` Wolfram Sang
  2018-01-26 17:48   ` Wolfram Sang
  2018-01-26 17:53   ` Wolfram Sang
  2 siblings, 0 replies; 6+ messages in thread
From: Wolfram Sang @ 2018-01-26 17:40 UTC (permalink / raw)
  To: linux-arm-kernel

On Tue, Jan 16, 2018 at 05:35:38PM +0100, Gregory CLEMENT wrote:
> The 2 functions called from clk_disable_unprepare() already check that
> the clock pointer is valid: no need to test it before calling it.

I can't find that in the code for !OF?

> Signed-off-by: Gregory CLEMENT <gregory.clement@free-electrons.com>
> ---
>  drivers/i2c/busses/i2c-mv64xxx.c | 8 ++------
>  1 file changed, 2 insertions(+), 6 deletions(-)
> 
> diff --git a/drivers/i2c/busses/i2c-mv64xxx.c b/drivers/i2c/busses/i2c-mv64xxx.c
> index a832c45276a4..f69066266faa 100644
> --- a/drivers/i2c/busses/i2c-mv64xxx.c
> +++ b/drivers/i2c/busses/i2c-mv64xxx.c
> @@ -950,9 +950,7 @@ mv64xxx_i2c_probe(struct platform_device *pd)
>  exit_reset:
>  	reset_control_assert(drv_data->rstc);
>  exit_clk:
> -	/* Not all platforms have a clk */
> -	if (!IS_ERR(drv_data->clk))
> -		clk_disable_unprepare(drv_data->clk);
> +	clk_disable_unprepare(drv_data->clk);
>  
>  	return rc;
>  }
> @@ -965,9 +963,7 @@ mv64xxx_i2c_remove(struct platform_device *dev)
>  	i2c_del_adapter(&drv_data->adapter);
>  	free_irq(drv_data->irq, drv_data);
>  	reset_control_assert(drv_data->rstc);
> -	/* Not all platforms have a clk */
> -	if (!IS_ERR(drv_data->clk))
> -		clk_disable_unprepare(drv_data->clk);
> +	clk_disable_unprepare(drv_data->clk);
>  
>  	return 0;
>  }
> -- 
> 2.15.1
> 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20180126/cc0de7bc/attachment.sig>

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH v4 1/3] i2c: mv64xxx: Remove useless test before clk_disable_unprepare
       [not found] ` <20180116163540.1092-2-gregory.clement@free-electrons.com>
  2018-01-26 17:40   ` [PATCH v4 1/3] i2c: mv64xxx: Remove useless test before clk_disable_unprepare Wolfram Sang
@ 2018-01-26 17:48   ` Wolfram Sang
  2018-01-26 17:53   ` Wolfram Sang
  2 siblings, 0 replies; 6+ messages in thread
From: Wolfram Sang @ 2018-01-26 17:48 UTC (permalink / raw)
  To: linux-arm-kernel

On Tue, Jan 16, 2018 at 05:35:38PM +0100, Gregory CLEMENT wrote:
> The 2 functions called from clk_disable_unprepare() already check that
> the clock pointer is valid: no need to test it before calling it.

Now I get it. 'called from' != 'calling' (what I understood). But also
!= 'called by' (what I would have ecpected, but I am neither a native
speaker).

You mean "clk_disable_unprepare() is NULL pointer safe."

> 
> Signed-off-by: Gregory CLEMENT <gregory.clement@free-electrons.com>
> ---
>  drivers/i2c/busses/i2c-mv64xxx.c | 8 ++------
>  1 file changed, 2 insertions(+), 6 deletions(-)
> 
> diff --git a/drivers/i2c/busses/i2c-mv64xxx.c b/drivers/i2c/busses/i2c-mv64xxx.c
> index a832c45276a4..f69066266faa 100644
> --- a/drivers/i2c/busses/i2c-mv64xxx.c
> +++ b/drivers/i2c/busses/i2c-mv64xxx.c
> @@ -950,9 +950,7 @@ mv64xxx_i2c_probe(struct platform_device *pd)
>  exit_reset:
>  	reset_control_assert(drv_data->rstc);
>  exit_clk:
> -	/* Not all platforms have a clk */
> -	if (!IS_ERR(drv_data->clk))
> -		clk_disable_unprepare(drv_data->clk);
> +	clk_disable_unprepare(drv_data->clk);
>  
>  	return rc;
>  }
> @@ -965,9 +963,7 @@ mv64xxx_i2c_remove(struct platform_device *dev)
>  	i2c_del_adapter(&drv_data->adapter);
>  	free_irq(drv_data->irq, drv_data);
>  	reset_control_assert(drv_data->rstc);
> -	/* Not all platforms have a clk */
> -	if (!IS_ERR(drv_data->clk))
> -		clk_disable_unprepare(drv_data->clk);
> +	clk_disable_unprepare(drv_data->clk);
>  
>  	return 0;
>  }
> -- 
> 2.15.1
> 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20180126/18797b1c/attachment-0001.sig>

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH v4 1/3] i2c: mv64xxx: Remove useless test before clk_disable_unprepare
       [not found] ` <20180116163540.1092-2-gregory.clement@free-electrons.com>
  2018-01-26 17:40   ` [PATCH v4 1/3] i2c: mv64xxx: Remove useless test before clk_disable_unprepare Wolfram Sang
  2018-01-26 17:48   ` Wolfram Sang
@ 2018-01-26 17:53   ` Wolfram Sang
  2 siblings, 0 replies; 6+ messages in thread
From: Wolfram Sang @ 2018-01-26 17:53 UTC (permalink / raw)
  To: linux-arm-kernel

On Tue, Jan 16, 2018 at 05:35:38PM +0100, Gregory CLEMENT wrote:
> The 2 functions called from clk_disable_unprepare() already check that
> the clock pointer is valid: no need to test it before calling it.
> 
> Signed-off-by: Gregory CLEMENT <gregory.clement@free-electrons.com>

Applied to for-next with a shortened commit msg, thanks!

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20180126/b95cc222/attachment.sig>

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH v4 2/3] i2c: mv64xxx: Fix clock resource by adding an optional bus clock
       [not found] ` <20180116163540.1092-3-gregory.clement@free-electrons.com>
@ 2018-01-26 17:53   ` Wolfram Sang
  0 siblings, 0 replies; 6+ messages in thread
From: Wolfram Sang @ 2018-01-26 17:53 UTC (permalink / raw)
  To: linux-arm-kernel

On Tue, Jan 16, 2018 at 05:35:39PM +0100, Gregory CLEMENT wrote:
> On Armada 7K/8K we need to explicitly enable the bus clock. The bus clock
> is optional because not all the SoCs need them but at least for Armada
> 7K/8K it is actually mandatory.
> 
> The binding documentation is updating accordingly.
> 
> Signed-off-by: Gregory CLEMENT <gregory.clement@free-electrons.com>

Applied to for-next, thanks!

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20180126/08bd65eb/attachment.sig>

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH v4 3/3] i2c: mv64xxx: Add myslef as maintainer for this driver
       [not found] ` <20180116163540.1092-4-gregory.clement@free-electrons.com>
@ 2018-01-26 17:55   ` Wolfram Sang
  0 siblings, 0 replies; 6+ messages in thread
From: Wolfram Sang @ 2018-01-26 17:55 UTC (permalink / raw)
  To: linux-arm-kernel

On Tue, Jan 16, 2018 at 05:35:40PM +0100, Gregory CLEMENT wrote:
> As requested by Wolfram Sang add myslef as maintainer of this driver.

Removed this line as I really 'asked for' not 'requested' it. And
removed the typo in $subject which is also in the line above.

> 
> Signed-off-by: Gregory CLEMENT <gregory.clement@free-electrons.com>

Applied to for-next, thanks!

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20180126/c9879f21/attachment.sig>

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2018-01-26 17:55 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20180116163540.1092-1-gregory.clement@free-electrons.com>
2018-01-24  6:35 ` [PATCH v4 0/3] i2c: mv64xxx: Fix clock resource for Armada 7K/8K Wolfram Sang
     [not found] ` <20180116163540.1092-2-gregory.clement@free-electrons.com>
2018-01-26 17:40   ` [PATCH v4 1/3] i2c: mv64xxx: Remove useless test before clk_disable_unprepare Wolfram Sang
2018-01-26 17:48   ` Wolfram Sang
2018-01-26 17:53   ` Wolfram Sang
     [not found] ` <20180116163540.1092-3-gregory.clement@free-electrons.com>
2018-01-26 17:53   ` [PATCH v4 2/3] i2c: mv64xxx: Fix clock resource by adding an optional bus clock Wolfram Sang
     [not found] ` <20180116163540.1092-4-gregory.clement@free-electrons.com>
2018-01-26 17:55   ` [PATCH v4 3/3] i2c: mv64xxx: Add myslef as maintainer for this driver Wolfram Sang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox