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
..
2017-11-02 11:10:55 +01:00
2017-12-23 13:47:22 -08:00
2017-11-14 16:54:12 -08:00
2017-12-18 15:47:12 +01:00
2017-12-04 13:57:03 -08:00
2017-11-29 13:10:25 -08:00
2017-11-27 12:36:45 -08:00
2017-12-31 10:50:05 -08:00
2017-11-15 11:56:19 -08:00
2017-12-20 13:16:33 -07:00
2017-11-04 09:26:51 +09:00
2017-12-04 17:15:20 +00:00
2017-11-14 15:32:19 -08:00
2017-12-11 17:01:59 -08:00
2017-12-26 17:34:03 -08:00
2017-11-23 16:29:05 +01:00
2017-10-22 02:22:39 +01:00
2017-12-18 12:09:39 +01:00
2017-11-16 12:47:46 -08:00
2017-11-16 12:47:46 -08:00
2017-11-29 18:40:42 -08:00
2017-11-13 01:41:39 +01:00
2017-11-02 11:10:55 +01:00
2017-12-15 09:53:04 +05:30
2017-11-17 14:58:01 -08:00
2017-11-15 13:46:33 -08:00
2017-11-02 11:10:55 +01:00
2017-11-13 21:14:07 -08:00
2017-11-13 17:56:58 -08:00
2017-12-10 08:26:59 -08:00
2017-11-02 11:10:55 +01:00
2017-11-16 09:10:59 -08:00
2017-10-04 10:32:42 +02:00
2017-12-29 21:13:04 +01:00
2017-12-28 05:20:07 +10:00
2017-12-30 10:16:51 -08:00
2017-11-15 13:35:43 -08:00
2017-12-18 15:47:12 +01:00
2017-12-26 11:53:24 -08:00
2017-11-17 20:16:20 -08:00
2017-12-04 07:14:30 -05:00
2017-12-12 23:27:04 +01:00
2017-11-19 08:04:41 -10:00
2017-11-13 01:34:14 +01:00
2017-12-02 11:15:14 +00:00
2017-12-28 23:06:01 -08:00
2017-11-21 16:35:54 -08:00
2017-12-29 21:13:04 +01:00
2017-12-29 21:13:04 +01:00
2017-11-21 15:57:09 -08:00
2017-12-27 20:45:07 +01:00
2017-11-21 15:46:44 -08:00
2017-11-13 17:56:58 -08:00
2017-11-15 13:39:18 -08:00
2017-11-02 11:10:55 +01:00
2017-12-15 12:53:37 -08:00
2017-12-08 13:18:47 -08:00
2017-11-16 16:05:01 -08:00
2017-11-21 15:57:07 -08:00
2017-11-15 13:46:33 -08:00
2017-12-28 12:26:35 +01:00
2018-01-01 19:40:49 +01:00
2017-12-11 13:43:27 +01:00
2017-12-18 09:16:35 +01:00
2017-08-29 13:46:35 +02:00
2017-12-28 23:20:21 -08:00
2017-11-21 15:57:09 -08:00
2017-11-21 15:57:07 -08:00
2017-11-13 12:10:24 -08:00
2017-12-21 14:59:27 -08:00
2017-12-15 15:18:07 +01:00
2017-12-23 16:46:23 +01:00
2017-12-13 15:01:47 -05:00
2017-10-14 00:54:41 +02:00
2017-11-02 11:10:55 +01:00
2017-12-17 21:06:25 +01:00
2017-11-16 09:10:59 -08:00
2017-12-31 13:13:56 -08:00
2017-11-17 16:10:04 -08:00
2017-11-15 10:56:56 -08:00
2017-12-15 16:00:41 +05:30
2017-12-29 21:13:04 +01:00
2017-12-11 17:26:03 -08:00
2017-11-02 11:10:55 +01:00
2017-11-15 13:37:15 -08:00
2017-11-21 15:57:07 -08:00
2017-11-16 13:06:27 -08:00
2017-11-22 21:09:18 -10:00
2017-11-17 16:56:17 -08:00
2017-11-13 17:56:58 -08:00
2017-11-16 09:15:57 -08:00
2017-11-17 20:14:10 -08:00
2017-11-16 16:05:01 -08:00
2017-11-17 20:12:08 -08:00
2017-11-25 08:37:16 -10:00
2017-12-20 15:11:49 -05:00
2017-11-17 20:21:44 -08:00
2017-12-30 14:31:30 -08:00
2017-11-14 16:54:12 -08:00
2017-11-30 15:29:44 -08:00
2017-12-19 11:07:00 +00:00
2017-08-28 13:52:22 +02:00
2017-11-02 11:10:55 +01:00
2017-12-19 15:53:39 +01:00
2017-12-18 13:55:43 -07:00
2017-11-29 10:24:57 +01:00
2017-11-17 14:31:27 -08:00
2017-12-16 16:37:51 +01:00
2017-12-21 11:19:22 +01:00
2017-11-02 11:10:55 +01:00
2017-12-27 15:24:27 +01:00
2017-11-21 15:57:07 -08:00
2017-11-14 16:47:47 -08:00
2017-12-02 21:31:03 -05:00
2017-11-20 21:50:24 -10:00
2017-09-22 23:14:18 -04:00
2017-12-14 21:01:40 +02:00
2017-11-16 09:10:59 -08:00
2017-11-16 09:10:59 -08:00
2017-11-21 15:57:07 -08:00
2017-12-22 12:30:10 -08:00
2017-11-02 11:10:55 +01:00
2017-11-13 01:40:52 +01:00
2017-11-28 15:17:49 +01:00