Re: [PATCH] spi: xilinx: Use standard num-cs binding

2015-03-31 Thread Mark Brown
On Tue, Mar 31, 2015 at 01:25:07PM +0200, Michal Simek wrote:
> On 03/31/2015 01:16 PM, Mark Brown wrote:

> > Well, there's a lot of existing users to check and clean up some of
> > which currently rely on it which will take time to deal with.  Removing
> > it while some drivers rely on using it isn't ideal.

> We have spi-cadence driver in the kernel which uses num-cs and also
> is-decoded-cs and we can change it but the question still remains how
> to do it better.

Like I say just don't use num-cs, use a property which describes the
hardware.


signature.asc
Description: Digital signature


Re: [PATCH] spi: xilinx: Use standard num-cs binding

2015-03-31 Thread Michal Simek
On 03/31/2015 01:16 PM, Mark Brown wrote:
> On Tue, Mar 31, 2015 at 10:16:57AM +0200, Michal Simek wrote:
>> On 03/31/2015 07:47 AM, Mark Brown wrote:
> 
>>> num-cs *is* a software setting.
> 
>> ok - what to do with that? Remove it because it shouldn't be passed via DT?
> 
> Well, there's a lot of existing users to check and clean up some of
> which currently rely on it which will take time to deal with.  Removing
> it while some drivers rely on using it isn't ideal.
> 

We have spi-cadence driver in the kernel which uses num-cs and also
is-decoded-cs and we can change it but the question still remains how
to do it better.

Thanks,
Michal
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] spi: xilinx: Use standard num-cs binding

2015-03-31 Thread Mark Brown
On Tue, Mar 31, 2015 at 10:16:57AM +0200, Michal Simek wrote:
> On 03/31/2015 07:47 AM, Mark Brown wrote:

> > num-cs *is* a software setting.

> ok - what to do with that? Remove it because it shouldn't be passed via DT?

Well, there's a lot of existing users to check and clean up some of
which currently rely on it which will take time to deal with.  Removing
it while some drivers rely on using it isn't ideal.


signature.asc
Description: Digital signature


Re: [PATCH] spi: xilinx: Use standard num-cs binding

2015-03-31 Thread Michal Simek
On 03/31/2015 07:47 AM, Mark Brown wrote:
> On Mon, Mar 30, 2015 at 08:46:10AM +0200, Michal Simek wrote:
>> On 03/27/2015 06:53 PM, Mark Brown wrote:
>>> On Fri, Mar 27, 2015 at 11:55:49AM +0100, Michal Simek wrote:
> 
>>> Please fix your mail client to word wrap within paragraphs at less than
>>> 80 columns - this makes your mails easier to read and reply to.
> 
>> You are the first one who had problem with this. But I have setup lower
>> limit and hopefully it is better now.
> 
> That looks better, yes...  I may just be the first one who's bothered
> remarking on this.

yes and I definitely thank you for that.

 On 03/08/2015 08:00 PM, Mark Brown wrote:
> On Fri, Jan 16, 2015 at 01:55:14PM +0100, Michal Simek wrote:
> 
>>> Remember that we can at least in theory have additional chip selects
>>> that aren't controlled by the IP block but are instead GPIOs.  
> 
>> I agree with you but this can be generic case for every SPI driver. Also
>> using external decoder is possible for every driver. Maybe there are
>> others options via I2C too.
> 
> Remember that this in the context of me saying I don't think num-cs is
> a particularly good idea at all...

yes.


>>> There's
>>> also some potential confusion for users between the number of chip
>>> selects in use in a given system and the size of the bitfield that the
>>> driver needs to take care of.
> 
>> num-ss-bits is autogenerated directly from design tools for particular
>> hardware design and this size is exactly setup and hardcoded. (num-cs
>> can be just the same case)
>> If there are 5 bits there are 5 wires from IP. And value of num-ss-bits
>> and num-cs will be the same.
> 
> But what your patch did was *replace* num-ss-bits in the binding, not
> just add it.

yes. Sync binding was the main my point.


>> If user wants to use less lines then physically available we could
>> potentially extend binding to say. num-ss-bit - number of chip selects
>> available in hardware. num-cs - number of chip selects used by the driver.
>> But I expect that this will be rejected because it is software setting
>> not hardware description.
> 
> num-cs *is* a software setting.

ok - what to do with that? Remove it because it shouldn't be passed via DT?

Thanks,
Michal

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] spi: xilinx: Use standard num-cs binding

2015-03-31 Thread Michal Simek
On 03/31/2015 07:47 AM, Mark Brown wrote:
 On Mon, Mar 30, 2015 at 08:46:10AM +0200, Michal Simek wrote:
 On 03/27/2015 06:53 PM, Mark Brown wrote:
 On Fri, Mar 27, 2015 at 11:55:49AM +0100, Michal Simek wrote:
 
 Please fix your mail client to word wrap within paragraphs at less than
 80 columns - this makes your mails easier to read and reply to.
 
 You are the first one who had problem with this. But I have setup lower
 limit and hopefully it is better now.
 
 That looks better, yes...  I may just be the first one who's bothered
 remarking on this.

