All of lore.kernel.org
 help / color / mirror / Atom feed
* multiple i2c-ocores adapters
@ 2015-10-02  5:47 York Sun
  2015-10-02  6:03 ` Peter Korsgaard
  0 siblings, 1 reply; 4+ messages in thread
From: York Sun @ 2015-10-02  5:47 UTC (permalink / raw)
  To: Peter Korsgaard; +Cc: Wolfram Sang, linux-i2c


Peter,

I have a platform (FPGA) with multiple ocores i2c adapter. When I register them using MFD framework, I got a message regarding duplicating name for sysfs. I wonder if this driver (i2c-ocores.c) only supports one adapter. I can try to fix it by adding a name string into ocores_i2c_platform_data and allocate struct i2c_adapter on demand. Am I on the right direction?

York

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

* Re: multiple i2c-ocores adapters
  2015-10-02  5:47 multiple i2c-ocores adapters York Sun
@ 2015-10-02  6:03 ` Peter Korsgaard
  2015-10-02 19:11   ` York Sun
  0 siblings, 1 reply; 4+ messages in thread
From: Peter Korsgaard @ 2015-10-02  6:03 UTC (permalink / raw)
  To: York Sun; +Cc: Peter Korsgaard, Wolfram Sang, linux-i2c

>>>>> "York" == York Sun <yorksun@freescale.com> writes:

 > Peter,

 > I have a platform (FPGA) with multiple ocores i2c adapter. When I
 > register them using MFD framework, I got a message regarding
 > duplicating name for sysfs. I wonder if this driver (i2c-ocores.c)
 > only supports one adapter. I can try to fix it by adding a name string
 > into ocores_i2c_platform_data and allocate struct i2c_adapter on
 > demand. Am I on the right direction?

I guess your problem is that the driver core is complaining about
duplicate names for your platform devices (generated from the
mfd_cell). Make sure you set the .id member to something unique.

-- 
Bye, Peter Korsgaard

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

* Re: multiple i2c-ocores adapters
  2015-10-02  6:03 ` Peter Korsgaard
@ 2015-10-02 19:11   ` York Sun
  2015-10-02 20:51     ` Peter Korsgaard
  0 siblings, 1 reply; 4+ messages in thread
From: York Sun @ 2015-10-02 19:11 UTC (permalink / raw)
  To: Peter Korsgaard; +Cc: Peter Korsgaard, Wolfram Sang, linux-i2c

Peter,

On 10/01/2015 11:03 PM, Peter Korsgaard wrote:
>>>>>> "York" == York Sun <yorksun@freescale.com> writes:
> 
>  > Peter,
> 
>  > I have a platform (FPGA) with multiple ocores i2c adapter. When I
>  > register them using MFD framework, I got a message regarding
>  > duplicating name for sysfs. I wonder if this driver (i2c-ocores.c)
>  > only supports one adapter. I can try to fix it by adding a name string
>  > into ocores_i2c_platform_data and allocate struct i2c_adapter on
>  > demand. Am I on the right direction?
> 
> I guess your problem is that the driver core is complaining about
> duplicate names for your platform devices (generated from the
> mfd_cell). Make sure you set the .id member to something unique.
> 

What I got was

sysfs: cannot create duplicate filename '/bus/platform/devices/ocores-i2c'

I think it is caused by the i2c-ocores driver. Will dig deeper.

York

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

* Re: multiple i2c-ocores adapters
  2015-10-02 19:11   ` York Sun
@ 2015-10-02 20:51     ` Peter Korsgaard
  0 siblings, 0 replies; 4+ messages in thread
From: Peter Korsgaard @ 2015-10-02 20:51 UTC (permalink / raw)
  To: York Sun; +Cc: Peter Korsgaard, Wolfram Sang, linux-i2c

>>>>> "York" == York Sun <yorksun@freescale.com> writes:

Hi,

>> I guess your problem is that the driver core is complaining about
 >> duplicate names for your platform devices (generated from the
 >> mfd_cell). Make sure you set the .id member to something unique.

 > What I got was

 > sysfs: cannot create duplicate filename '/bus/platform/devices/ocores-i2c'

 > I think it is caused by the i2c-ocores driver. Will dig deeper.

Like I said, this sounds like you are trying to register multiple
platform devices with the same name (ocores-i2c) and id == -1.

Please make sure you use unique ids when you have more than 1 device
instance on your system.

-- 
Bye, Peter Korsgaard

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

end of thread, other threads:[~2015-10-02 20:51 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-10-02  5:47 multiple i2c-ocores adapters York Sun
2015-10-02  6:03 ` Peter Korsgaard
2015-10-02 19:11   ` York Sun
2015-10-02 20:51     ` Peter Korsgaard

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.