Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752623AbdLLUyz (ORCPT ); Tue, 12 Dec 2017 15:54:55 -0500 Received: from mail-ot0-f193.google.com ([74.125.82.193]:38761 "EHLO mail-ot0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752521AbdLLUyl (ORCPT ); Tue, 12 Dec 2017 15:54:41 -0500 X-Google-Smtp-Source: ACJfBov8/4L8ONIG1w/+ijIqpfgpjKnwvArLGVSJAS6UazVS8H/jRqKn+a1NzNctw3OP6C3Zsl7idA== Date: Tue, 12 Dec 2017 14:54:39 -0600 From: Rob Herring To: Geert Uytterhoeven Cc: Mark Rutland , Arnd Bergmann , Greg Kroah-Hartman , Ivo Sieben , Wolfram Sang , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2] eeprom: at25: Add DT support for EEPROMs with odd address bits Message-ID: <20171212205439.ijhvzmsumiu3l5pp@rob-hp-laptop> References: <1512740801-21142-1-git-send-email-geert+renesas@glider.be> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1512740801-21142-1-git-send-email-geert+renesas@glider.be> User-Agent: NeoMutt/20170609 (1.8.3) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1064 Lines: 25 On Fri, Dec 08, 2017 at 02:46:41PM +0100, Geert Uytterhoeven wrote: > Certain EEPROMS have a size that is larger than the number of address > bytes would allow, and store the MSB of the address in bit 3 of the > instruction byte. > > This can be described in platform data using EE_INSTR_BIT3_IS_ADDR, or > in DT using the obsolete legacy "at25,addr-mode" property. > But currently there exists no non-deprecated way to describe this in DT. > > Hence extend the existing "address-width" DT property to allow > specifying 9 address bits, and enable support for that in the driver. > > This has been tested with a Microchip 25LC040A. > > Signed-off-by: Geert Uytterhoeven > --- > v2: > - Do not consider odd address widths of 17 or 25 bits, > - Move handling inside the switch() statement. > --- > Documentation/devicetree/bindings/eeprom/at25.txt | 4 +++- > drivers/misc/eeprom/at25.c | 3 +++ > 2 files changed, 6 insertions(+), 1 deletion(-) Reviewed-by: Rob Herring