RE: [PATCH v4 3/8] wireless: wl1271: add platform driver to get board data

2010-08-15 Thread DebBarma, Tarun Kanti
rk Brown; linux-arm- > > > ker...@lists.infradead.org; Chikkature Rajashekar, Madhusudhan; Coelho > > > Luciano (Nokia-MS/Helsinki); a...@linux-foundation.org; San Mehat; > Quadros > > > Roger (Nokia-MS/Helsinki); Tony Lindgren; Nicolas Pitre; Pandita, > Vikram; >

Re: [PATCH v4 3/8] wireless: wl1271: add platform driver to get board data

2010-08-12 Thread Ohad Ben-Cohen
On Thursday, August 12, 2010, Russell King - ARM Linux wrote: > On Thu, Aug 12, 2010 at 09:40:19AM +0300, Ohad Ben-Cohen wrote: >> On Thu, Aug 12, 2010 at 12:25 AM, Russell King - ARM Linux >> wrote: >> >I've outlined a far simpler and easiler solution >> > which avoids this kind of abuse, and gi

Re: [PATCH v4 3/8] wireless: wl1271: add platform driver to get board data

2010-08-12 Thread Russell King - ARM Linux
On Thu, Aug 12, 2010 at 09:40:19AM +0300, Ohad Ben-Cohen wrote: > On Thu, Aug 12, 2010 at 12:25 AM, Russell King - ARM Linux > wrote: > >I've outlined a far simpler and easiler solution > > which avoids this kind of abuse, and given suggestions on how to extend > > it to support multiple instances

Re: [PATCH v4 3/8] wireless: wl1271: add platform driver to get board data

2010-08-11 Thread Ohad Ben-Cohen
On Thu, Aug 12, 2010 at 12:25 AM, Russell King - ARM Linux wrote: >I've outlined a far simpler and easiler solution > which avoids this kind of abuse, and given suggestions on how to extend > it to support multiple instances. > Do you mean: http://www.spinics.net/lists/arm-kernel/msg95338.html ?

Re: [PATCH v4 3/8] wireless: wl1271: add platform driver to get board data

2010-08-11 Thread Felipe Balbi
Hi, On Wed, Aug 11, 2010 at 10:10:38PM +0200, ext Ohad Ben-Cohen wrote: Think of several wl1271 devices, each of which is represented by two devices; an SDIO function, and a platform device. The SDIO function stands for a specific MMC controller the device is hardwired to, and the platform devic

Re: [PATCH v4 3/8] wireless: wl1271: add platform driver to get board data

2010-08-11 Thread Felipe Balbi
Hi, On Wed, Aug 11, 2010 at 09:27:18PM +0200, ext DebBarma, Tarun Kanti wrote: Sounds perfect! What that means is _probe() function makes sense only for cases where we have valid platform data because we are returning right at the top if pdata is not valid. If this is the case I was curious to

Re: [PATCH v4 3/8] wireless: wl1271: add platform driver to get board data

2010-08-11 Thread Ohad Ben-Cohen
Hi Vitaly, On Thu, Aug 12, 2010 at 12:34 AM, Vitaly Wool wrote: > On Wed, Aug 11, 2010 at 10:10 PM, Ohad Ben-Cohen wrote: >> Think of several wl1271 devices, each of which is represented by two >> devices; an SDIO function, and a platform device. The SDIO function >> stands for a specific MMC co

Re: [PATCH v4 3/8] wireless: wl1271: add platform driver to get board data

