From 1555e0309fc7be83b85c25eee8f9f58062179c36 Mon Sep 17 00:00:00 2001 From: Emmanuel Gil Peyrot Date: Sat, 24 Apr 2021 13:52:42 +0200 Subject: [PATCH 0/4] eeprom-93xx46: Add support for Atmel AT93C56 and AT93C66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit These two devices differ from the AT93C46 by their storage size, respectively 2 Kib and 4 Kib, while the AT93C46 contains 1 Kib. This also means the address size is longer by respectively one or two bits on these devices, so instead of hardcoding that addrlen == 7 means 8-bit words and anything else means 16-bit words, we now always match on the word size. It might make sense to rename this driver now that it supports all three sizes, but I don’t know what would be a good name, eeprom_93xxx6 doesn’t sound very nice. I have tested this series on a Nintendo Wii U, on the downstream linux-wiiu kernel based on 4.19, and thus only with a AT93C66. Emmanuel Gil Peyrot (4): misc: eeprom_93xx46: Add new 93c56 and 93c66 compatible strings misc: eeprom_93xx46: set size and addrlen according to the dts misc: eeprom_93xx46: Compute bits based on addrlen misc: eeprom_93xx46: Switch based on word size, not addrlen .../bindings/misc/eeprom-93xx46.txt | 3 + drivers/misc/eeprom/eeprom_93xx46.c | 85 ++++++++++++++----- include/linux/eeprom_93xx46.h | 3 + 3 files changed, 68 insertions(+), 23 deletions(-) -- 2.31.1