Re: [spi-devel-general] [PATCH] spi/mpc5121: register spi child devices of spi node

2010-07-27 Thread Baruch Siach
Hi Anatolij, On Tue, Jul 27, 2010 at 12:59:38AM +0200, Anatolij Gustschin wrote: Signed-off-by: Anatolij Gustschin ag...@denx.de --- drivers/spi/mpc512x_psc_spi.c | 10 +- 1 files changed, 9 insertions(+), 1 deletions(-) You should CC Grant Likely on this. He is now the de-facto

Re: [spi-devel-general] [PATCH] spi/mpc5121: register spi child devices of spi node

2010-07-27 Thread Grant Likely
On Tue, Jul 27, 2010 at 12:17 AM, Baruch Siach bar...@tkos.co.il wrote: Hi Anatolij, On Tue, Jul 27, 2010 at 12:59:38AM +0200, Anatolij Gustschin wrote: Signed-off-by: Anatolij Gustschin ag...@denx.de ---  drivers/spi/mpc512x_psc_spi.c |   10 +-  1 files changed, 9 insertions(+), 1

Re: [spi-devel-general] [PATCH] spi/mpc5121: register spi child devices of spi node

2010-07-27 Thread David Brownell
There are things wrong with the concept of this particular patch. First, that it's mpc5121-only. Second, that it's not already handled as part of registering the platform's SPI devices. -- The Palm PDK Hot Apps Program

Re: [spi-devel-general] [PATCH] spi/mpc5121: register spi child devices of spi node

2010-07-27 Thread Grant Likely
On Tue, Jul 27, 2010 at 12:28 AM, David Brownell davi...@pacbell.net wrote: There are things wrong with the concept of this particular patch.  First, that it's mpc5121-only. Second, that it's not already handled as part of registering the platform's SPI devices. The reason is that in this use

Re: [spi-devel-general] [PATCH] spi/mpc5121: register spi child devices of spi node

2010-07-27 Thread David Brownell
Second, that it's not already handled as part of registering the platform's SPI devices. The reason is that in this use case the platform code doesn't provide a list of spi devices.  The list of devices is contained in the flattened device tree, and the data is parsed after the spi bus

Re: [spi-devel-general] [PATCH] spi/mpc5121: register spi child devices of spi node

2010-07-27 Thread Feng Tang
On Tue, 27 Jul 2010 14:28:57 +0800 David Brownell davi...@pacbell.net wrote: There are things wrong with the concept of this particular patch. First, that it's mpc5121-only. Second, that it's not already handled as part of registering the platform's SPI devices. Hi David, Grant, This

Re: [spi-devel-general] [PATCH] spi/mpc5121: register spi child devices of spi node

2010-07-27 Thread David Brownell
--- On Tue, 7/27/10, Feng Tang feng.t...@intel.com wrote: be delayed registering, can we adjust it to make register_board_info() be callable after spi controller is inited? Which makes spi bus like general pci/usb bus, where devices/drivers have no registering order limit. They require

Re: [spi-devel-general] [PATCH] spi/mpc5121: register spi child devices of spi node

2010-07-27 Thread Grant Likely
On Tue, Jul 27, 2010 at 1:14 AM, Feng Tang feng.t...@intel.com wrote: On Tue, 27 Jul 2010 14:28:57 +0800 David Brownell davi...@pacbell.net wrote: There are things wrong with the concept of this particular patch.  First, that it's mpc5121-only. Second, that it's not already handled as part

Re: [spi-devel-general] [PATCH] spi/mpc5121: register spi child devices of spi node

2010-07-27 Thread Feng Tang
On Tue, 27 Jul 2010 15:00:29 +0800 Grant Likely grant.lik...@secretlab.ca wrote: On Tue, Jul 27, 2010 at 1:14 AM, Feng Tang feng.t...@intel.com wrote: On Tue, 27 Jul 2010 14:28:57 +0800 David Brownell davi...@pacbell.net wrote: There are things wrong with the concept of this

Re: [spi-devel-general] [PATCH] spi/mpc5121: register spi child devices of spi node

2010-07-27 Thread Feng Tang
On Tue, 27 Jul 2010 15:07:28 +0800 David Brownell davi...@pacbell.net wrote: --- On Tue, 7/27/10, Feng Tang feng.t...@intel.com wrote: be delayed registering, can we adjust it to make register_board_info() be callable after spi controller is inited? Which makes spi bus like

Re: [spi-devel-general] [PATCH] spi/mpc5121: register spi child devices of spi node

2010-07-27 Thread David Brownell
--- On Tue, 7/27/10, Feng Tang feng.t...@intel.com wrote: What I want to say is the matching mechanism between spi board info and spi master, currently they use bus number to match, but there is a ordering limit now. For general device/driver matching in linux device model, there is no

Re: [spi-devel-general] [PATCH] spi/mpc5121: register spi child devices of spi node

2010-07-27 Thread David Brownell
--- On Tue, 7/27/10, Feng Tang feng.t...@intel.com wrote: know which spi_master it is connecting to, while our platform need kind of blind registering (just register something to spi-bus). Sounding worse and worse. each device is going to be connected to one specific controller, not

Re: [spi-devel-general] [PATCH] spi/mpc5121: register spi child devices of spi node

