mirror of
https://github.com/torvalds/linux.git
synced 2024-12-12 14:12:51 +00:00
ARM: davinci: mityomapl138: 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: Bartosz Golaszewski <bgolaszewski@baylibre.com> Signed-off-by: Sekhar Nori <nsekhar@ti.com>
This commit is contained in:
parent
2f983f8c94
commit
e430685f49
@ -14,13 +14,13 @@
|
||||
#include <linux/init.h>
|
||||
#include <linux/console.h>
|
||||
#include <linux/platform_device.h>
|
||||
#include <linux/property.h>
|
||||
#include <linux/mtd/partitions.h>
|
||||
#include <linux/notifier.h>
|
||||
#include <linux/nvmem-consumer.h>
|
||||
#include <linux/nvmem-provider.h>
|
||||
#include <linux/regulator/machine.h>
|
||||
#include <linux/i2c.h>
|
||||
#include <linux/platform_data/at24.h>
|
||||
#include <linux/etherdevice.h>
|
||||
#include <linux/spi/spi.h>
|
||||
#include <linux/spi/flash.h>
|
||||
@ -192,10 +192,10 @@ static struct nvmem_cell_lookup mityomapl138_nvmem_cell_lookup = {
|
||||
.con_id = "mac-address",
|
||||
};
|
||||
|
||||
static struct at24_platform_data mityomapl138_fd_chip = {
|
||||
.byte_len = 256,
|
||||
.page_size = 8,
|
||||
.flags = AT24_FLAG_READONLY | AT24_FLAG_IRUGO,
|
||||
static const struct property_entry mityomapl138_fd_chip_properties[] = {
|
||||
PROPERTY_ENTRY_U32("pagesize", 8),
|
||||
PROPERTY_ENTRY_BOOL("read-only"),
|
||||
{ }
|
||||
};
|
||||
|
||||
static struct davinci_i2c_platform_data mityomap_i2c_0_pdata = {
|
||||
@ -324,7 +324,7 @@ static struct i2c_board_info __initdata mityomap_tps65023_info[] = {
|
||||
},
|
||||
{
|
||||
I2C_BOARD_INFO("24c02", 0x50),
|
||||
.platform_data = &mityomapl138_fd_chip,
|
||||
.properties = mityomapl138_fd_chip_properties,
|
||||
},
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user