kernel_optimize_test/drivers/misc/eeprom
Sven Van Asbroeck b680f4fa74 eeprom: at24: convert magic numbers to structs
Fundamental properties such as capacity and page size differ among
at24-type chips. But these chips do not have an id register, so this
can't be discovered at runtime.

Traditionally, at24-type eeprom properties were determined in two ways:
- by passing a 'struct at24_platform_data' via platform_data, or
- by naming the chip type in the devicetree, which passes a 'magic
  number' to probe(), which is then converted to a 'struct
  at24_platform_data'.

Recently a bug was discovered because the magic number rounds down all
chip sizes to the lowest power of two. This was addressed by
a work-around commit 5478e478ee ("eeprom: at24: correctly set the
size for at24mac402"), with the wish that magic numbers should over
time be converted to structs.

This patch replaces the magic numbers with 'struct at24_chip_data'.

Signed-off-by: Sven Van Asbroeck <svendev@arcx.com>
Signed-off-by: Bartosz Golaszewski <brgl@bgdev.pl>
2018-01-01 19:40:49 +01:00
..
at24.c eeprom: at24: convert magic numbers to structs 2018-01-01 19:40:49 +01:00
at25.c at25: fix debug and error messaging 2016-09-27 12:43:35 +02:00
digsy_mtc_eeprom.c
eeprom_93cx6.c eeprom-93cx6: Add (read-only) support for 8-bit mode 2014-11-25 15:42:53 +01:00
eeprom_93xx46.c misc: eeprom_93xx46: Simplify the usage of gpiod API 2017-08-28 16:55:47 +02:00
eeprom.c MISC: add const to bin_attribute structures 2017-08-28 16:55:48 +02:00
idt_89hpesx.c eeprom: idt_89hpesx: Support both ACPI and OF probing 2017-08-31 18:49:41 +02:00
Kconfig eeprom: at24: add basic regmap_i2c support 2018-01-01 19:40:46 +01:00
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
max6875.c MISC: add const to bin_attribute structures 2017-08-28 16:55:48 +02:00