yes and I definitely thank you for that.

 On 03/08/2015 08:00 PM, Mark Brown wrote:
 On Fri, Jan 16, 2015 at 01:55:14PM +0100, Michal Simek wrote:
 
 Remember that we can at least in theory have additional chip selects
 that aren't controlled by the IP block but are instead GPIOs.  
 
 I agree with you but this can be generic case for every SPI driver. Also
 using external decoder is possible for every driver. Maybe there are
 others options via I2C too.
 
 Remember that this in the context of me saying I don't think num-cs is
 a particularly good idea at all...

yes.


 There's
 also some potential confusion for users between the number of chip
 selects in use in a given system and the size of the bitfield that the
 driver needs to take care of.
 
 num-ss-bits is autogenerated directly from design tools for particular
 hardware design and this size is exactly setup and hardcoded. (num-cs
 can be just the same case)
 If there are 5 bits there are 5 wires from IP. And value of num-ss-bits
 and num-cs will be the same.
 
 But what your patch did was *replace* num-ss-bits in the binding, not
 just add it.

yes. Sync binding was the main my point.


 If user wants to use less lines then physically available we could
 potentially extend binding to say. num-ss-bit - number of chip selects
 available in hardware. num-cs - number of chip selects used by the driver.
 But I expect that this will be rejected because it is software setting
 not hardware description.
 
 num-cs *is* a software setting.

ok - what to do with that? Remove it because it shouldn't be passed via DT?

Thanks,
Michal

--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] spi: xilinx: Use standard num-cs binding

2015-03-31 Thread Michal Simek
On 03/31/2015 01:16 PM, Mark Brown wrote:
 On Tue, Mar 31, 2015 at 10:16:57AM +0200, Michal Simek wrote:
 On 03/31/2015 07:47 AM, Mark Brown wrote:
 
 num-cs *is* a software setting.
 
 ok - what to do with that? Remove it because it shouldn't be passed via DT?
 
 Well, there's a lot of existing users to check and clean up some of
 which currently rely on it which will take time to deal with.  Removing
 it while some drivers rely on using it isn't ideal.
 

We have spi-cadence driver in the kernel which uses num-cs and also
is-decoded-cs and we can change it but the question still remains how
to do it better.

Thanks,
Michal
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] spi: xilinx: Use standard num-cs binding

2015-03-31 Thread Mark Brown
On Tue, Mar 31, 2015 at 10:16:57AM +0200, Michal Simek wrote:
 On 03/31/2015 07:47 AM, Mark Brown wrote:

  num-cs *is* a software setting.

 ok - what to do with that? Remove it because it shouldn't be passed via DT?

Well, there's a lot of existing users to check and clean up some of
which currently rely on it which will take time to deal with.  Removing
it while some drivers rely on using it isn't ideal.


signature.asc
Description: Digital signature


Re: [PATCH] spi: xilinx: Use standard num-cs binding

2015-03-31 Thread Mark Brown
On Tue, Mar 31, 2015 at 01:25:07PM +0200, Michal Simek wrote:
 On 03/31/2015 01:16 PM, Mark Brown wrote:

  Well, there's a lot of existing users to check and clean up some of
  which currently rely on it which will take time to deal with.  Removing
  it while some drivers rely on using it isn't ideal.

 We have spi-cadence driver in the kernel which uses num-cs and also
 is-decoded-cs and we can change it but the question still remains how
 to do it better.

Like I say just don't use num-cs, use a property which describes the
hardware.


signature.asc
Description: Digital signature


Re: [PATCH] spi: xilinx: Use standard num-cs binding

2015-03-30 Thread Mark Brown
On Mon, Mar 30, 2015 at 08:46:10AM +0200, Michal Simek wrote:
> On 03/27/2015 06:53 PM, Mark Brown wrote:
> > On Fri, Mar 27, 2015 at 11:55:49AM +0100, Michal Simek wrote:

> > Please fix your mail client to word wrap within paragraphs at less than
> > 80 columns - this makes your mails easier to read and reply to.

> You are the first one who had problem with this. But I have setup lower
> limit and hopefully it is better now.

That looks better, yes...  I may just be the first one who's bothered
remarking on this.

> >> On 03/08/2015 08:00 PM, Mark Brown wrote:
> >>> On Fri, Jan 16, 2015 at 01:55:14PM +0100, Michal Simek wrote:

> > Remember that we can at least in theory have additional chip selects
> > that aren't controlled by the IP block but are instead GPIOs.  

> I agree with you but this can be generic case for every SPI driver. Also
> using external decoder is possible for every driver. Maybe there are
> others options via I2C too.

Remember that this in the context of me saying I don't think num-cs is
a particularly good idea at all...

> > There's
> > also some potential confusion for users between the number of chip
> > selects in use in a given system and the size of the bitfield that the
> > driver needs to take care of.

> num-ss-bits is autogenerated directly from design tools for particular
> hardware design and this size is exactly setup and hardcoded. (num-cs
> can be just the same case)
> If there are 5 bits there are 5 wires from IP. And value of num-ss-bits
> and num-cs will be the same.

