From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754131AbbJUOX1 (ORCPT ); Wed, 21 Oct 2015 10:23:27 -0400 Received: from mail-wi0-f174.google.com ([209.85.212.174]:36393 "EHLO mail-wi0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752055AbbJUOXZ (ORCPT ); Wed, 21 Oct 2015 10:23:25 -0400 From: Peter Korsgaard To: Bartosz Golaszewski Cc: Wolfram Sang , linux-i2c , LKML Subject: Re: [RESEND PATCH 0/9] eeprom: at24: at24cs series serial number read References: <1445330607-12470-1-git-send-email-bgolaszewski@baylibre.com> <87bnbsiiuv.fsf@dell.be.48ers.dk> Date: Wed, 21 Oct 2015 16:23:19 +0200 In-Reply-To: (Bartosz Golaszewski's message of "Wed, 21 Oct 2015 16:15:49 +0200") Message-ID: <87oafsti5k.fsf@dell.be.48ers.dk> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org >>>>> "Bartosz" == Bartosz Golaszewski writes: >> As the serial number is available on a separate i2c address, wouldn't >> it be simpler to handle these as special (read only) device variants and >> instantiate E.G. a 24c64 (for the normal data) and a 24cs64 (for the >> serial)? >> > Hi Peter, > I wanted to respond that this way we would not be protected from > concurrent accesses, but then I saw I didn't actually include any > locks in the serial read function - my bad. It needs to be fixed as > both memory blocks share the same address pointer. > I'll resend the series. But we're protected by the i2c bus lock, right? You do a single i2c_transfer to read the serial number. -- Venlig hilsen, Peter Korsgaard