From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754606AbbJULDm (ORCPT ); Wed, 21 Oct 2015 07:03:42 -0400 Received: from mail-wi0-f179.google.com ([209.85.212.179]:33795 "EHLO mail-wi0-f179.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751301AbbJULDk (ORCPT ); Wed, 21 Oct 2015 07:03:40 -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> Date: Wed, 21 Oct 2015 13:03:36 +0200 In-Reply-To: <1445330607-12470-1-git-send-email-bgolaszewski@baylibre.com> (Bartosz Golaszewski's message of "Tue, 20 Oct 2015 10:43:18 +0200") Message-ID: <87bnbsiiuv.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: > Chips from the at24cs EEPROM series have an additional read-only memory area > containing a factory pre-programmed serial number. In order to access it, a > dummy write must be executed before reading the serial number bytes. > This series adds support for reading the serial number through a sysfs > attribute. > While we're at it: some of the patches contain readability tweaks and code > organization fixes. > Tested with at24cs64 and at24cs02 chips (for both 16 and 8 bit address > pointers). 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)? -- Bye, Peter Korsgaard