But what your patch did was *replace* num-ss-bits in the binding, not
just add it.

> If user wants to use less lines then physically available we could
> potentially extend binding to say. num-ss-bit - number of chip selects
> available in hardware. num-cs - number of chip selects used by the driver.
> But I expect that this will be rejected because it is software setting
> not hardware description.

num-cs *is* a software setting.


signature.asc
Description: Digital signature


Re: [PATCH] spi: xilinx: Use standard num-cs binding

2015-03-30 Thread Michal Simek
Hi Mark,

On 03/27/2015 06:53 PM, Mark Brown wrote:
> On Fri, Mar 27, 2015 at 11:55:49AM +0100, Michal Simek wrote:
> 
> Please fix your mail client to word wrap within paragraphs at less than
> 80 columns - this makes your mails easier to read and reply to.

You are the first one who had problem with this. But I have setup lower
limit and hopefully it is better now.


>> On 03/08/2015 08:00 PM, Mark Brown wrote:
>>> On Fri, Jan 16, 2015 at 01:55:14PM +0100, Michal Simek wrote:
 Use standard num-cs binding property and setup
 "xlnx,num-ss-bits" as deprecated.
> 
>>> Why?  These properties mean different things - num-cs is a bit confused
>>> and is the total number of available chip selects for the system (which
>>> could include GPIOs) while num-ss-bits is the size of the bitfield
>>> (which could include things not actually mapped out properly/successfully 
>>> or something if the hardware designers were feeling particularly inspired).
> 
>> I was checking meaning of num-ss-bits and meaning is Number of slaves (taking
>> explanation from Vivado 2014.4) Range 1-32.
>> http://www.xilinx.com/support/documentation/ip_documentation/axi_spi/v1_02_a/axi_spi_ds742.pdf
>> Table 1 - page 4
> 
>> Checking through the hw design every pin is connected to device to do chip 
>> select.
>> That's why I think that num-cs (based on spi-bus.txt) is the right property.
> 
> Remember that we can at least in theory have additional chip selects
> that aren't controlled by the IP block but are instead GPIOs.  

I agree with you but this can be generic case for every SPI driver. Also
using external decoder is possible for every driver. Maybe there are
others options via I2C too.

> There's
> also some potential confusion for users between the number of chip
> selects in use in a given system and the size of the bitfield that the
> driver needs to take care of.

num-ss-bits is autogenerated directly from design tools for particular
hardware design and this size is exactly setup and hardcoded. (num-cs
can be just the same case)
If there are 5 bits there are 5 wires from IP. And value of num-ss-bits
and num-cs will be the same.

If user wants to use less lines then physically available we could
potentially extend binding to say. num-ss-bit - number of chip selects
available in hardware. num-cs - number of chip selects used by the driver.
But I expect that this will be rejected because it is software setting
not hardware description.

It is not a problem to still use num-ss-bits in the driver binding
but I still think that "standard" num-cs binding can be also used,
because values will be the same all the time.

For all that cases with GPIO, I2C, etc binding needs to be extended
and to be honest setting up CS with GPIO is easy to do in FPGA and
test it.

Thanks,
Michal
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] spi: xilinx: Use standard num-cs binding

2015-03-30 Thread Michal Simek
Hi Mark,

On 03/27/2015 06:53 PM, Mark Brown wrote:
 On Fri, Mar 27, 2015 at 11:55:49AM +0100, Michal Simek wrote:
 
 Please fix your mail client to word wrap within paragraphs at less than
 80 columns - this makes your mails easier to read and reply to.

You are the first one who had problem with this. But I have setup lower
limit and hopefully it is better now.


 On 03/08/2015 08:00 PM, Mark Brown wrote:
 On Fri, Jan 16, 2015 at 01:55:14PM +0100, Michal Simek wrote:
 Use standard num-cs binding property and setup
 xlnx,num-ss-bits as deprecated.
 
 Why?  These properties mean different things - num-cs is a bit confused
 and is the total number of available chip selects for the system (which
 could include GPIOs) while num-ss-bits is the size of the bitfield
 (which could include things not actually mapped out properly/successfully 
 or something if the hardware designers were feeling particularly inspired).
 
 I was checking meaning of num-ss-bits and meaning is Number of slaves (taking
 explanation from Vivado 2014.4) Range 1-32.
 http://www.xilinx.com/support/documentation/ip_documentation/axi_spi/v1_02_a/axi_spi_ds742.pdf
 Table 1 - page 4
 
 Checking through the hw design every pin is connected to device to do chip 
 select.
 That's why I think that num-cs (based on spi-bus.txt) is the right property.
 
 Remember that we can at least in theory have additional chip selects
 that aren't controlled by the IP block but are instead GPIOs.  

I agree with you but this can be generic case for every SPI driver. Also
using external decoder is possible for every driver. Maybe there are
others options via I2C too.

 There's
 also some potential confusion for users between the number of chip
 selects in use in a given system and the size of the bitfield that the
 driver needs to take care of.

