All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 4/6 v2] ARM: shmobile: r8a7778: cleanup registration of i2c
@ 2013-07-26  7:35 Kuninori Morimoto
  2013-07-26 13:37 ` Sergei Shtylyov
                   ` (10 more replies)
  0 siblings, 11 replies; 12+ messages in thread
From: Kuninori Morimoto @ 2013-07-26  7:35 UTC (permalink / raw)
  To: linux-sh

i2c-rcar driver which doesn't need platform data at the time of
registration can be registerd on SoC.
And, registering these drivers in the SoC code can avoid
unwanted device numbering issue.
(ex. the i2c3 device number will be i2c.0 if i2c3 only registered)
This patch registers it on SoC code as cleanup C code

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
v1 -> v2
 - based on renesas-devel-20130726
 - update git log

 arch/arm/mach-shmobile/board-bockw.c          |    1 -
 arch/arm/mach-shmobile/include/mach/r8a7778.h |    1 -
 arch/arm/mach-shmobile/setup-r8a7778.c        |    6 +++++-
 3 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/arch/arm/mach-shmobile/board-bockw.c b/arch/arm/mach-shmobile/board-bockw.c
index 1c876ab..d7d3427 100644
--- a/arch/arm/mach-shmobile/board-bockw.c
+++ b/arch/arm/mach-shmobile/board-bockw.c
@@ -200,7 +200,6 @@ static void __init bockw_init(void)
 	r8a7778_init_irq_extpin(1);
 	r8a7778_add_standard_devices();
 	r8a7778_add_ether_device(&ether_platform_data);
