From patchwork Mon Oct 22 08:38:35 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adrian Bunk X-Patchwork-Id: 987538 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=vger.kernel.org (client-ip=209.132.180.67; helo=vger.kernel.org; envelope-from=linux-i2c-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 42dqsD4rsCz9sDB for ; Mon, 22 Oct 2018 19:47:28 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727584AbeJVRFB (ORCPT ); Mon, 22 Oct 2018 13:05:01 -0400 Received: from mail.stusta.mhn.de ([141.84.69.5]:46734 "EHLO mail.stusta.mhn.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727388AbeJVRFB (ORCPT ); Mon, 22 Oct 2018 13:05:01 -0400 X-Greylist: delayed 528 seconds by postgrey-1.27 at vger.kernel.org; Mon, 22 Oct 2018 13:05:00 EDT Received: from [127.0.0.1] (localhost [127.0.0.1]) by mail.stusta.mhn.de (Postfix) with ESMTPSA id 42dqg03zZJz5k; Mon, 22 Oct 2018 10:38:36 +0200 (CEST) Date: Mon, 22 Oct 2018 11:38:35 +0300 From: Adrian Bunk To: stable@vger.kernel.org Cc: Alan Chiang , Andy Yeh , Bartosz Golaszewski , linux-i2c@vger.kernel.org Subject: 4.14/4.18: Please add "eeprom: at24: Add support for address-width property" Message-ID: <20181022083835.GA5315@localhost> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-i2c-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-i2c@vger.kernel.org Please cherry-pick the following commit to 4.14 and 4.18: commit a2b3bf4846e5eed62ea6abb096af2c950961033c Author: Alan Chiang Date: Wed Jul 25 11:20:22 2018 +0800 eeprom: at24: Add support for address-width property Provide a flexible way to determine the addressing bits of eeprom. Pass the addressing bits to driver through address-width property. Signed-off-by: Alan Chiang Signed-off-by: Andy Yeh Signed-off-by: Bartosz Golaszewski Confirmed to work on 4.14 with the Identification Page of an ST M24M02-DR (256 bytes but 16 bit addressing). Cannot be cherry-picked trivially on 4.9. The corresponding documentation commit 21d04054501fb27b56e995b54ac74e39aee79a46 can be cherry-picked to 4.18, the backport for 4.14 is below. Thanks Adrian From 2562e333f39b8077ffb06bdf79430f10b74c11f5 Mon Sep 17 00:00:00 2001 From: Alan Chiang Date: Wed, 25 Jul 2018 11:20:21 +0800 Subject: [PATCH] dt-bindings: at24: Add address-width property Currently the only way to use a variant of a supported model with a different address width is to define a new compatible string and the corresponding chip data structure. Provide a flexible way to specify the size of the address pointer by defining a new property: address-width. Signed-off-by: Alan Chiang Signed-off-by: Andy Yeh Acked-by: Sakari Ailus Reviewed-by: Rob Herring [Bartosz: fixed the commit message] Signed-off-by: Bartosz Golaszewski [Adrian Bunk: backported to 4.14] Signed-off-by: Adrian Bunk --- Documentation/devicetree/bindings/eeprom/eeprom.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Documentation/devicetree/bindings/eeprom/eeprom.txt b/Documentation/devicetree/bindings/eeprom/eeprom.txt index afc04589eadf..44bfffc43bed 100644 --- a/Documentation/devicetree/bindings/eeprom/eeprom.txt +++ b/Documentation/devicetree/bindings/eeprom/eeprom.txt @@ -36,6 +36,8 @@ Optional properties: - read-only: this parameterless property disables writes to the eeprom + - address-width: number of address bits (one of 8, 16). + Example: eeprom@52 {