2010-08-11 Thread Ohad Ben-Cohen
.infradead.org; Chikkature Rajashekar, Madhusudhan; Coelho >> > Luciano (Nokia-MS/Helsinki); a...@linux-foundation.org; San Mehat; Quadros >> > Roger (Nokia-MS/Helsinki); Tony Lindgren; Nicolas Pitre; Pandita, Vikram; >> > Kalle Valo >> > Subject: Re: [PATCH v4 3/

Re: [PATCH v4 3/8] wireless: wl1271: add platform driver to get board data

2010-08-11 Thread Vitaly Wool
Hi Ohad, On Wed, Aug 11, 2010 at 10:10 PM, Ohad Ben-Cohen wrote: > Think of several wl1271 devices, each of which is represented by two > devices; an SDIO function, and a platform device. The SDIO function > stands for a specific MMC controller the device is hardwired to, and > the platform devic

Re: [PATCH v4 3/8] wireless: wl1271: add platform driver to get board data

2010-08-11 Thread Russell King - ARM Linux
ux-foundation.org; San Mehat; Quadros > > Roger (Nokia-MS/Helsinki); Tony Lindgren; Nicolas Pitre; Pandita, Vikram; > > Kalle Valo > > Subject: Re: [PATCH v4 3/8] wireless: wl1271: add platform driver to get > > board data > > > > Hi, > > > > On We

Re: [PATCH v4 3/8] wireless: wl1271: add platform driver to get board data

2010-08-11 Thread Russell King - ARM Linux
On Thu, Aug 12, 2010 at 12:22:54AM +0530, DebBarma, Tarun Kanti wrote: > True; however if we go by that argument than we can also assume pdata > is valid, so that we would not need the below check. If pdev was ever NULL in a probe function, the kernel deserves to OOPS so that you have a backtrace

Re: [PATCH v4 3/8] wireless: wl1271: add platform driver to get board data

2010-08-11 Thread Ohad Ben-Cohen
Hi Felipe, On Wed, Aug 11, 2010 at 9:47 PM, Felipe Balbi wrote: >>> +       pdata = pdev->dev.platform_data; >>> +       if (!pdata) { >>> +               wl1271_error("no platform data"); >>> +               return -ENODEV; >>> +       } >>> + >>> +       pdriver = container_of(pdev->dev.driver,

RE: [PATCH v4 3/8] wireless: wl1271: add platform driver to get board data

2010-08-11 Thread DebBarma, Tarun Kanti
Kalle Valo > Subject: Re: [PATCH v4 3/8] wireless: wl1271: add platform driver to get > board data > > Hi, > > On Wed, Aug 11, 2010 at 08:52:54PM +0200, ext DebBarma, Tarun Kanti wrote: > >True; however if we go by that argument than we can also assume pdata > >is v

Re: [PATCH v4 3/8] wireless: wl1271: add platform driver to get board data

2010-08-11 Thread Felipe Balbi
Hi, On Wed, Aug 11, 2010 at 08:52:54PM +0200, ext DebBarma, Tarun Kanti wrote: True; however if we go by that argument than we can also assume pdata is valid, so that we would not need the below check. of course not. You can have devices that just play well with default values or devices wher

RE: [PATCH v4 3/8] wireless: wl1271: add platform driver to get board data

2010-08-11 Thread DebBarma, Tarun Kanti
ark Brown; > linux-arm-ker...@lists.infradead.org; Chikkature Rajashekar, Madhusudhan; > Coelho Luciano (Nokia-MS/Helsinki); a...@linux-foundation.org; San Mehat; > Quadros Roger (Nokia-MS/Helsinki); Tony Lindgren; Nicolas Pitre; Pandita, > Vikram; Kalle Valo > Subject: Re: [PA

Re: [PATCH v4 3/8] wireless: wl1271: add platform driver to get board data

2010-08-11 Thread Felipe Balbi
hi, On Wed, Aug 11, 2010 at 08:42:18PM +0200, ext DebBarma, Tarun Kanti wrote: @@ -182,10 +186,84 @@ static struct wl1271_if_operations sdio_ops = { .disable_irq= wl1271_sdio_disable_interrupts }; +static int wl1271_plat_probe(struct platform_device *pdev) +{ + struct wl12xx_

RE: [PATCH v4 3/8] wireless: wl1271: add platform driver to get board data

2010-08-11 Thread DebBarma, Tarun Kanti
Ohad, > -Original Message- > From: linux-omap-ow...@vger.kernel.org [mailto:linux-omap- > ow...@vger.kernel.org] On Behalf Of Ohad Ben-Cohen > Sent: Wednesday, August 11, 2010 11:52 PM > To: linux-wirel...@vger.kernel.org; linux-mmc@vger.kernel.org; linux- > o...@vger.kernel.org > Cc: Ido