Skip to contentSkip to conversation

dw-spi driver bus number

DISCUSSION Mark Brown 1 participant 2 messages Aug 9, 2016 – Aug 10, 2016 4 messages not in the archive SPI

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): [email protected]

Mark Brown

author
#2 lore raw

On Tue, Aug 09, 2016 at 03:14:51AM +0000, First Light wrote:

Please fix your mail client to word wrap within paragraphs at something substantially less than 80 columns. Doing this makes your messages much easier to read and reply to.

Quoted 5 lines

but pdev->id is not initialized, it is -1 by default. also there is no dts information for this driver to init bus number.

I know pdev->id is used frequently when dts is not used long time ago. is this out of date?

should we add dts to pass bus_num to this driver?

No, nothing should be relying on the bus number anyway and it's certainly not something that should be part of a description of the hardware - the expectation is that if things are using DT they will be using a dynamically assigned bus number.

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): [email protected]

author
#5 lore raw

On Wed, Aug 10, 2016 at 08:50:08AM +0000, First Light wrote:

Please don't top post, reply in line with needed context. This allows readers to readily follow the flow of conversation and understand what you are talking about and also helps ensure that everything in the discussion is being addressed.

Quoted 3 lines

But I found the dynamically assigned bus number is always -1.?

I have two spi buses, both get the -1 bus number.

That shouldn't happen, if it does it's a bug - users should never see a negative bus number, the core should dynamically assign one if it is given a negative bus number. Can you check what happens in spi_register_master()? That's where the dynamic bus number should be being assigned.