Commit 89015016 authored by Bartosz Golaszewski's avatar Bartosz Golaszewski Committed by Sekhar Nori

ARM: davinci: sffsdr: use device properties for at24 eeprom

We want to work towards phasing out the at24_platform_data structure.
There are few users and its contents can be represented using generic
device properties. Using device properties only will allow us to
significantly simplify the at24 configuration code.

Remove the at24_platform_data structure and replace it with an array
of property entries. Drop the byte_len/size property, as the model name
already implies the EEPROM's size.
Signed-off-by: default avatarBartosz Golaszewski <bgolaszewski@baylibre.com>
Reviewed-by: default avatarAndy Shevchenko <andy.shevchenko@gmail.com>
Signed-off-by: default avatarSekhar Nori <nsekhar@ti.com>
parent 6dce6036
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
#include <linux/init.h> #include <linux/init.h>
#include <linux/platform_device.h> #include <linux/platform_device.h>
#include <linux/i2c.h> #include <linux/i2c.h>
#include <linux/platform_data/at24.h> #include <linux/property.h>
#include <linux/mtd/mtd.h> #include <linux/mtd/mtd.h>
#include <linux/mtd/rawnand.h> #include <linux/mtd/rawnand.h>
#include <linux/mtd/partitions.h> #include <linux/mtd/partitions.h>
...@@ -92,16 +92,15 @@ static struct platform_device davinci_sffsdr_nandflash_device = { ...@@ -92,16 +92,15 @@ static struct platform_device davinci_sffsdr_nandflash_device = {
.resource = davinci_sffsdr_nandflash_resource, .resource = davinci_sffsdr_nandflash_resource,
}; };
static struct at24_platform_data eeprom_info = { static const struct property_entry eeprom_properties[] = {
.byte_len = (64*1024) / 8, PROPERTY_ENTRY_U32("pagesize", 32),
.page_size = 32, { }
.flags = AT24_FLAG_ADDR16,
}; };
static struct i2c_board_info __initdata i2c_info[] = { static struct i2c_board_info __initdata i2c_info[] = {
{ {
I2C_BOARD_INFO("24c64", 0x50), I2C_BOARD_INFO("24c64", 0x50),
.platform_data = &eeprom_info, .properties = eeprom_properties,
}, },
/* Other I2C devices: /* Other I2C devices:
* MSP430, addr 0x23 (not used) * MSP430, addr 0x23 (not used)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment