linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* Questions in spi_mpc83xx.c
@ 2009-07-09 18:16 Mark Bishop
  2009-07-09 18:38 ` [spi-devel-general] " Baruch Siach
  0 siblings, 1 reply; 3+ messages in thread
From: Mark Bishop @ 2009-07-09 18:16 UTC (permalink / raw)
  To: spi-devel-general; +Cc: linuxppc-dev

I haven't seen this before - the '##' in the function name.  This is ANCII C?

#define MPC83XX_SPI_TX_BUF(type)				\
u32 mpc83xx_spi_tx_buf_##type(struct mpc83xx_spi *mpc83xx_spi)	\
{								\
	u32 data;						\
....


Also, I have a SPI chip here that will drive MISO high when it is  
ready to accept more data.  It acts like a hardware handshake.  I was  
thinking about making changes to the controller source (spi_mpc83xx.c,  
in my case) to support this.

This is the only SPI chip contained on this system so I am not worried  
about affecting other SPI devices hooked to the controller.

What are people's opinion on this as far as right place to implement,  
and I could use a push as to where in the controller to make mods if  
appropriate.

And if it isn't obvious already I am still learning a bit as to how  
the SPI sub-system is organized.   I have taken apart the  
documentation in the kernel Documentation/spi directory and am reading  
all the code in drivers/spi.

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

* Re: [spi-devel-general] Questions in spi_mpc83xx.c
  2009-07-09 18:16 Questions in spi_mpc83xx.c Mark Bishop
@ 2009-07-09 18:38 ` Baruch Siach
  2009-07-09 19:29   ` Mark Bishop
  0 siblings, 1 reply; 3+ messages in thread
From: Baruch Siach @ 2009-07-09 18:38 UTC (permalink / raw)
  To: Mark Bishop; +Cc: spi-devel-general, linuxppc-dev

Hi Mark,

On Thu, Jul 09, 2009 at 02:16:48PM -0400, Mark Bishop wrote:
> I haven't seen this before - the '##' in the function name.  This is ANCII C?

Of course. See pp. 90-91 in "The C Programming Language" second edition.

> 
> #define MPC83XX_SPI_TX_BUF(type)				\
> u32 mpc83xx_spi_tx_buf_##type(struct mpc83xx_spi *mpc83xx_spi)	\
> {								\
> 	u32 data;						\
> ....

baruch

-- 
                                                     ~. .~   Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
   - baruch@tkos.co.il - tel: +972.2.679.5364, http://www.tkos.co.il -

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

* Re: [spi-devel-general] Questions in spi_mpc83xx.c
  2009-07-09 18:38 ` [spi-devel-general] " Baruch Siach
@ 2009-07-09 19:29   ` Mark Bishop
  0 siblings, 0 replies; 3+ messages in thread
From: Mark Bishop @ 2009-07-09 19:29 UTC (permalink / raw)
  To: Baruch Siach; +Cc: spi-devel-general, linuxppc-dev

Quoting Baruch Siach <baruch@tkos.co.il>:

> Hi Mark,
>
> On Thu, Jul 09, 2009 at 02:16:48PM -0400, Mark Bishop wrote:
>> I haven't seen this before - the '##' in the function name.  This  
>> is ANCII C?
>
> Of course. See pp. 90-91 in "The C Programming Language" second edition.
>
>>


Wow, thanks.  I missed that little nugget of info.

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

end of thread, other threads:[~2009-07-09 19:34 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-07-09 18:16 Questions in spi_mpc83xx.c Mark Bishop
2009-07-09 18:38 ` [spi-devel-general] " Baruch Siach
2009-07-09 19:29   ` Mark Bishop

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).