Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp1110629imm; Wed, 8 Aug 2018 10:55:47 -0700 (PDT) X-Google-Smtp-Source: AA+uWPwC+4CQEFQI3fyiMAeDaFX+A4fr0Sew8uqiS6rVGSkvxGHpmc+Bll7pr92ROpoGqitY1tsq X-Received: by 2002:a17:902:758b:: with SMTP id j11-v6mr3465399pll.29.1533750947141; Wed, 08 Aug 2018 10:55:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1533750947; cv=none; d=google.com; s=arc-20160816; b=eIaKkX9cjLYz7w1PcWOZvxBwaP+0xRn//2szK4zWjbKzUAU2oenSUXfw89LGdK3mdB KvSFlLOPfNDBCCqa2d5TzKsgtRRocttatPyh7KZFlrut+DCcxxA4UOEOejavr3tErJYE uYDpXMzBsS7EGdApfsip6pds7OP4MBknGlWOeJ2TXlLF9LYn2MdlA0wMhzl8MB0A+CGJ Srs3RvSx45W3thOUXP3gpwZdFvpi6w+kdfKQRJXXQrVaWk+F2EsMV6E2507B9xPh+0D2 /Lo9KHx7DdHvFNeE++Jkls2UxgWecdagL1JXD7+CpKxVwlsHzg3oPP8/zGxBUu/A0kfy rHYQ== 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=ptp2ZlwnEQ4oEXo2mWMG62LeI19gX7u/NAHavfAv9iA=; b=m/8LAXWXCoe6sHIZ1kuXVgcBErRtxxFBDyvPe3MhSF63fqZmjErLUYr0um1Xl7MXVK P7/izvuPlin9XOQOyel9l2b7F6rTBqXp59jPsvBWMvHtBRzjjkhQvO5vQLYMUi6GQbu1 mbDepwX/fRWjtTX0LkDv2SD1CfdjkaanGcxU9wnSUtifmXTL+chh46PzovJg9FM80e/W e7md1NSUSWDV1+GOYdIXBHUmd4NzvR2cgbXetQ5fwGckHQGvKV9skqQGmuS9HNwHjQJ2 hpC7meXEF57qmt8rQKYtXnVT1DFdad4KTzEYjvdSj5ulvTnhWTpv0yppO7PyuYAdK2rU 9oAw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=MpTA+nnh; 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 u15-v6si5062014pfa.28.2018.08.08.10.55.32; Wed, 08 Aug 2018 10:55:47 -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=MpTA+nnh; 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 S1729704AbeHHUOz (ORCPT + 99 others); Wed, 8 Aug 2018 16:14:55 -0400 Received: from mail-ua0-f193.google.com ([209.85.217.193]:37541 "EHLO mail-ua0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727062AbeHHUOz (ORCPT ); Wed, 8 Aug 2018 16:14:55 -0400 Received: by mail-ua0-f193.google.com with SMTP id y10-v6so3343550uao.4; Wed, 08 Aug 2018 10:54:08 -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=ptp2ZlwnEQ4oEXo2mWMG62LeI19gX7u/NAHavfAv9iA=; b=MpTA+nnhg+t85j0107IQWi1A0FMMIXAnKIkk1XITbxFcU+2KQLce4d8YzQjrS7LQ++ sf0gYR0NMediqn8CJqE8KywL0gQ3t9eaI82v3uQwsUCZb2WHEFgvB1O1hg+GR9egP7jO S3aZ+Ek5+Qp1u9dMxg2Ik5TEdsxAvWg1PhOYK5j2z/PglwgYsDF1htG9HyzEsor7tt1d TGmo3hzhpXi1g/rVP2bIxzWVi6SpVVunM9ZQVkd7XWTdfGURJTeI34AEke+zffTg1MKo hrX6/TZvpK/H/6ltXkfboLoxoJW4RTFRltlZz+y5U34tddGu7omQEisYTXzhJnh0EY33 nLkw== 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=ptp2ZlwnEQ4oEXo2mWMG62LeI19gX7u/NAHavfAv9iA=; b=S0VWQlusUCnR7sa54UARvC3oX7l7+5AkXzRo/s3GbHGS9SxSOdbTyxefrFLU5vlYMl p8qzyu6mSmJbkY6ka0iiKq8KlVAuAnASk5aTVJhIAFclkRppTgp2/Fpa1gh9x3v39sc9 HFmGkCQAQ7Av1kp9NI3LwVKCGK03zVXjQ9XgOiAAkp9a9hxjktOs2/x2Q+GW8eCLumSb ++sIA8+C3VbUmV9SXJbBrNUNcD348js9q7Dyn5aLkLy4sAL84L9KwvQ8fUaSkQye9dPP qbpgmF0nYr4pHoDzIRwIQd7It88blxfNZCyjE93EmtlEbHQMyFJhog6H0tJHDJ7lcVwE Lnqw== X-Gm-Message-State: AOUpUlGsMinxvYQJ50WxnM2HGXWyT9MejPnZMDF3UpwbP3YTtm9+J2CX wDgtq/4G6v5AjwdbXlCr/BB82b0mByk8ojAkuAk= X-Received: by 2002:a1f:25c8:: with SMTP id l191-v6mr2612054vkl.66.1533750848390; Wed, 08 Aug 2018 10:54:08 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a67:2149:0:0:0:0:0 with HTTP; Wed, 8 Aug 2018 10:54:07 -0700 (PDT) In-Reply-To: <20180808153150.23444-20-brgl@bgdev.pl> References: <20180808153150.23444-1-brgl@bgdev.pl> <20180808153150.23444-20-brgl@bgdev.pl> From: Andy Shevchenko Date: Wed, 8 Aug 2018 20:54:07 +0300 Message-ID: Subject: Re: [PATCH 19/28] ARM: davinci: dm365-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. > Yes, that exactly how device properties should be used instead of legacy platform data! Reviewed-by: Andy Shevchenko > Signed-off-by: Bartosz Golaszewski > --- > arch/arm/mach-davinci/board-dm365-evm.c | 13 +++++-------- > 1 file changed, 5 insertions(+), 8 deletions(-) > > diff --git a/arch/arm/mach-davinci/board-dm365-evm.c b/arch/arm/mach-davinci/board-dm365-evm.c > index cb0ac92a278e..b360d26e6caa 100644 > --- a/arch/arm/mach-davinci/board-dm365-evm.c > +++ b/arch/arm/mach-davinci/board-dm365-evm.c > @@ -18,7 +18,7 @@ > #include > #include > #include > -#include > +#include > #include > #include > #include > @@ -179,18 +179,15 @@ static struct nvmem_cell_lookup dm365evm_mac_address_cell = { > .nvmem_name = "1-00500", > }; > > -static struct at24_platform_data eeprom_info = { > - .byte_len = (256*1024) / 8, > - .page_size = 64, > - .flags = AT24_FLAG_ADDR16, > - .setup = davinci_get_mac_addr, > - .context = (void *)0x7f00, > +static const struct property_entry eeprom_properties[] = { > + PROPERTY_ENTRY_U32("pagesize", 64), > + { } > }; > > static struct i2c_board_info i2c_info[] = { > { > I2C_BOARD_INFO("24c256", 0x50), > - .platform_data = &eeprom_info, > + .properties = eeprom_properties, > }, > { > I2C_BOARD_INFO("tlv320aic3x", 0x18), > -- > 2.18.0 > -- With Best Regards, Andy Shevchenko