All of lore.kernel.org
 help / color / mirror / Atom feed
From: Wolfgang Denk <wd@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot-Users] [PATCH] New Dummy I2C Driver
Date: Sun, 13 Jul 2008 15:33:54 +0200	[thread overview]
Message-ID: <20080713133354.29027240EE@gemini.denx.de> (raw)
In-Reply-To: Your message of "Fri, 11 Jul 2008 12:26:21 +0200." <1215771981-26784-1-git-send-email-ricardo.ribalda@uam.es>

In message <1215771981-26784-1-git-send-email-ricardo.ribalda@uam.es> you wrote:
> This driver provides access to a false i2c eeprom.
>  This false eeprom could be very useful in boards with
>  ddr2 memories and no i2c interfaces.
>  Using this driver the user can simulate the spd interface
>  of the ddr2 memory and use the ddr2 auto config

As discussed before, please substitue "false" by "fake" or similar.

I also agree with previous comments tthat "dummy" is not a good name,
as your driver actually does something useful. Actually, it simulates
an  EEPROM  device,  so  maybe  "eeprom_simul.c"  might  be  a   more
descriptive name?

> --- /dev/null
> +++ b/drivers/i2c/dummy_i2c.c
> @@ -0,0 +1,65 @@
...
> +    (C) Copyright 2008
> +    Ricado Ribalda-Universidad Autonoma de Madrid-ricardo.ribalda at uam.es
> +    This work has been supported by: Q-Technology  http://qtec.com/
> +
> +    This program is free software: you can redistribute it and/or modify
> +    it under the terms of the GNU General Public License as published by
> +    the Free Software Foundation, either version 2 of the License, or
> +    (at your option) any later version.
> +
> +    This program is distributed in the hope that it will be useful,
> +    but WITHOUT ANY WARRANTY; without even the implied warranty of
> +    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
> +    GNU General Public License for more details.
> +
> +    You should have received a copy of the GNU General Public License
> +    along with this program.  If not, see <http://www.gnu.org/licenses/>.
> +*/
> +
> +#include <common.h>
> +#include <i2c.h>
> +
> +#define DUMMY_I2C_LEN 256
> +
> +u8 i2c_dummy_buffer[DUMMY_I2C_LEN]= CONFIG_DUMMY_I2C_DATA;

I think it would also be useful in some cases to be able to use this
silulator without initialized content, so maybe you could change this
into

	u8 i2c_dummy_buffer[DUMMY_I2C_LEN]
	#ifdef CONFIG_DUMMY_I2C_DATA
		= CONFIG_DUMMY_I2C_DATA
	#endif
	;

or similar. And please also change the variable names as discussed
above for the driver name.

Thanks in advance.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
But the only way of discovering the limits  of  the  possible  is  to
venture a little way past them into the impossible.
                         - _Profiles of the Future_ (1962; rev. 1973)
                  ``Hazards of Prophecy: The Failure of Imagination''

  parent reply	other threads:[~2008-07-13 13:33 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-07-11 10:26 [U-Boot-Users] [PATCH] New Dummy I2C Driver Ricardo Ribalda Delgado
2008-07-11 10:26 ` Ricardo Ribalda Delgado
2008-07-11 12:45 ` Jerry Van Baren
2008-07-11 13:45   ` Michal Simek
2008-07-13 13:33 ` Wolfgang Denk [this message]
2008-07-14 11:01   ` [U-Boot-Users] [PATCH] [PATCH] I2C EEPROM simulator Ricardo Ribalda Delgado
2008-07-16  1:06     ` [U-Boot-Users] " Ricardo Ribalda Delgado
2008-07-29 14:30       ` [U-Boot-Users] unassigned-patches/9: " u-boot at bugs.denx.de
  -- strict thread matches above, loose matches on Subject: below --
2008-07-11  8:38 [U-Boot-Users] [PATCH] New Dummy I2C Driver Ricardo Ribalda Delgado
2008-07-11  8:40 ` Ricardo Ribalda Delgado
2008-07-11  8:54   ` Stefan Roese
2008-07-11  9:00     ` Michal Simek

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=20080713133354.29027240EE@gemini.denx.de \
    --to=wd@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.