num-ss-bits is autogenerated directly from design tools for particular
hardware design and this size is exactly setup and hardcoded. (num-cs
can be just the same case)
If there are 5 bits there are 5 wires from IP. And value of num-ss-bits
and num-cs will be the same.

If user wants to use less lines then physically available we could
potentially extend binding to say. num-ss-bit - number of chip selects
available in hardware. num-cs - number of chip selects used by the driver.
But I expect that this will be rejected because it is software setting
not hardware description.

It is not a problem to still use num-ss-bits in the driver binding
but I still think that standard num-cs binding can be also used,
because values will be the same all the time.

For all that cases with GPIO, I2C, etc binding needs to be extended
and to be honest setting up CS with GPIO is easy to do in FPGA and
test it.

Thanks,
Michal
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] spi: xilinx: Use standard num-cs binding

2015-03-30 Thread Mark Brown
On Mon, Mar 30, 2015 at 08:46:10AM +0200, Michal Simek wrote:
 On 03/27/2015 06:53 PM, Mark Brown wrote:
  On Fri, Mar 27, 2015 at 11:55:49AM +0100, Michal Simek wrote:

  Please fix your mail client to word wrap within paragraphs at less than
  80 columns - this makes your mails easier to read and reply to.

 You are the first one who had problem with this. But I have setup lower
 limit and hopefully it is better now.

That looks better, yes...  I may just be the first one who's bothered
remarking on this.

  On 03/08/2015 08:00 PM, Mark Brown wrote:
  On Fri, Jan 16, 2015 at 01:55:14PM +0100, Michal Simek wrote:

  Remember that we can at least in theory have additional chip selects
  that aren't controlled by the IP block but are instead GPIOs.  

 I agree with you but this can be generic case for every SPI driver. Also
 using external decoder is possible for every driver. Maybe there are
 others options via I2C too.

Remember that this in the context of me saying I don't think num-cs is
a particularly good idea at all...

  There's
  also some potential confusion for users between the number of chip
  selects in use in a given system and the size of the bitfield that the
  driver needs to take care of.

 num-ss-bits is autogenerated directly from design tools for particular
 hardware design and this size is exactly setup and hardcoded. (num-cs
 can be just the same case)
 If there are 5 bits there are 5 wires from IP. And value of num-ss-bits
 and num-cs will be the same.

But what your patch did was *replace* num-ss-bits in the binding, not
just add it.

 If user wants to use less lines then physically available we could
 potentially extend binding to say. num-ss-bit - number of chip selects
 available in hardware. num-cs - number of chip selects used by the driver.
 But I expect that this will be rejected because it is software setting
 not hardware description.

num-cs *is* a software setting.


signature.asc
Description: Digital signature


Re: [PATCH] spi: xilinx: Use standard num-cs binding

2015-03-27 Thread Mark Brown
On Fri, Mar 27, 2015 at 11:55:49AM +0100, Michal Simek wrote:

Please fix your mail client to word wrap within paragraphs at less than
80 columns - this makes your mails easier to read and reply to.

> On 03/08/2015 08:00 PM, Mark Brown wrote:
> > On Fri, Jan 16, 2015 at 01:55:14PM +0100, Michal Simek wrote:
> >> Use standard num-cs binding property and setup
> >> "xlnx,num-ss-bits" as deprecated.

> > Why?  These properties mean different things - num-cs is a bit confused
> > and is the total number of available chip selects for the system (which
> > could include GPIOs) while num-ss-bits is the size of the bitfield
> > (which could include things not actually mapped out properly/successfully 
> > or something if the hardware designers were feeling particularly inspired).

> I was checking meaning of num-ss-bits and meaning is Number of slaves (taking
> explanation from Vivado 2014.4) Range 1-32.
> http://www.xilinx.com/support/documentation/ip_documentation/axi_spi/v1_02_a/axi_spi_ds742.pdf
> Table 1 - page 4

> Checking through the hw design every pin is connected to device to do chip 
> select.
> That's why I think that num-cs (based on spi-bus.txt) is the right property.

Remember that we can at least in theory have additional chip selects
that aren't controlled by the IP block but are instead GPIOs.  There's
also some potential confusion for users between the number of chip
selects in use in a given system and the size of the bitfield that the
driver needs to take care of.

> > I'm not convinced num-cs ever made any sense.

> Does it mean that num-cs property used by 11 SPI drivers is just incorrect?

> Based on Documentation/devicetree/bindings/spi/spi-bus.txt it is the part of 
> binding
> - num-cs : total number of chipselects

> Please let me know what you think.

I don't think it has any value.


signature.asc
Description: Digital signature


Re: [PATCH] spi: xilinx: Use standard num-cs binding

2015-03-27 Thread Michal Simek
Hi Mark,

