Received: by 10.223.176.46 with SMTP id f43csp932716wra; Wed, 24 Jan 2018 08:04:26 -0800 (PST) X-Google-Smtp-Source: AH8x227rh+wanwlanMRWViEY6ap81AU2fDvUGl6RS0K/ltvwjk2jmLx+QWb0hoBa1jAEajjkEFE2 X-Received: by 10.98.36.132 with SMTP id k4mr11286628pfk.161.1516809866322; Wed, 24 Jan 2018 08:04:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516809866; cv=none; d=google.com; s=arc-20160816; b=qB+u9SphEJLsxL/QrOH8cydixVvKqbNvJoLGmV4cuhnyAr6sqik4edfbyEJauBSF1w hbfPEZYO/nPEUdhJTb5ovNv5iQq4SDkyj5RxxQ6oBWEdIsvlL8I2VGpNmHOrN60FVCc6 /xrRdi/u2clNlSLxTgeXCErqdm+mMEaoFFMAWxq0WSvBDPn3PsOenFF5S7JfBlHnZLdI 7AkZnCxUg7TEAXPogiaD8ug90VDv7MuwIPphTF/nSRBWaGhOpTGdVn2sDOFDlWoQCbB0 VxDlDhQ/69tTS+/K+ZbNyA5MhHAMLjBumdQ9clMvtGJg6iQmtZo0WaPNPJaMYAzzyj9c wqWA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature :arc-authentication-results; bh=c1/OhLChOkTpKvseN171Ds4isWJqB61XWwHoo+qF4/A=; b=k+d37uNXB3jwxI070p3iG/KtcEizg7UMFyDkARQmEcapd+IwD0BHlsC2MsHR34iJLt QHIBwtHAAzctSazrrG60Zd5HmI7Nd4r9p9dPDQXlc+4KdcgW9bU1OJnctYsu7Nk//6Ze qkUKOgx7c4HRmaVI8k+/IL73ZQK3d8c9/yl1Ur3DXn5NAhGdbbuUIAIrN7arJh7w+Xbo w6vR34dc43D96lziqJEODCSYr7egK3HboMrv5W0fkUx6ACM5en9KZAThkKBKHAltgfbm C2DgDt6lx0CY4X5hGppLVhSV5llIc2qJKqJ8ITchRWA9C0yL/6erl8ZszwzXE5Xe1cac y1tw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bgdev-pl.20150623.gappssmtp.com header.s=20150623 header.b=BycZRN/e; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b92-v6si400107plb.51.2018.01.24.08.04.04; Wed, 24 Jan 2018 08:04:26 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@bgdev-pl.20150623.gappssmtp.com header.s=20150623 header.b=BycZRN/e; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934259AbeAXQCI (ORCPT + 99 others); Wed, 24 Jan 2018 11:02:08 -0500 Received: from mail-oi0-f51.google.com ([209.85.218.51]:44733 "EHLO mail-oi0-f51.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934241AbeAXQCH (ORCPT ); Wed, 24 Jan 2018 11:02:07 -0500 Received: by mail-oi0-f51.google.com with SMTP id s11so3149816oih.11 for ; Wed, 24 Jan 2018 08:02:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bgdev-pl.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=c1/OhLChOkTpKvseN171Ds4isWJqB61XWwHoo+qF4/A=; b=BycZRN/efmvPUG3ncUs/8xHn6ZNStkqEx8N5gPxOxnyD+o3uzdIq+xSQLNRYOygXKh uvwYm+veAnHq/wf1aXcttFFepsUTX9p3qgcT4lvQWnqw3HBGAFmfWlQiIdpqvGNQ7nlX BvFcY7oBfjitZCepYfFpv9Vtyz5Z5pVQ4nkq5b6A1TV+FHzbnGCB6FhDTZQHbjFuDsKx wGC0G8xusNxFDd0G78hJIWfdPd9/gPMA/xN+zJaqbYr0yeIgW8MSiLB5zJymebHZpm0l 710ZfkcpaZEaLojb7sOyfca59ZfQv8txAFwGVkwfI61We10wHfBaRBaPouKM4MPmOKz0 vWYw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=c1/OhLChOkTpKvseN171Ds4isWJqB61XWwHoo+qF4/A=; b=KLYNHs3xTCieq3k7AjPoyxuCEJf2C28KZE8uLlimMxcQDxN/anuu6zWK4nUaB66n7P z13YzW75mF4R9c3xufFSOYxe6nZfTBXZqfnnepW4dEk6/IHzTeP4C55Tk5wqsUX82YCt y004BIken07o3z0RMVQRWNL4srXdevWP5R6zy21sN9M3krYnVjKvW0V6tAPXYqbq8mpD FTsRdJMnsLfsHFeUFDrdsCro3nyH3BcAkGrNfpUVnkl3oxmyjUqFmCXH7cFAogIAKxQ0 MldUEE5K6KmEHfNvJ2e79LwN6o755h/QCMn+E4WcHHn1RuFdIlPqE8CB4wd2hy+0ljHW IOqg== X-Gm-Message-State: AKwxytdAQ2jxqDsgYj/n1Fy191B1PFW4ERndS4wntQlgYjjNbTJOvLgE zSPsKJrJOPWPXP+Cx4BkgP3p5tidnCfK4OOYLPj022UZ X-Received: by 10.202.218.69 with SMTP id r66mr8433286oig.355.1516809726612; Wed, 24 Jan 2018 08:02:06 -0800 (PST) MIME-Version: 1.0 Received: by 10.157.24.23 with HTTP; Wed, 24 Jan 2018 08:02:06 -0800 (PST) In-Reply-To: <017877bf-5848-53c4-1f72-d630b3acaed4@ltec.ch> References: <017877bf-5848-53c4-1f72-d630b3acaed4@ltec.ch> From: Bartosz Golaszewski Date: Wed, 24 Jan 2018 17:02:06 +0100 Message-ID: Subject: Re: nvmem: add driver for Microchip 24AA025E48 I2C eeprom / nodeID chip To: Felix Brack Cc: Andy Shevchenko , Srinivas Kandagatla , Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 2018-01-24 16:18 GMT+01:00 Felix Brack : > > On 24.01.2018 16:08, Andy Shevchenko wrote: >> On Wed, Jan 24, 2018 at 4:23 PM, Felix Brack wrote: >>> Hello, >>> >>> About three years ago I wrote a driver for Microchip's 24AA025E48 I2C >>> eeprom/nodeID chip. At that time I placed the source files in >>> drivers/misc/eeprom. I never posted the code. >>> I now plan to rewrite the driver from scratch. Is it correct to place >>> the source code in drivers/nvmem and is there a special mailing list to >>> which the patch should be posted when ready? >>> >>> many thanks and kind regards, Felix >> >> Does the existing driver [1] work for you (if you add ID there)? >> >> [1]: at24 >> > Yes it does. Actually the driver I wrote 3 years ago is based on the > at24 driver. Lot's of code in my driver originates directly from the > at24 driver. > > -- > regards Felix Just from looking at the doc - it seems that it's a variant of 24mac402. You should be able to access the memory block by instantiating an 'atmel,24c02' device. As for the EUI-48 block - current at24 driver will not work as the MAC is located at a different offset in this chip. We need to figure out a portable way to specify the addresses of such special blocks (same with the serial number) in the at24 driver. Anyways - don't write your own driver for that, just make sure at24 works. Thanks, Bartosz