All of lore.kernel.org
 help / color / mirror / Atom feed
From: Heiko Schocher <hs@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v3 06/11] SPEAr : i2c driver support addded
Date: Mon, 11 Jan 2010 10:44:09 +0100	[thread overview]
Message-ID: <4B4AF2E9.50306@denx.de> (raw)
In-Reply-To: <1262958547-2508-7-git-send-email-vipin.kumar@st.com>

Hello Vipin,

Vipin KUMAR wrote:
> Signed-off-by: Vipin <vipin.kumar@st.com>
> ---
>  drivers/i2c/Makefile                 |    1 +
>  drivers/i2c/spr_i2c.c                |  340 ++++++++++++++++++++++++++++++++++
>  include/asm-arm/arch-spear/spr_i2c.h |  146 +++++++++++++++
>  include/configs/spear.h              |   11 +
>  4 files changed, 498 insertions(+), 0 deletions(-)
>  mode change 100644 => 100755 drivers/i2c/Makefile
>  create mode 100755 drivers/i2c/spr_i2c.c
>  create mode 100755 include/asm-arm/arch-spear/spr_i2c.h
> 
[...]
> diff --git a/drivers/i2c/spr_i2c.c b/drivers/i2c/spr_i2c.c
> new file mode 100755
> index 0000000..497ca47
> --- /dev/null
> +++ b/drivers/i2c/spr_i2c.c
[...]
> +/*
> + * i2c_set_bus_speed - Set the i2c speed
> + * @speed:	required i2c speed
> + *
> + * Set the i2c speed.
> + */
> +void i2c_set_bus_speed(int speed)
> +{
> +	if (speed >= I2C_MAX_SPEED) {
> +		set_speed(IC_SPEED_MODE_MAX);

No brackets for single statement, please,

> +

blank line not needed here.

> +	} else if (speed >= I2C_FAST_SPEED) {
> +		set_speed(IC_SPEED_MODE_FAST);
> +

same as above.

> +	} else {
> +		set_speed(IC_SPEED_MODE_STANDARD);
> +	}
> +}
> +
> +/*
> + * i2c_get_bus_speed - Gets the i2c speed
> + *
> + * Gets the i2c speed.
> + */
> +int i2c_get_bus_speed(void)
> +{
> +	u32 cntl;
> +
> +	cntl = (readl(&i2c_regs_p->ic_con) & IC_CON_SPD_MSK);
> +
> +	if (cntl == IC_CON_SPD_HS) {
> +		return I2C_MAX_SPEED;
> +

here too, please fix globally.

[...]

If you fix this small Coding Style issues, you get my:

Acked-by: Heiko Schocher<hs@denx.de>

thanks!

bye
Heiko
-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany

      parent reply	other threads:[~2010-01-11  9:44 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-01-08 13:48 [U-Boot] [PATCH v3 00/11] SPEAr : Adding support for SPEAr SoCs Vipin KUMAR
2010-01-08 13:48 ` [U-Boot] [PATCH v3 01/11] SPEAr : Adding README.spear in doc Vipin KUMAR
2010-01-08 13:48   ` [U-Boot] [PATCH v3 02/11] SPEAr : Adding basic support for SPEAr600 Vipin KUMAR
2010-01-08 13:48     ` [U-Boot] [PATCH v3 03/11] SPEAr : Adding basic support for SPEAr300 Vipin KUMAR
2010-01-08 13:49       ` [U-Boot] [PATCH v3 04/11] SPEAr : Adding basic support for SPEAr310 Vipin KUMAR
2010-01-08 13:49         ` [U-Boot] [PATCH v3 05/11] SPEAr : Adding basic support for SPEAr320 Vipin KUMAR
2010-01-08 13:49           ` [U-Boot] [PATCH v3 06/11] SPEAr : i2c driver support addded Vipin KUMAR
2010-01-08 13:49             ` [U-Boot] [PATCH v3 07/11] SPEAr : Support for HW macid read/write from i2c memory Vipin KUMAR
2010-01-08 13:49               ` [U-Boot] [PATCH v3 08/11] SPEAr : Support for serial memory interface driver and serial NOR flash Vipin KUMAR
2010-01-08 13:49                 ` [U-Boot] [PATCH v3 09/11] SPEAr : Support for nand driver Vipin KUMAR
2010-01-08 13:49                   ` [U-Boot] [PATCH v3 10/11] SPEAr : Support for usbd driver and usbtty support Vipin KUMAR
2010-01-08 13:49                     ` [U-Boot] [PATCH v3 11/11] SPEAr : Support for cfi driver and parallel NOR flash Vipin KUMAR
2010-01-11  9:44             ` Heiko Schocher [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=4B4AF2E9.50306@denx.de \
    --to=hs@denx.de \
    --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.