Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp1112764imm; Wed, 8 Aug 2018 10:58:14 -0700 (PDT) X-Google-Smtp-Source: AA+uWPzE3M9joHomBOWqvLgEk5Aqi/09Vj4kM0Fvie3nWyAnSEr4yxATQSheqRgVTv9OVRWgor0U X-Received: by 2002:a17:902:8ecb:: with SMTP id x11-v6mr3552247plo.308.1533751094592; Wed, 08 Aug 2018 10:58:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1533751094; cv=none; d=google.com; s=arc-20160816; b=MdKoJCed9chwBoYVf6dnu2nyzI3cfcbTw08xyVqXEx7yNxmTIjdwOWc44WkV4nSjrI 3LJgd5EdQ2avnTynyJZVb5ZRhPJ3hOujLPVGHDTd56Naiq8D0+q26pCmE9Ah6qTeMk3H U2b+Dfet4sAJK1Tezkmss90/kIDOxB2F2KYigwGgPu+0Q+klZiq5fHu/s8NZ4IUPdWX5 w1TmGVzIbBe2JD/NzhzNR4TX4TerMWuFExvTf3AfUIUD7g4N6kZ5oAcG4pAFauy/s36J AZSR1xgPHhojzwXxBOlbh219mGMmR0tjIrPGC9tZfR6PDLdzSTNrqemZJORCkfpRoTP+ rmCQ== 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=KjckqdiAJEN3CT7mUoRT1yi7ouoDnMc9Nbti6etxTN8=; b=CnV8MUjcZ3XVXTqHtrF7DX0CjS8bLKHiYz2bc2zJAmqpNLprINYvBTKiBLmEPadxKZ bSv7Jkz4dqBWpqt87PCO+wqZyJbuloGvncdEvxLYh/13PkBiCOb4hqxRiIpxWuDMNEqK Ef9BTA5s2Dq1ornCMQFG0w83GkhidvCXcWo9hqmzn6ZH9M4/B3fz/sS/aH/LKIJU6mff 19BkLGK2PJmxRXeC8hrdVCay8XS3hSIBX65gEwCLDG+MTQaeofxWCiIVsIJJdUdc4EQg uQ3kjv3ZtQPUtZ1KpyIC9R8kEyF60l+3rnkxMmnzLy1roDYPlfPx5TWW4qVnd9B6DY15 KNGQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=KVrXdtXx; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j19-v6si4603524pgg.313.2018.08.08.10.58.00; Wed, 08 Aug 2018 10:58:14 -0700 (PDT) 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=@gmail.com header.s=20161025 header.b=KVrXdtXx; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730063AbeHHURu (ORCPT + 99 others); Wed, 8 Aug 2018 16:17:50 -0400 Received: from mail-ua0-f194.google.com ([209.85.217.194]:34602 "EHLO mail-ua0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727748AbeHHURu (ORCPT ); Wed, 8 Aug 2018 16:17:50 -0400 Received: by mail-ua0-f194.google.com with SMTP id r15-v6so3381420uao.1; Wed, 08 Aug 2018 10:57:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=KjckqdiAJEN3CT7mUoRT1yi7ouoDnMc9Nbti6etxTN8=; b=KVrXdtXx3fllq2/Fwsssu551PoM5RYUV4JfFNiXEaP++5yNrR610XVjBSUSXqWQ1/Z eN+4OMv1Cn0VtJOpI3V+EMgHrH6GWoThBAs7GG81sv0UvlNSqvopvwXnsWpfdUTfB0sl iR6cnOOduDCVHK5iPh8ljT/x6nlfQBXx49qIoNwveSBQE/9rh3XW/r2J/jY2HlqvxjX3 nk3mobcewZRT38VXxwkkc01SW4k0uidON8kIbu3cptEvSSSGs8ESgP5hktgr6lrk4Y8X FW+AJOpaZ1Yvdwm0Pol6JrSuvobmnd9zxWj51BuuxMt5OcbZsM5k+SfLdSBI+7Ohpye1 8fCg== 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=KjckqdiAJEN3CT7mUoRT1yi7ouoDnMc9Nbti6etxTN8=; b=RLDjzAisAYeZfIFU3MzWGuzl6wLD+rIZ+BBv/UORjC3urgROUqmXqbOPIyEHdhVyrs l1aQuaRa2DTuUGT7QhVYNcsja97/quQdoWwN9YP2sMmNFCEkH+Y0FSTNHd05sEE8za0e NuJe5oGwQvFcJpbB5YWMxcCiBS9YEmNKCXTuf051O2meA1T5PJeB0PpLOnEI3zZuyMZD 3KIP0sjlQ5a2XZxvVIhvMMP1sP+g72pzKq398bQAc+8wWA1MN4NkyhgGF51ytmIxuVaS Hbrp9Hq3mnySE3+a+3isJdnRqHqRvYY9ryONnj2/QAIvWxbim1ig8b4sZN6d/1Tq+uPf quJA== X-Gm-Message-State: AOUpUlHlzrbjzHh2piVRuFqYsAU1Z90ww1lVRuChHWvEXJVlmdfjbjEM N2VjgosULoVMUSk6xmAIe1R7W5AjJK/MKr7Fyl4= X-Received: by 2002:ab0:1b93:: with SMTP id k19-v6mr2757802uai.122.1533751023062; Wed, 08 Aug 2018 10:57:03 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a67:2149:0:0:0:0:0 with HTTP; Wed, 8 Aug 2018 10:57:02 -0700 (PDT) In-Reply-To: <20180808153150.23444-25-brgl@bgdev.pl> References: <20180808153150.23444-1-brgl@bgdev.pl> <20180808153150.23444-25-brgl@bgdev.pl> From: Andy Shevchenko Date: Wed, 8 Aug 2018 20:57:02 +0300 Message-ID: Subject: Re: [PATCH 24/28] ARM: davinci: sffsdr: use device properties for at24 eeprom To: Bartosz Golaszewski Cc: Jonathan Corbet , Sekhar Nori , Kevin Hilman , Russell King , Arnd Bergmann , Greg Kroah-Hartman , David Woodhouse , Brian Norris , Boris Brezillon , Marek Vasut , Richard Weinberger , Grygorii Strashko , "David S . Miller" , Srinivas Kandagatla , Naren , Mauro Carvalho Chehab , Andrew Morton , Lukas Wunner , Dan Carpenter , Florian Fainelli , Ivan Khoronzhuk , Sven Van Asbroeck , Paolo Abeni , Alban Bedel , Rob Herring , David Lechner , Andrew Lunn , Linux Documentation List , Linux Kernel Mailing List , linux-arm Mailing List , linux-i2c , "open list:MEMORY TECHNOLOGY..." , Linux OMAP Mailing List , netdev , Bartosz Golaszewski 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 On Wed, Aug 8, 2018 at 6:31 PM, Bartosz Golaszewski wrote: > From: Bartosz Golaszewski > > We want to work towards phasing out the at24_platform_data structure. > There are few users and its contents can be represented using generic > device properties. Using device properties only will allow us to > significantly simplify the at24 configuration code. > > Remove the at24_platform_data structure and replace it with an array > of property entries. Drop the byte_len/size property, as the model name > already implies the EEPROM's size. > Reviewed-by: Andy Shevchenko > Signed-off-by: Bartosz Golaszewski > --- > arch/arm/mach-davinci/board-sffsdr.c | 11 +++++------ > 1 file changed, 5 insertions(+), 6 deletions(-) > > diff --git a/arch/arm/mach-davinci/board-sffsdr.c b/arch/arm/mach-davinci/board-sffsdr.c > index f6a4d094cbc3..680e5d7628a8 100644 > --- a/arch/arm/mach-davinci/board-sffsdr.c > +++ b/arch/arm/mach-davinci/board-sffsdr.c > @@ -26,7 +26,7 @@ > #include > #include > #include > -#include > +#include > #include > #include > #include > @@ -92,16 +92,15 @@ static struct platform_device davinci_sffsdr_nandflash_device = { > .resource = davinci_sffsdr_nandflash_resource, > }; > > -static struct at24_platform_data eeprom_info = { > - .byte_len = (64*1024) / 8, > - .page_size = 32, > - .flags = AT24_FLAG_ADDR16, > +static const struct property_entry eeprom_properties[] = { > + PROPERTY_ENTRY_U32("pagesize", 32), > + { }, > }; > > static struct i2c_board_info __initdata i2c_info[] = { > { > I2C_BOARD_INFO("24c64", 0x50), > - .platform_data = &eeprom_info, > + .properties = eeprom_properties, > }, > /* Other I2C devices: > * MSP430, addr 0x23 (not used) > -- > 2.18.0 > -- With Best Regards, Andy Shevchenko