All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mike Frysinger <vapier@gentoo.org>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 1/4] SPI: Add SPI driver support for Marvell Armada100
Date: Mon, 19 Sep 2011 10:22:00 -0400	[thread overview]
Message-ID: <201109191022.01391.vapier@gentoo.org> (raw)
In-Reply-To: <1316429230-5957-1-git-send-email-ajay.bhargav@einfochips.com>

On Monday, September 19, 2011 06:47:07 Ajay Bhargav wrote:
> --- /dev/null
> +++ b/arch/arm/include/asm/arch-armada100/spi.h
>
> +struct armd_spi_slave {
> +	struct spi_slave slave;
> +	struct ssp_reg *spi_reg;
> +	u32 cr0, cr1;
> +	u32 int_cr1;
> +	u32 clear_sr;
> +	const void *tx;
> +	void *rx;
> +	int gpio_cs_inverted;
> +
> +	void (*write)(struct armd_spi_slave *pss);
> +	void (*read)(struct armd_spi_slave *pss);
> +};
> +
> +#define to_armd_spi_slave(s)	container_of(s, struct armd_spi_slave, slave)

i dont think internal driver details should be in a header.  these should be 
moved to armada100_spi.c.

> --- /dev/null
> +++ b/drivers/spi/armada100_spi.c
>
> +static void null_writer(struct armd_spi_slave *pss)
> +static void null_reader(struct armd_spi_slave *pss)
> +static void u8_writer(struct armd_spi_slave *pss)
> +static void u8_reader(struct armd_spi_slave *pss)
> +static int flush(struct armd_spi_slave *pss)

please prefix these with something like "spi_armd_".  generic names like this 
are often hard to trace back when debugging.
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
Url : http://lists.denx.de/pipermail/u-boot/attachments/20110919/76c98fca/attachment.pgp 

      parent reply	other threads:[~2011-09-19 14:22 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-09-19 10:47 [U-Boot] [PATCH 1/4] SPI: Add SPI driver support for Marvell Armada100 Ajay Bhargav
2011-09-19 10:55 ` Marek Vasut
2011-09-19 10:46   ` Ajay Bhargav
2011-09-19 11:08     ` Marek Vasut
2011-09-19 14:22 ` Mike Frysinger [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=201109191022.01391.vapier@gentoo.org \
    --to=vapier@gentoo.org \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.