-	r8a7778_add_i2c_device(0);
 	r8a7778_add_hspi_device(0);
 
 	i2c_register_board_info(0, i2c0_devices,
diff --git a/arch/arm/mach-shmobile/include/mach/r8a7778.h b/arch/arm/mach-shmobile/include/mach/r8a7778.h
index aaa0544..9874511 100644
--- a/arch/arm/mach-shmobile/include/mach/r8a7778.h
+++ b/arch/arm/mach-shmobile/include/mach/r8a7778.h
@@ -23,7 +23,6 @@
 extern void r8a7778_add_standard_devices(void);
 extern void r8a7778_add_standard_devices_dt(void);
 extern void r8a7778_add_ether_device(struct sh_eth_plat_data *pdata);
-extern void r8a7778_add_i2c_device(int id);
 extern void r8a7778_add_hspi_device(int id);
 extern void r8a7778_add_dt_devices(void);
 
diff --git a/arch/arm/mach-shmobile/setup-r8a7778.c b/arch/arm/mach-shmobile/setup-r8a7778.c
index c585ee0..e975fcc1 100644
--- a/arch/arm/mach-shmobile/setup-r8a7778.c
+++ b/arch/arm/mach-shmobile/setup-r8a7778.c
@@ -250,7 +250,7 @@ static struct resource i2c_resources[] __initdata = {
 	DEFINE_RES_IRQ(gic_iid(0x6d)),
 };
 
-void __init r8a7778_add_i2c_device(int id)
+static void __init r8a7778_register_i2c(int id)
 {
 	BUG_ON(id < 0 || id > 3);
 
@@ -303,6 +303,10 @@ void __init r8a7778_add_dt_devices(void)
 
 	r8a7778_register_tmu(0);
 	r8a7778_register_tmu(1);
+	r8a7778_register_i2c(0);
+	r8a7778_register_i2c(1);
+	r8a7778_register_i2c(2);
+	r8a7778_register_i2c(3);
 }
 
 void __init r8a7778_add_standard_devices(void)
-- 
1.7.9.5


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

* Re: [PATCH 4/6 v2] ARM: shmobile: r8a7778: cleanup registration of i2c
  2013-07-26  7:35 [PATCH 4/6 v2] ARM: shmobile: r8a7778: cleanup registration of i2c Kuninori Morimoto
@ 2013-07-26 13:37 ` Sergei Shtylyov
  2013-07-29  0:36 ` Kuninori Morimoto
                   ` (9 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: Sergei Shtylyov @ 2013-07-26 13:37 UTC (permalink / raw)
  To: linux-sh

Hello.

On 26-07-2013 11:35, Kuninori Morimoto wrote:

> i2c-rcar driver which doesn't need platform data at the time of
> registration can be registerd on SoC.

    What about your previous concern about pinmux which prevented our I2C 
platform patch from being accepted? Why did it suddenly become unimportant?

> And, registering these drivers in the SoC code can avoid
> unwanted device numbering issue.
> (ex. the i2c3 device number will be i2c.0 if i2c3 only registered)

    Non-issue IMHO.

> This patch registers it on SoC code as cleanup C code

    Why not call it appropriately then, not using such 
meaning-everything-and-nothing word "cleanup"?

> Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>

WBR, Sergei


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

* Re: [PATCH 4/6 v2] ARM: shmobile: r8a7778: cleanup registration of i2c
  2013-07-26  7:35 [PATCH 4/6 v2] ARM: shmobile: r8a7778: cleanup registration of i2c Kuninori Morimoto
  2013-07-26 13:37 ` Sergei Shtylyov
@ 2013-07-29  0:36 ` Kuninori Morimoto
  2013-07-29 12:40 ` Sergei Shtylyov
                   ` (8 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: Kuninori Morimoto @ 2013-07-29  0:36 UTC (permalink / raw)
  To: linux-sh


Hi Sergei

> > i2c-rcar driver which doesn't need platform data at the time of
> > registration can be registerd on SoC.
> 
>     What about your previous concern about pinmux which prevented our I2C 
> platform patch from being accepted? Why did it suddenly become unimportant?

Your I2C platform patch ??
Which one ?

Anyway, I exchange my mind
http://www.spinics.net/lists/linux-sh/msg21582.html


Best regards
---
Kuninori Morimoto

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

* Re: [PATCH 4/6 v2] ARM: shmobile: r8a7778: cleanup registration of i2c
  2013-07-26  7:35 [PATCH 4/6 v2] ARM: shmobile: r8a7778: cleanup registration of i2c Kuninori Morimoto
  2013-07-26 13:37 ` Sergei Shtylyov
  2013-07-29  0:36 ` Kuninori Morimoto
@ 2013-07-29 12:40 ` Sergei Shtylyov
  2013-07-30  0:24 ` Kuninori Morimoto
                   ` (7 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: Sergei Shtylyov @ 2013-07-29 12:40 UTC (permalink / raw)
  To: linux-sh

Hello.

On 29-07-2013 4:36, Kuninori Morimoto wrote:

>>> i2c-rcar driver which doesn't need platform data at the time of
>>> registration can be registerd on SoC.

>>      What about your previous concern about pinmux which prevented our I2C
>> platform patch from being accepted? Why did it suddenly become unimportant?

> Your I2C platform patch ??
> Which one ?

     You have a short memory:

http://marc.info/?l=linux-sh&m\x136622435310063

    You reply was:

http://marc.info/?l=linux-sh&m\x136866663723626

    Finally, we called back this patch after you posted your variant.

> Anyway, I exchange my mind
> http://www.spinics.net/lists/linux-sh/msg21582.html

    It's apparent that you changed your mind but it's not clear what was the
reasoning behind this.

> Best regards
> ---
> Kuninori Morimoto

WBR, Sergei


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

* Re: [PATCH 4/6 v2] ARM: shmobile: r8a7778: cleanup registration of i2c
  2013-07-26  7:35 [PATCH 4/6 v2] ARM: shmobile: r8a7778: cleanup registration of i2c Kuninori Morimoto
                   ` (2 preceding siblings ...)
  2013-07-29 12:40 ` Sergei Shtylyov
@ 2013-07-30  0:24 ` Kuninori Morimoto
  2013-07-30  2:35 ` Simon Horman
                   ` (6 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: Kuninori Morimoto @ 2013-07-30  0:24 UTC (permalink / raw)
  To: linux-sh


Hi Sergei

>      You have a short memory:
> 
> http://marc.info/?l=linux-sh&m\x136622435310063
> 
>     You reply was:
> 
> http://marc.info/?l=linux-sh&m\x136866663723626

Ahh... indeed
Sorry about that

> > Anyway, I exchange my mind
> > http://www.spinics.net/lists/linux-sh/msg21582.html
> 
>     It's apparent that you changed your mind but it's not clear what was the
> reasoning behind this.

I and Magnus are explaining about it on cleanup patchset

Best regards
--
Kuninori Morimoto
 

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

* Re: [PATCH 4/6 v2] ARM: shmobile: r8a7778: cleanup registration of i2c
  2013-07-26  7:35 [PATCH 4/6 v2] ARM: shmobile: r8a7778: cleanup registration of i2c Kuninori Morimoto
                   ` (3 preceding siblings ...)
  2013-07-30  0:24 ` Kuninori Morimoto
@ 2013-07-30  2:35 ` Simon Horman
  2013-07-30  3:09 ` Kuninori Morimoto
                   ` (5 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: Simon Horman @ 2013-07-30  2:35 UTC (permalink / raw)
  To: linux-sh

On Tue, Jul 30, 2013 at 09:24:01AM +0900, Kuninori Morimoto wrote:
> 
> Hi Sergei
> 
> >      You have a short memory:
> > 
> > http://marc.info/?l=linux-sh&m\x136622435310063
> > 
> >     You reply was:
> > 
> > http://marc.info/?l=linux-sh&m\x136866663723626
> 
> Ahh... indeed
> Sorry about that
> 
> > > Anyway, I exchange my mind
> > > http://www.spinics.net/lists/linux-sh/msg21582.html
> > 
> >     It's apparent that you changed your mind but it's not clear what was the
> > reasoning behind this.
> 
> I and Magnus are explaining about it on cleanup patchset

Sorry, I don't quite understand your statement above.

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

* Re: [PATCH 4/6 v2] ARM: shmobile: r8a7778: cleanup registration of i2c
  2013-07-26  7:35 [PATCH 4/6 v2] ARM: shmobile: r8a7778: cleanup registration of i2c Kuninori Morimoto
                   ` (4 preceding siblings ...)
  2013-07-30  2:35 ` Simon Horman
@ 2013-07-30  3:09 ` Kuninori Morimoto
  2013-07-30  4:34 ` Simon Horman
                   ` (4 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: Kuninori Morimoto @ 2013-07-30  3:09 UTC (permalink / raw)
  To: linux-sh


Hi

> > > > Anyway, I exchange my mind
> > > > http://www.spinics.net/lists/linux-sh/msg21582.html
> > > 
> > >     It's apparent that you changed your mind but it's not clear what was the
> > > reasoning behind this.
> > 
> > I and Magnus are explaining about it on cleanup patchset
> 
> Sorry, I don't quite understand your statement above.

Maybe my English issue.

The reason why these cleanup patches don't care about pin settings
but register non-platform data driver is that 
default pin settings are very safety (input direction)
(and the device can't do something if board exchanges pin settings)
(Sergei's USB/I2C patches were same concept ?)
And it can be used for DT feature work.

Then, I understood above and exchanged my mind
that we can register all non-platform driver on SoC code.

This is the back-ground.
Is it enough for you ?
Please let me know if you need more explain/background

Best regards
---
Kuninori Morimoto

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

* Re: [PATCH 4/6 v2] ARM: shmobile: r8a7778: cleanup registration of i2c
  2013-07-26  7:35 [PATCH 4/6 v2] ARM: shmobile: r8a7778: cleanup registration of i2c Kuninori Morimoto
                   ` (5 preceding siblings ...)
  2013-07-30  3:09 ` Kuninori Morimoto
@ 2013-07-30  4:34 ` Simon Horman
  2013-07-30  4:54 ` Kuninori Morimoto
                   ` (3 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: Simon Horman @ 2013-07-30  4:34 UTC (permalink / raw)
  To: linux-sh

On Mon, Jul 29, 2013 at 08:09:23PM -0700, Kuninori Morimoto wrote:
> 
> Hi
> 
> > > > > Anyway, I exchange my mind
> > > > > http://www.spinics.net/lists/linux-sh/msg21582.html
> > > > 
> > > >     It's apparent that you changed your mind but it's not clear what was the
> > > > reasoning behind this.
> > > 
> > > I and Magnus are explaining about it on cleanup patchset
> > 
> > Sorry, I don't quite understand your statement above.
> 
> Maybe my English issue.
> 
> The reason why these cleanup patches don't care about pin settings
> but register non-platform data driver is that 
> default pin settings are very safety (input direction)
> (and the device can't do something if board exchanges pin settings)
> (Sergei's USB/I2C patches were same concept ?)
> And it can be used for DT feature work.
> 
> Then, I understood above and exchanged my mind
> that we can register all non-platform driver on SoC code.
> 
> This is the back-ground.
> Is it enough for you ?

Yes thanks, that is enough.

> Please let me know if you need more explain/background

I do have one more question, which I forgot to ask earlier.

I notice that you are now registering i2c devices in
r8a7778_add_dt_devices(). Which I believe means that they
will be registered in C when bockw-reference is used.
Is that intentional?

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

* Re: [PATCH 4/6 v2] ARM: shmobile: r8a7778: cleanup registration of i2c
  2013-07-26  7:35 [PATCH 4/6 v2] ARM: shmobile: r8a7778: cleanup registration of i2c Kuninori Morimoto
                   ` (6 preceding siblings ...)
  2013-07-30  4:34 ` Simon Horman
@ 2013-07-30  4:54 ` Kuninori Morimoto
  2013-07-30  5:29 ` Simon Horman
                   ` (2 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: Kuninori Morimoto @ 2013-07-30  4:54 UTC (permalink / raw)
  To: linux-sh


Hi Simon

> > This is the back-ground.
> > Is it enough for you ?
> 
> Yes thanks, that is enough.

Thank you

> > Please let me know if you need more explain/background
> 
> I do have one more question, which I forgot to ask earlier.
> 
> I notice that you are now registering i2c devices in
> r8a7778_add_dt_devices(). Which I believe means that they
> will be registered in C when bockw-reference is used.
> Is that intentional?

Oops, it is my mistake.
I2C should not be called from C when bockw-reference.
Can I send v2 patch ?

Best regards
---
Kuninori Morimoto

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

* Re: [PATCH 4/6 v2] ARM: shmobile: r8a7778: cleanup registration of i2c
  2013-07-26  7:35 [PATCH 4/6 v2] ARM: shmobile: r8a7778: cleanup registration of i2c Kuninori Morimoto
                   ` (7 preceding siblings ...)
  2013-07-30  4:54 ` Kuninori Morimoto
@ 2013-07-30  5:29 ` Simon Horman
  2013-07-30  5:32 ` Kuninori Morimoto
  2013-07-30  7:01 ` Kuninori Morimoto
  10 siblings, 0 replies; 12+ messages in thread
From: Simon Horman @ 2013-07-30  5:29 UTC (permalink / raw)
  To: linux-sh

On Mon, Jul 29, 2013 at 09:54:48PM -0700, Kuninori Morimoto wrote:
> 
> Hi Simon
> 
> > > This is the back-ground.
> > > Is it enough for you ?
> > 
> > Yes thanks, that is enough.
> 
> Thank you
> 
> > > Please let me know if you need more explain/background
> > 
> > I do have one more question, which I forgot to ask earlier.
> > 
> > I notice that you are now registering i2c devices in
> > r8a7778_add_dt_devices(). Which I believe means that they
> > will be registered in C when bockw-reference is used.
> > Is that intentional?
> 
> Oops, it is my mistake.
> I2C should not be called from C when bockw-reference.
> Can I send v2 patch ?

Please do.

Could you also re-post 5/6 at the same time?
No changes are required.

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

* Re: [PATCH 4/6 v2] ARM: shmobile: r8a7778: cleanup registration of i2c
  2013-07-26  7:35 [PATCH 4/6 v2] ARM: shmobile: r8a7778: cleanup registration of i2c Kuninori Morimoto
                   ` (8 preceding siblings ...)
  2013-07-30  5:29 ` Simon Horman
@ 2013-07-30  5:32 ` Kuninori Morimoto
  2013-07-30  7:01 ` Kuninori Morimoto
  10 siblings, 0 replies; 12+ messages in thread
From: Kuninori Morimoto @ 2013-07-30  5:32 UTC (permalink / raw)
  To: linux-sh


Hi Simon

> > > I notice that you are now registering i2c devices in
> > > r8a7778_add_dt_devices(). Which I believe means that they
> > > will be registered in C when bockw-reference is used.
> > > Is that intentional?
> > 
> > Oops, it is my mistake.
> > I2C should not be called from C when bockw-reference.
> > Can I send v2 patch ?
> 
> Please do.
> 
> Could you also re-post 5/6 at the same time?
> No changes are required.

OK, will do

Best regards
---
Kuninori Morimoto

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

* Re: [PATCH 4/6 v2] ARM: shmobile: r8a7778: cleanup registration of i2c
  2013-07-26  7:35 [PATCH 4/6 v2] ARM: shmobile: r8a7778: cleanup registration of i2c Kuninori Morimoto
                   ` (9 preceding siblings ...)
  2013-07-30  5:32 ` Kuninori Morimoto
@ 2013-07-30  7:01 ` Kuninori Morimoto
  10 siblings, 0 replies; 12+ messages in thread
From: Kuninori Morimoto @ 2013-07-30  7:01 UTC (permalink / raw)
  To: linux-sh


Hi Simon

> > > > I notice that you are now registering i2c devices in
> > > > r8a7778_add_dt_devices(). Which I believe means that they
> > > > will be registered in C when bockw-reference is used.
> > > > Is that intentional?
> > > 
> > > Oops, it is my mistake.
> > > I2C should not be called from C when bockw-reference.
> > > Can I send v2 patch ?
> > 
> > Please do.
> > 
> > Could you also re-post 5/6 at the same time?
> > No changes are required.
> 
> OK, will do

These are v3 of above
based on renesas-devel-20130730

Kuninori Morimoto (2):
      ARM: shmobile: r8a7778: i2c should not be called from C in DT
      ARM: shmobile: r8a7778: cleanup registration of hspi

 arch/arm/mach-shmobile/board-bockw.c          |    1 -
 arch/arm/mach-shmobile/include/mach/r8a7778.h |    1 -
 arch/arm/mach-shmobile/setup-r8a7778.c        |   13 ++++++++-----
 3 files changed, 8 insertions(+), 7 deletions(-)

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

end of thread, other threads:[~2013-07-30  7:01 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-07-26  7:35 [PATCH 4/6 v2] ARM: shmobile: r8a7778: cleanup registration of i2c Kuninori Morimoto
2013-07-26 13:37 ` Sergei Shtylyov
2013-07-29  0:36 ` Kuninori Morimoto
2013-07-29 12:40 ` Sergei Shtylyov
2013-07-30  0:24 ` Kuninori Morimoto
2013-07-30  2:35 ` Simon Horman
2013-07-30  3:09 ` Kuninori Morimoto
2013-07-30  4:34 ` Simon Horman
2013-07-30  4:54 ` Kuninori Morimoto
2013-07-30  5:29 ` Simon Horman
2013-07-30  5:32 ` Kuninori Morimoto
2013-07-30  7:01 ` Kuninori Morimoto

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.