On 03/08/2015 08:00 PM, Mark Brown wrote:
> On Fri, Jan 16, 2015 at 01:55:14PM +0100, Michal Simek wrote:
>> Use standard num-cs binding property and setup
>> "xlnx,num-ss-bits" as deprecated.
> 
> Why?  These properties mean different things - num-cs is a bit confused
> and is the total number of available chip selects for the system (which
> could include GPIOs) while num-ss-bits is the size of the bitfield
> (which could include things not actually mapped out properly/successfully 
> or something if the hardware designers were feeling particularly inspired).

I was checking meaning of num-ss-bits and meaning is Number of slaves (taking
explanation from Vivado 2014.4) Range 1-32.
http://www.xilinx.com/support/documentation/ip_documentation/axi_spi/v1_02_a/axi_spi_ds742.pdf
Table 1 - page 4

Checking through the hw design every pin is connected to device to do chip 
select.
That's why I think that num-cs (based on spi-bus.txt) is the right property.

Of course hw guys can use decoder from these bits and we could use binding
as is used in cadence spi (is-decoded-cs)

> I'm not convinced num-cs ever made any sense.

Does it mean that num-cs property used by 11 SPI drivers is just incorrect?

Based on Documentation/devicetree/bindings/spi/spi-bus.txt it is the part of 
binding
- num-cs : total number of chipselects

Please let me know what you think.

Thanks,
Michal


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] spi: xilinx: Use standard num-cs binding

2015-03-27 Thread Michal Simek
Hi Mark,

On 03/08/2015 08:00 PM, Mark Brown wrote:
 On Fri, Jan 16, 2015 at 01:55:14PM +0100, Michal Simek wrote:
 Use standard num-cs binding property and setup
 xlnx,num-ss-bits as deprecated.
 
 Why?  These properties mean different things - num-cs is a bit confused
 and is the total number of available chip selects for the system (which
 could include GPIOs) while num-ss-bits is the size of the bitfield
 (which could include things not actually mapped out properly/successfully 
 or something if the hardware designers were feeling particularly inspired).

I was checking meaning of num-ss-bits and meaning is Number of slaves (taking
explanation from Vivado 2014.4) Range 1-32.
http://www.xilinx.com/support/documentation/ip_documentation/axi_spi/v1_02_a/axi_spi_ds742.pdf
Table 1 - page 4

Checking through the hw design every pin is connected to device to do chip 
select.
That's why I think that num-cs (based on spi-bus.txt) is the right property.

Of course hw guys can use decoder from these bits and we could use binding
as is used in cadence spi (is-decoded-cs)

 I'm not convinced num-cs ever made any sense.

Does it mean that num-cs property used by 11 SPI drivers is just incorrect?

Based on Documentation/devicetree/bindings/spi/spi-bus.txt it is the part of 
binding
- num-cs : total number of chipselects

Please let me know what you think.

Thanks,
Michal


--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] spi: xilinx: Use standard num-cs binding

2015-03-27 Thread Mark Brown
On Fri, Mar 27, 2015 at 11:55:49AM +0100, Michal Simek wrote:

Please fix your mail client to word wrap within paragraphs at less than
80 columns - this makes your mails easier to read and reply to.

 On 03/08/2015 08:00 PM, Mark Brown wrote:
  On Fri, Jan 16, 2015 at 01:55:14PM +0100, Michal Simek wrote:
  Use standard num-cs binding property and setup
  xlnx,num-ss-bits as deprecated.

  Why?  These properties mean different things - num-cs is a bit confused
  and is the total number of available chip selects for the system (which
  could include GPIOs) while num-ss-bits is the size of the bitfield
  (which could include things not actually mapped out properly/successfully 
  or something if the hardware designers were feeling particularly inspired).

 I was checking meaning of num-ss-bits and meaning is Number of slaves (taking
 explanation from Vivado 2014.4) Range 1-32.
 http://www.xilinx.com/support/documentation/ip_documentation/axi_spi/v1_02_a/axi_spi_ds742.pdf
 Table 1 - page 4

 Checking through the hw design every pin is connected to device to do chip 
 select.
 That's why I think that num-cs (based on spi-bus.txt) is the right property.

Remember that we can at least in theory have additional chip selects
that aren't controlled by the IP block but are instead GPIOs.  There's
also some potential confusion for users between the number of chip
selects in use in a given system and the size of the bitfield that the
driver needs to take care of.

  I'm not convinced num-cs ever made any sense.

 Does it mean that num-cs property used by 11 SPI drivers is just incorrect?

 Based on Documentation/devicetree/bindings/spi/spi-bus.txt it is the part of 
 binding
 - num-cs : total number of chipselects

 Please let me know what you think.

I don't think it has any value.


signature.asc
Description: Digital signature


Re: [PATCH] spi: xilinx: Use standard num-cs binding

2015-03-08 Thread Mark Brown
On Fri, Jan 16, 2015 at 01:55:14PM +0100, Michal Simek wrote:
> Use standard num-cs binding property and setup
> "xlnx,num-ss-bits" as deprecated.

Why?  These properties mean different things - num-cs is a bit confused
and is the total number of available chip selects for the system (which
could include GPIOs) while num-ss-bits is the size of the bitfield
(which could include things not actually mapped out properly/successfully 
or something if the hardware designers were feeling particularly inspired).

