Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp1111146imm; Wed, 8 Aug 2018 10:56:25 -0700 (PDT) X-Google-Smtp-Source: AA+uWPyN/er+LiP74Z6O5EWzyVJUdYdiyha+TMEjuqz+Mtbd4WtpxDD6kqb5uvY2HUmoqXXf1Go5 X-Received: by 2002:a62:5882:: with SMTP id m124-v6mr3876015pfb.249.1533750985352; Wed, 08 Aug 2018 10:56:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1533750985; cv=none; d=google.com; s=arc-20160816; b=pJoCV9Mte/0Si3aUD9CsjMxUYaMZAeyEo6/3+li7Tr80Ag0u+v5pR0nAvY4Sxi/3y0 N6O7MdzKpZ+D7uYJd95bgwtOaalryHu66UBxTaf3vgXeo23nzfdX7eyNu7wa+u1TuvhM cZcz9DCMtLFgJCb3zI6+P/9anSCqjoCCnqBW3abQxBSeFuxXWZkE1uhJrx+1Cqe2nUNK Xq0CgYeyzH2+LaIJiMQ9p1tEqPi278cm+Jp3k98YoQo7VeoQxr63QTwXfKNoEnKFSB64 yWAfS5fMsmJNaaIAd2kBzXtsCNaMIjqe8xir8gNjldzpq+xDWVM2A6uUOUmeI4yYdd40 Y2Gw== 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=M5KPGqBhcrYdLyfiISomvfg2yofXFnJ4H7wQe8OlzM4=; b=X5LrV3FvMucqmYVt8BZFqUTL8czeYT6OKrDS1UZYx6mSm59Tx4xcIHxk0r4j+AIfb5 iY6bK2jhsWFW6zNXnYk869b3hnFiRhYra0J7Cwfk86M6BZYgNY89s7Vv6hg18tiufH1t bh9NzOkTizvdfG+hsUiNi4O8h8+vDs4yqfcSAVvgVR2z2QMd5tDYwXyFbrUQcgvdu5NU 909RevpKCFqUZQug3hfDUQMcDgy3zJCJZJK0PN7k0EPMZXlqhBoWfIeSx2MVQiktvSew RLHdR45aoM7QVT1rVhL8iIgAWgPVTjHCpfUD/FdO0GvYKSRUIHljnl8ta1+NVNrRmZjw ZF+A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=d3mIny6W; 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 u189-v6si4304914pgb.635.2018.08.08.10.56.10; Wed, 08 Aug 2018 10:56:25 -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=d3mIny6W; 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 S1729734AbeHHUQG (ORCPT + 99 others); Wed, 8 Aug 2018 16:16:06 -0400 Received: from mail-ua0-f193.google.com ([209.85.217.193]:38124 "EHLO mail-ua0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727062AbeHHUQG (ORCPT ); Wed, 8 Aug 2018 16:16:06 -0400 Received: by mail-ua0-f193.google.com with SMTP id o11-v6so3350376uak.5; Wed, 08 Aug 2018 10:55:19 -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=M5KPGqBhcrYdLyfiISomvfg2yofXFnJ4H7wQe8OlzM4=; b=d3mIny6WpYeSYwofi8LkJ+LjiIojjfizojwmjIjK2jKfD8+Xux87I1l9Bgt8VVmt/J fjvCFkL7LogIW3qMvWaMWVQXqKGFYka1TDVNpRMCltJ9VPx5wNTRzkuIxHgpVjselNkB 21bqtfBFqT1GXRluBg/gt2/e2ixzBOiH5a7+DKFmyywt4QrrbOmXcDDsUndRIaUm1O6z qd4v2WVQxNWmYRtHJR8cUM2nZf1A4KpC8tYGRqXUgWq1ptFJfUpMqCj94d3pYoBdKwMS qAtX5vh/gVlsUShpyc6bOuTG9puNAVc/ujik+KL84YDDpszaAXXZyVoNQzOFA58deUuX 8osA== 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=M5KPGqBhcrYdLyfiISomvfg2yofXFnJ4H7wQe8OlzM4=; b=un5rCaQ62S8UGebLPf5f52YuEwJOLWCTgC4DRa9B7d1a25FdH5zxEUtcZEWKkV8HzS Zx0LoDvAEIOhWkh8twB8rCxQHcyVp5KODDu668aUYQG1aN3mSyKmML/ZgI+1eblWYDuT zpYvv2la9doogW1uIiFQMAtXooy9AGyZnGcRLaqX3MhL+BQDVWJnEsaiNN1kLthgDz4c W2FKZwWcMwuLjiA2radm6Zl6/0PgnYr8h+zx4Tj1il+1UyitFLHX3zHMqeS9Y25OYACz ljQZA/LvBX20gc8i0Z8F3FgTs2/gEhsqfoKPoVips8Ujmn6xZOE3Ampkt3R2saSt93cD 6pAA== X-Gm-Message-State: AOUpUlGK5MWNGr5xXzjOTUTJRMwqNTSUlIhI3SiTKwyMPoerIs+/WoXT eIJ7kYxwbz0uRiw45LnbVWy2JaHPaLooGUcv+I8= X-Received: by 2002:ab0:6037:: with SMTP id n23-v6mr2713938ual.28.1533750919011; Wed, 08 Aug 2018 10:55:19 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a67:2149:0:0:0:0:0 with HTTP; Wed, 8 Aug 2018 10:55:18 -0700 (PDT) In-Reply-To: <20180808153150.23444-21-brgl@bgdev.pl> References: <20180808153150.23444-1-brgl@bgdev.pl> <20180808153150.23444-21-brgl@bgdev.pl> From: Andy Shevchenko Date: Wed, 8 Aug 2018 20:55:18 +0300 Message-ID: Subject: Re: [PATCH 20/28] ARM: davinci: da830-evm: 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-da830-evm.c | 13 +++++-------- > 1 file changed, 5 insertions(+), 8 deletions(-) > > diff --git a/arch/arm/mach-davinci/board-da830-evm.c b/arch/arm/mach-davinci/board-da830-evm.c > index 4a2fe8142a2f..08a23e777eca 100644 > --- a/arch/arm/mach-davinci/board-da830-evm.c > +++ b/arch/arm/mach-davinci/board-da830-evm.c > @@ -18,7 +18,7 @@ > #include > #include > #include > -#include > +#include > #include > #include > #include > @@ -419,12 +419,9 @@ static struct nvmem_cell_lookup da830_evm_mac_address_cell = { > .nvmem_name = "1-00500", > }; > > -static struct at24_platform_data da830_evm_i2c_eeprom_info = { > - .byte_len = SZ_256K / 8, > - .page_size = 64, > - .flags = AT24_FLAG_ADDR16, > - .setup = davinci_get_mac_addr, > - .context = (void *)0x7f00, > +static const struct property_entry da830_evm_i2c_eeprom_properties[] = { > + PROPERTY_ENTRY_U32("pagesize", 64), > + { } > }; > > static int __init da830_evm_ui_expander_setup(struct i2c_client *client, > @@ -458,7 +455,7 @@ static struct pcf857x_platform_data __initdata da830_evm_ui_expander_info = { > static struct i2c_board_info __initdata da830_evm_i2c_devices[] = { > { > I2C_BOARD_INFO("24c256", 0x50), > - .platform_data = &da830_evm_i2c_eeprom_info, > + .properties = da830_evm_i2c_eeprom_properties, > }, > { > I2C_BOARD_INFO("tlv320aic3x", 0x18), > -- > 2.18.0 > -- With Best Regards, Andy Shevchenko