
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@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