I'm not convinced num-cs ever made any sense.


signature.asc
Description: Digital signature


Re: [PATCH] spi: xilinx: Use standard num-cs binding

2015-03-08 Thread Mark Brown
On Fri, Jan 16, 2015 at 01:55:14PM +0100, Michal Simek wrote:
 Use standard num-cs binding property and setup
 xlnx,num-ss-bits as deprecated.

Why?  These properties mean different things - num-cs is a bit confused
and is the total number of available chip selects for the system (which
could include GPIOs) while num-ss-bits is the size of the bitfield
(which could include things not actually mapped out properly/successfully 
or something if the hardware designers were feeling particularly inspired).

I'm not convinced num-cs ever made any sense.


signature.asc
Description: Digital signature


[RESENT PATCH] spi: xilinx: Use standard num-cs binding

2015-03-05 Thread Michal Simek
Use standard num-cs binding property and setup
"xlnx,num-ss-bits" as deprecated.

Signed-off-by: Michal Simek 
---

 drivers/spi/spi-xilinx.c | 11 +--
 1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/drivers/spi/spi-xilinx.c b/drivers/spi/spi-xilinx.c
index 133f53a9c1d4..69313407b690 100644
--- a/drivers/spi/spi-xilinx.c
+++ b/drivers/spi/spi-xilinx.c
@@ -374,8 +374,15 @@ static int xilinx_spi_probe(struct platform_device *pdev)
num_cs = pdata->num_chipselect;
bits_per_word = pdata->bits_per_word;
} else {
-   of_property_read_u32(pdev->dev.of_node, "xlnx,num-ss-bits",
- _cs);
+   if (of_property_read_u32(pdev->dev.of_node, "num-cs",
+_cs)) {
+   if (!of_property_read_u32(pdev->dev.of_node,
+ "xlnx,num-ss-bits",
+ _cs)) {
+   dev_err(>dev,
+   "property name 'xlnx,num-ss-bits' is 
deprecated.\n");
+   }
+   }
}
 
if (!num_cs) {
-- 
1.8.2.3

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[RESENT PATCH] spi: xilinx: Use standard num-cs binding

2015-03-05 Thread Michal Simek
Use standard num-cs binding property and setup
xlnx,num-ss-bits as deprecated.

Signed-off-by: Michal Simek michal.si...@xilinx.com
---

 drivers/spi/spi-xilinx.c | 11 +--
 1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/drivers/spi/spi-xilinx.c b/drivers/spi/spi-xilinx.c
index 133f53a9c1d4..69313407b690 100644
--- a/drivers/spi/spi-xilinx.c
+++ b/drivers/spi/spi-xilinx.c
@@ -374,8 +374,15 @@ static int xilinx_spi_probe(struct platform_device *pdev)
num_cs = pdata-num_chipselect;
bits_per_word = pdata-bits_per_word;
} else {
-   of_property_read_u32(pdev-dev.of_node, xlnx,num-ss-bits,
- num_cs);
+   if (of_property_read_u32(pdev-dev.of_node, num-cs,
+num_cs)) {
+   if (!of_property_read_u32(pdev-dev.of_node,
+ xlnx,num-ss-bits,
+ num_cs)) {
+   dev_err(pdev-dev,
+   property name 'xlnx,num-ss-bits' is 
deprecated.\n);
+   }
+   }
}
 
if (!num_cs) {
-- 
1.8.2.3

--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] spi: xilinx: Use standard num-cs binding

2015-02-24 Thread Mark Brown
On Mon, Feb 23, 2015 at 11:22:02AM +0100, Michal Simek wrote:
> On 02/14/2015 06:35 AM, Mark Brown wrote:

> > Don't send content free quoted pings, they're just adding to the e-mail
> > volume and hence wasting people's time.

> How do you want me to send ping on pending patches?
> Just send them with RESEND prefix?
> I just want to clarify this.

Reposting is helpful if things have been forgotten.  Though in this case
I'm deliberately leaving it for a while because of the nagging (since I
don't want people to get the impression that it's helpful).  Plus I'm
travelling.


signature.asc
Description: Digital signature


Re: [PATCH] spi: xilinx: Use standard num-cs binding

2015-02-24 Thread Mark Brown
On Mon, Feb 23, 2015 at 11:22:02AM +0100, Michal Simek wrote:
 On 02/14/2015 06:35 AM, Mark Brown wrote:

  Don't send content free quoted pings, they're just adding to the e-mail
  volume and hence wasting people's time.

 How do you want me to send ping on pending patches?
 Just send them with RESEND prefix?
 I just want to clarify this.

Reposting is helpful if things have been forgotten.  Though in this case
I'm deliberately leaving it for a while because of the nagging (since I
don't want people to get the impression that it's helpful).  Plus I'm
travelling.


signature.asc
Description: Digital signature


Re: [PATCH] spi: xilinx: Use standard num-cs binding

2015-02-23 Thread Michal Simek
Hi Mark,