2010-07-27 Thread Feng Tang
On Tue, 27 Jul 2010 15:27:50 +0800 David Brownell davi...@pacbell.net wrote: --- On Tue, 7/27/10, Feng Tang feng.t...@intel.com wrote: What I want to say is the matching mechanism between spi board info and spi master, currently they use bus number to match, but there is a

Re: [spi-devel-general] [PATCH] spi/mpc5121: register spi child devices of spi node

2010-07-27 Thread Feng Tang
On Tue, 27 Jul 2010 15:44:48 +0800 David Brownell davi...@pacbell.net wrote: --- On Tue, 7/27/10, Feng Tang feng.t...@intel.com wrote: In current spi core, spi_register_info() has to be called before the spi controller driver call spi_register_master(), then these board info

Re: [spi-devel-general] [PATCH] spi/mpc5121: register spi child devices of spi node

2010-07-27 Thread David Brownell
--- On Tue, 7/27/10, Feng Tang feng.t...@intel.com wrote: In current spi core, spi_register_info() has to be called before the spi controller driver call spi_register_master(), then these board info will be matched and used to create a new spi device. But if spi_register_info() are

[spi-devel-general] [PATCH] spi: enable spi_board_info to be registered after spi_master

2010-07-27 Thread Feng Tang
Currently spi_register_board_info() has to be called before its related spi_master be registered, otherwise these board info will be just ignored. This patch will remove this order limit, it adds a global spi master list like the existing global board info listr. Whenever a board info is

[spi-devel-general] Complementaire sante Radiance : votre sante ne doit pas devenir un luxe

2010-07-27 Thread Radiance par Plein Temps
-- The Palm PDK Hot Apps Program offers developers who use the Plug-In Development Kit to bring their C/C++ apps to Palm for a share of $1 Million in cash or HP Products. Visit us here for more details:

[spi-devel-general] [PATCH] of/spi: call of_register_spi_devices() from spi core code

2010-07-27 Thread Anatolij Gustschin
Move of_register_spi_devices() call from some drivers to spi_register_master(). Also change the function to use the struct device_node pointer from master spi device instead of passing it as function argument. Since xilinx_spi_of.c and spi_ppc4xx.c drivers do not use spi_register_master(), they

[spi-devel-general] amba_pl022: Fix section mismatch warnings

2010-07-27 Thread Kevin Wells
Changed __init to __devinit and __exit_p to __devexit_p per other AMBA drivers. Fixes section mismatch warning. Signed-off-by: Kevin Wells wells...@gmail.com 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/spi/amba-pl022.c b/drivers/spi/amba-pl022.c index f0a1418..acd35d1

Re: [spi-devel-general] [PATCH] of/spi: call of_register_spi_devices() from spi core code

2010-07-27 Thread Grant Likely
On Tue, Jul 27, 2010 at 7:39 AM, Anatolij Gustschin ag...@denx.de wrote: Move of_register_spi_devices() call from some drivers to spi_register_master(). Also change the function to use the struct device_node pointer from master spi device instead of passing it as function argument. Since

Re: [spi-devel-general] [PATCH 3/6] of/spi: add support to parse the SPI flash's partitions

2010-07-27 Thread Grant Likely
[cc'ing spi-devel-general] On Mon, Jul 26, 2010 at 2:20 AM, Hu Mingkai-B21284 b21...@freescale.com wrote: -Original Message- From: glik...@secretlab.ca [mailto:glik...@secretlab.ca] On Behalf Of Grant Likely Sent: Monday, July 26, 2010 3:53 PM To: Hu Mingkai-B21284 Cc:

Re: [spi-devel-general] amba_pl022: Fix section mismatch warnings

2010-07-27 Thread Linus Walleij
2010/7/27 Kevin Wells kevin.we...@nxp.com: Changed __init to __devinit and __exit_p to __devexit_p per other AMBA drivers. Fixes section mismatch warning. Signed-off-by: Kevin Wells wells...@gmail.com Acked-by: Linus Walleij linus.wall...@stericsson.com Yours, Linus Walleij

Re: [spi-devel-general] [PATCH] spi: enable spi_board_info to be registered after spi_master

2010-07-27 Thread Feng Tang
Hi Grant, Thanks for your thorough reviews! Will address most of the comments. On Wed, 28 Jul 2010 01:27:16 +0800 Grant Likely grant.lik...@secretlab.ca wrote: for (i = 0, tmp_bi = bi; i n; i++, tmp_bi++, info++) +               memcpy(bi-board_info, info, sizeof *info); +          

Re: [spi-devel-general] [PATCH] spi: enable spi_board_info to be registered after spi_master

2010-07-27 Thread Feng Tang
On Wed, 28 Jul 2010 09:23:06 +0800 Feng Tang feng.t...@intel.com wrote: @@ -537,6 +557,10 @@ int spi_register_master(struct spi_master *master) dev_dbg(dev, registered master %s%s\n, dev_name(master-dev), dynamic ? (dynamic) : ); +       mutex_lock(master_lock); +      

[spi-devel-general] [PATCH v2] spi: enable spi_board_info to be registered after spi_master

2010-07-27 Thread Feng Tang
Currently spi_register_board_info() has to be called before its related spi_master be registered, otherwise these board info will be just ignored. This patch will remove this order limit, it adds a global spi master list like the existing global board info listr. Whenever a board info is