History

eeprom: at24: remove at24_platform_data

There are no more users of at24_platform_data. Remove the relevant header and modify the driver code to not use it anymore.

Bartosz Golaszewski committed 8 years ago

Commit 4fa882c1 parent 90733533 files · +75 −148Browse files

Showing the changes to include/linux (1 of 3 files). Show all

Unified · Split

include/linux/platform_data/at24.h+0−60
@@ -1,60 +0,0 @@
1−/*
2− * at24.h - platform_data for the at24 (generic eeprom) driver
3− * (C) Copyright 2008 by Pengutronix
4− * (C) Copyright 2012 by Wolfram Sang
5− * same license as the driver
6− */
7−
8−#ifndef _LINUX_AT24_H
9−#define _LINUX_AT24_H
10−
11−#include <linux/types.h>
12−#include <linux/nvmem-consumer.h>
13−#include <linux/bitops.h>
14−
15−/**
16− * struct at24_platform_data - data to set up at24 (generic eeprom) driver
17− * @byte_len: size of eeprom in byte
18− * @page_size: number of byte which can be written in one go
19− * @flags: tunable options, check AT24_FLAG_* defines
20− * @setup: an optional callback invoked after eeprom is probed; enables kernel
21− code to access eeprom via nvmem, see example
22− * @context: optional parameter passed to setup()
23− *
24− * If you set up a custom eeprom type, please double-check the parameters.
25− * Especially page_size needs extra care, as you risk data loss if your value
26− * is bigger than what the chip actually supports!
27− *
28− * An example in pseudo code for a setup() callback:
29− *
30− * void get_mac_addr(struct nvmem_device *nvmem, void *context)
31− * {
32− * u8 *mac_addr = ethernet_pdata->mac_addr;
33− * off_t offset = context;
34− *
35− * // Read MAC addr from EEPROM
36− * if (nvmem_device_read(nvmem, offset, ETH_ALEN, mac_addr) == ETH_ALEN)
37− * pr_info("Read MAC addr from EEPROM: %pM\n", mac_addr);
38− * }
39− *
40− * This function pointer and context can now be set up in at24_platform_data.
41− */
42−
43−struct at24_platform_data {
44− u32 byte_len; /* size (sum of all addr) */
45− u16 page_size; /* for writes */
46− u8 flags;
47−#define AT24_FLAG_ADDR16 BIT(7) /* address pointer is 16 bit */
48−#define AT24_FLAG_READONLY BIT(6) /* sysfs-entry will be read-only */
49−#define AT24_FLAG_IRUGO BIT(5) /* sysfs-entry will be world-readable */
50−#define AT24_FLAG_TAKE8ADDR BIT(4) /* take always 8 addresses (24c00) */
51−#define AT24_FLAG_SERIAL BIT(3) /* factory-programmed serial number */
52−#define AT24_FLAG_MAC BIT(2) /* factory-programmed mac address */
53−#define AT24_FLAG_NO_RDROL BIT(1) /* does not auto-rollover reads to */
54− /* the next slave address */
55−
56− void (*setup)(struct nvmem_device *nvmem, void *context);
57− void *context;
58−};
59−
60−#endif /* _LINUX_AT24_H */

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t