On 02/14/2015 06:35 AM, Mark Brown wrote:
> On Wed, Feb 11, 2015 at 12:07:20PM +0100, Michal Simek wrote:
>> 2015-01-16 13:55 GMT+01:00 Michal Simek :
> 
>>> Use standard num-cs binding property and setup
>>> "xlnx,num-ss-bits" as deprecated.
> 
>> Any update on this one?
> 
> Don't send content free quoted pings, they're just adding to the e-mail
> volume and hence wasting people's time.

How do you want me to send ping on pending patches?
Just send them with RESEND prefix?
I just want to clarify this.

Thanks,
Michal

-- 
Michal Simek, Ing. (M.Eng), OpenPGP -> KeyID: FE3D1F91
w: www.monstr.eu p: +42-0-721842854
Maintainer of Linux kernel - Microblaze cpu - http://www.monstr.eu/fdt/
Maintainer of Linux kernel - Xilinx Zynq ARM architecture
Microblaze U-BOOT custodian and responsible for u-boot arm zynq platform




signature.asc
Description: OpenPGP digital signature


Re: [PATCH] spi: xilinx: Use standard num-cs binding

2015-02-23 Thread Michal Simek
Hi Mark,

On 02/14/2015 06:35 AM, Mark Brown wrote:
 On Wed, Feb 11, 2015 at 12:07:20PM +0100, Michal Simek wrote:
 2015-01-16 13:55 GMT+01:00 Michal Simek michal.si...@xilinx.com:
 
 Use standard num-cs binding property and setup
 xlnx,num-ss-bits as deprecated.
 
 Any update on this one?
 
 Don't send content free quoted pings, they're just adding to the e-mail
 volume and hence wasting people's time.

How do you want me to send ping on pending patches?
Just send them with RESEND prefix?
I just want to clarify this.

Thanks,
Michal

-- 
Michal Simek, Ing. (M.Eng), OpenPGP - KeyID: FE3D1F91
w: www.monstr.eu p: +42-0-721842854
Maintainer of Linux kernel - Microblaze cpu - http://www.monstr.eu/fdt/
Maintainer of Linux kernel - Xilinx Zynq ARM architecture
Microblaze U-BOOT custodian and responsible for u-boot arm zynq platform




signature.asc
Description: OpenPGP digital signature


Re: [PATCH] spi: xilinx: Use standard num-cs binding

2015-02-13 Thread Mark Brown
On Wed, Feb 11, 2015 at 12:07:20PM +0100, Michal Simek wrote:
> 2015-01-16 13:55 GMT+01:00 Michal Simek :

> > Use standard num-cs binding property and setup
> > "xlnx,num-ss-bits" as deprecated.

> Any update on this one?

Don't send content free quoted pings, they're just adding to the e-mail
volume and hence wasting people's time.


signature.asc
Description: Digital signature


Re: [PATCH] spi: xilinx: Use standard num-cs binding

2015-02-13 Thread Mark Brown
On Wed, Feb 11, 2015 at 12:07:20PM +0100, Michal Simek wrote:
 2015-01-16 13:55 GMT+01:00 Michal Simek michal.si...@xilinx.com:

  Use standard num-cs binding property and setup
  xlnx,num-ss-bits as deprecated.

 Any update on this one?

Don't send content free quoted pings, they're just adding to the e-mail
volume and hence wasting people's time.


signature.asc
Description: Digital signature


Re: [PATCH] spi: xilinx: Use standard num-cs binding

2015-02-12 Thread Michal Simek
Hi Mark,

