From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754727AbdLFJoJ (ORCPT ); Wed, 6 Dec 2017 04:44:09 -0500 Received: from mail-wr0-f175.google.com ([209.85.128.175]:37123 "EHLO mail-wr0-f175.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754612AbdLFJoE (ORCPT ); Wed, 6 Dec 2017 04:44:04 -0500 X-Google-Smtp-Source: AGs4zMbqUckb1Cdfwyvyd33VVbcoRaUarkVhyCqB5XdonEgm7lqgeGPhjq+uUf3sDVBqG51RtBKFQQ== Subject: Re: [PATCH] eeprom: at24: Change nvmem stride to 1 To: Bartosz Golaszewski , David Lechner Cc: linux-i2c , linux-kernel@vger.kernel.org References: <1512352481-13613-1-git-send-email-david@lechnology.com> From: Srinivas Kandagatla Message-ID: <7ecd75fb-bd2c-53ae-a74a-2f13a6de5ec3@linaro.org> Date: Wed, 6 Dec 2017 09:44:01 +0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 04/12/17 17:44, Bartosz Golaszewski wrote: >> at24->nvmem_config.priv = at24; >> - at24->nvmem_config.stride = 4; >> + at24->nvmem_config.stride = 1; >> at24->nvmem_config.word_size = 1; >> at24->nvmem_config.size = chip.byte_len; >> >> -- >> 2.7.4 >> > I can't find any documentation on what the stride config option does > in nvmem, but looking at the code it's only used for alignment checks > in nvmem core, so this patch should be ok. Still: I'm wondering if it > shouldn't depend on the size of the eeprom or if we shouldn't make the > chip you're using a special case. > > @David: what is the chip you're using? Is it an at24mac402 by any > chance? Were you affected by the read problem we fixed recently[1][2] > in at24? > > @Srinivas: any comments on that? Stride is there to enforce address alignment. As long as there is no issue on addresses aligned to 1 byte on at24 I do not see any issue with the patch. Thanks, srini