From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752826AbdLDVWB (ORCPT ); Mon, 4 Dec 2017 16:22:01 -0500 Received: from vern.gendns.com ([206.190.152.46]:46053 "EHLO vern.gendns.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752481AbdLDVVy (ORCPT ); Mon, 4 Dec 2017 16:21:54 -0500 Subject: Re: [PATCH] eeprom: at24: Change nvmem stride to 1 To: Bartosz Golaszewski , Srinivas Kandagatla Cc: linux-i2c , linux-kernel@vger.kernel.org References: <1512352481-13613-1-git-send-email-david@lechnology.com> From: David Lechner Message-ID: <2917d26e-ad37-e118-585c-a479792fbac1@lechnology.com> Date: Mon, 4 Dec 2017 15:22:07 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - vern.gendns.com X-AntiAbuse: Original Domain - vger.kernel.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - lechnology.com X-Get-Message-Sender-Via: vern.gendns.com: authenticated_id: davidmain+lechnology.com/only user confirmed/virtual account not confirmed X-Authenticated-Sender: vern.gendns.com: davidmain@lechnology.com X-Source: X-Source-Args: X-Source-Dir: Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 12/04/2017 11:44 AM, Bartosz Golaszewski wrote: > 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. I am just guessing on the usage too, but I assume it is for memory alignment for other types of nvmem devices that only read words (2, 4 or 8 bytes) at a time. I don't see anything in the at24 code that says we can't read any arbitrary starting I2C register, so I don't think we should have any problems. > > @David: what is the chip you're using? Microchip 24FC128 > Is it an at24mac402 by any > chance? Were you affected by the read problem we fixed recently[1][2] > in at24? No and no. > > @Srinivas: any comments on that? > > Thanks, > Bartosz > > [1] http://patchwork.ozlabs.org/patch/841852/ > [2] http://patchwork.ozlabs.org/patch/841876/ >