On 01/16/2015 01:55 PM, Michal Simek wrote:
> Use standard num-cs binding property and setup
> "xlnx,num-ss-bits" as deprecated.
> 
> Signed-off-by: Michal Simek 
> ---
> 
>  drivers/spi/spi-xilinx.c | 11 +--
>  1 file changed, 9 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/spi/spi-xilinx.c b/drivers/spi/spi-xilinx.c
> index 79bd84f43430..30e5180195bb 100644
> --- a/drivers/spi/spi-xilinx.c
> +++ b/drivers/spi/spi-xilinx.c
> @@ -338,8 +338,15 @@ static int xilinx_spi_probe(struct platform_device *pdev)
>   num_cs = pdata->num_chipselect;
>   bits_per_word = pdata->bits_per_word;
>   } else {
> - of_property_read_u32(pdev->dev.of_node, "xlnx,num-ss-bits",
> -   _cs);
> + if (of_property_read_u32(pdev->dev.of_node, "num-cs",
> +  _cs)) {
> + if (!of_property_read_u32(pdev->dev.of_node,
> +   "xlnx,num-ss-bits",
> +   _cs)) {
> + dev_err(>dev,
> + "property name 'xlnx,num-ss-bits' is 
> deprecated.\n");
> + }
> + }
>   }
> 
>   if (!num_cs) {
> --
> 1.8.2.3
> 

Any update on this one?

Thanks,
Michal

-- 
Michal Simek, Ing. (M.Eng), OpenPGP -> KeyID: FE3D1F91
w: www.monstr.eu p: +42-0-721842854
Maintainer of Linux kernel - Microblaze cpu - http://www.monstr.eu/fdt/
Maintainer of Linux kernel - Xilinx Zynq ARM architecture
Microblaze U-BOOT custodian and responsible for u-boot arm zynq platform




signature.asc
Description: OpenPGP digital signature


Re: [PATCH] spi: xilinx: Use standard num-cs binding

2015-02-12 Thread Michal Simek
Hi Mark,

On 01/16/2015 01:55 PM, Michal Simek wrote:
 Use standard num-cs binding property and setup
 xlnx,num-ss-bits as deprecated.
 
 Signed-off-by: Michal Simek michal.si...@xilinx.com
 ---
 
  drivers/spi/spi-xilinx.c | 11 +--
  1 file changed, 9 insertions(+), 2 deletions(-)
 
 diff --git a/drivers/spi/spi-xilinx.c b/drivers/spi/spi-xilinx.c
 index 79bd84f43430..30e5180195bb 100644
 --- a/drivers/spi/spi-xilinx.c
 +++ b/drivers/spi/spi-xilinx.c
 @@ -338,8 +338,15 @@ static int xilinx_spi_probe(struct platform_device *pdev)
   num_cs = pdata-num_chipselect;
   bits_per_word = pdata-bits_per_word;
   } else {
 - of_property_read_u32(pdev-dev.of_node, xlnx,num-ss-bits,
 -   num_cs);
 + if (of_property_read_u32(pdev-dev.of_node, num-cs,
 +  num_cs)) {
 + if (!of_property_read_u32(pdev-dev.of_node,
 +   xlnx,num-ss-bits,
 +   num_cs)) {
 + dev_err(pdev-dev,
 + property name 'xlnx,num-ss-bits' is 
 deprecated.\n);
 + }
 + }
   }
 
   if (!num_cs) {
 --
 1.8.2.3
 

Any update on this one?

Thanks,
Michal

-- 
Michal Simek, Ing. (M.Eng), OpenPGP - KeyID: FE3D1F91
w: www.monstr.eu p: +42-0-721842854
Maintainer of Linux kernel - Microblaze cpu - http://www.monstr.eu/fdt/
Maintainer of Linux kernel - Xilinx Zynq ARM architecture
Microblaze U-BOOT custodian and responsible for u-boot arm zynq platform




signature.asc
Description: OpenPGP digital signature


[PATCH] spi: xilinx: Use standard num-cs binding

2015-01-16 Thread Michal Simek
Use standard num-cs binding property and setup
"xlnx,num-ss-bits" as deprecated.

Signed-off-by: Michal Simek 
---

 drivers/spi/spi-xilinx.c | 11 +--
 1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/drivers/spi/spi-xilinx.c b/drivers/spi/spi-xilinx.c
index 79bd84f43430..30e5180195bb 100644
--- a/drivers/spi/spi-xilinx.c
+++ b/drivers/spi/spi-xilinx.c
@@ -338,8 +338,15 @@ static int xilinx_spi_probe(struct platform_device *pdev)
num_cs = pdata->num_chipselect;
bits_per_word = pdata->bits_per_word;
} else {
-   of_property_read_u32(pdev->dev.of_node, "xlnx,num-ss-bits",
- _cs);
+   if (of_property_read_u32(pdev->dev.of_node, "num-cs",
+_cs)) {
+   if (!of_property_read_u32(pdev->dev.of_node,
+ "xlnx,num-ss-bits",
+ _cs)) {
+   dev_err(>dev,
+   "property name 'xlnx,num-ss-bits' is 
deprecated.\n");
+   }
+   }
}

if (!num_cs) {
--
1.8.2.3



pgpIIewuTM6qi.pgp
Description: PGP signature


[PATCH] spi: xilinx: Use standard num-cs binding

2015-01-16 Thread Michal Simek
Use standard num-cs binding property and setup
xlnx,num-ss-bits as deprecated.

Signed-off-by: Michal Simek michal.si...@xilinx.com
---

 drivers/spi/spi-xilinx.c | 11 +--
 1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/drivers/spi/spi-xilinx.c b/drivers/spi/spi-xilinx.c
index 79bd84f43430..30e5180195bb 100644
--- a/drivers/spi/spi-xilinx.c
+++ b/drivers/spi/spi-xilinx.c
@@ -338,8 +338,15 @@ static int xilinx_spi_probe(struct platform_device *pdev)
num_cs = pdata-num_chipselect;
bits_per_word = pdata-bits_per_word;
} else {
-   of_property_read_u32(pdev-dev.of_node, xlnx,num-ss-bits,
- num_cs);
+   if (of_property_read_u32(pdev-dev.of_node, num-cs,
+num_cs)) {
+   if (!of_property_read_u32(pdev-dev.of_node,
+ xlnx,num-ss-bits,
+ num_cs)) {
+   dev_err(pdev-dev,
+   property name 'xlnx,num-ss-bits' is 
deprecated.\n);
+   }
+   }
}

if (!num_cs) {
--
1.8.2.3



pgpIIewuTM6qi.pgp
Description: PGP signature