Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp1112224imm; Wed, 8 Aug 2018 10:57:39 -0700 (PDT) X-Google-Smtp-Source: AA+uWPz1gmYyTQY5vO1049Hrkavaa9xb3OFujqhv5z2/S3A/g+mFI68q/pW3QRgbTcCpP7iAcYpt X-Received: by 2002:a63:2b89:: with SMTP id r131-v6mr3431208pgr.39.1533751059779; Wed, 08 Aug 2018 10:57:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1533751059; cv=none; d=google.com; s=arc-20160816; b=i5POVymFFFFQtz7MDKc4U3ln54CXnHGNpGhyNgkD9iX7De7nnfX2uo69dLmIJUVB9g azN1TbiDsPydpOuTmkUW9npMR5N6bJArAzc3zpP0Wi845fuZXo39i4Jx6n1/plxd7frQ JXyWPKrCvZjXQq4ZFoFQINYF3MUiwfS32sHsqz0HrlUJ63GyXBQPsJzvUUhwjx6bbiag j9Liao1UgJMXXxO5+MeQVx9s3ZjTsaGu3XWU6io9XeiTY1oLiBcektxMz79zgqHhZUcg tg4omnnF2etqwLYnLYNqH88RwxLynOuCFreK6zvx21uqzO6DAILfWLgUf7u+dRItybfx gkOw== 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=kdW4plKMIQQhNaI7LPKzOKebFz8NFpVhTmmHSHDBbUM=; b=V79amviTumxpIJJSNoCzdAsjKD5M46RW0U4i/30pxUY6Nu/gytl0fbp/Q7+ROIJ/pB 4B8ap6MavnMR+yBevj++KW1E9fhxinQ8SKCx6g8xalT4GPqG+kwM/MjuacyqQ2yK7lA+ JXLFrmFM//wdLRL6B/UrT1agqfvDkSWjdJ7eXNsevZ+hZvRa4Ns9UkII/QvIwUkyr5b+ Vo3zOCMGd25+I5ABozo9WcmS3nlzDFUmncP2nPWkdKqF2xeYSpSX7GqB97IsWP60vyEi s3r8OLAv5LHvijb1PM5WRSaPawNM3PyXFFzAg7/HZ73E3Bp+y0VBZ0ww2SD4adFJ3Hmu erJw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=RPiM4VA9; 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 k7-v6si4955984pfb.309.2018.08.08.10.57.25; Wed, 08 Aug 2018 10:57:39 -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=RPiM4VA9; 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 S1730019AbeHHUQ7 (ORCPT + 99 others); Wed, 8 Aug 2018 16:16:59 -0400 Received: from mail-ua0-f195.google.com ([209.85.217.195]:38205 "EHLO mail-ua0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727748AbeHHUQ7 (ORCPT ); Wed, 8 Aug 2018 16:16:59 -0400 Received: by mail-ua0-f195.google.com with SMTP id o11-v6so3353310uak.5; Wed, 08 Aug 2018 10:56:12 -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=kdW4plKMIQQhNaI7LPKzOKebFz8NFpVhTmmHSHDBbUM=; b=RPiM4VA9GhCPgoRSRE8H6j4Tfdeg9PyXaWMNfkh03JgatV4ewPIs6MjCqe1YycP0dw S2UGdXspuHrdnxwjGAvktb6lT8TFHg20+oSYAH0/kbCh9wWuUXutfHMamph5WGYl6o3i aQjCUj9Yt8Vl/MPa3wB8QI/RPbh1wXmYuPpiBCKuqGG0Cq6S2EUqlePaAdEOZSwxdqpq vwiY7X4/gNwzRU5+XDMNSGGJAA2B5s/uW6+7sxAnxnY65JcoyLFdZlXq5wmudS74oxlw Qqfoi6NNnb3N7F+PamImZ7IuLASzq17boUGjLz1KfVCcNACqT8xHlnuJlGu4W13TLUBE Mv7A== 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=kdW4plKMIQQhNaI7LPKzOKebFz8NFpVhTmmHSHDBbUM=; b=uZyHj60wR00JwYnkJk8MAIdTuV57Usdr0poRa6TSPbnkUkKI8N/0B567D1PXlMl445 lshUVyqo07Q37apMDPJje95ZSFFb6fXEd0Y/BAuOzGWN3Nzo0vphZYa5HfXAJAesq+XU 0CMniPP81AzRg80wvpUqBndvpIUZWuNbnrInYUEvyclQDoZDF7j0l17vx8cy9g6w+1gw sp3JVWFJijBK7bMOWcEZthbEgvLeLSjIMZistsvmxJqz5pqeLbDhWAYC/1ThdT2aD98+ bIuL8fQqUSKe5BfXmaPCwvvdJgTR0qADTa5fsMuBRHMOOjzcI/5SxwG5ARuvfKw4erfQ 0wVA== X-Gm-Message-State: AOUpUlFEf5fF/JtEeAdMuzBTIIada2qzmAEv4DKT5CaSZHLF3F3N8RTP gPe9ds3JvtHWEKqvuUZnXLJwc91aXxi+w3fyx9o= X-Received: by 2002:a1f:4c7:: with SMTP id 190-v6mr2498318vke.63.1533750971890; Wed, 08 Aug 2018 10:56:11 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a67:2149:0:0:0:0:0 with HTTP; Wed, 8 Aug 2018 10:56:11 -0700 (PDT) In-Reply-To: <20180808153150.23444-23-brgl@bgdev.pl> References: <20180808153150.23444-1-brgl@bgdev.pl> <20180808153150.23444-23-brgl@bgdev.pl> From: Andy Shevchenko Date: Wed, 8 Aug 2018 20:56:11 +0300 Message-ID: Subject: Re: [PATCH 22/28] ARM: davinci: dm646x-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-dm646x-evm.c | 13 +++++-------- > 1 file changed, 5 insertions(+), 8 deletions(-) > > diff --git a/arch/arm/mach-davinci/board-dm646x-evm.c b/arch/arm/mach-davinci/board-dm646x-evm.c > index 5a9de47bc8a2..5049f0c6cd1a 100644 > --- a/arch/arm/mach-davinci/board-dm646x-evm.c > +++ b/arch/arm/mach-davinci/board-dm646x-evm.c > @@ -22,7 +22,7 @@ > #include > #include > #include > -#include > +#include > #include > > #include > @@ -320,12 +320,9 @@ static struct nvmem_cell_lookup dm646x_evm_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), > + { } > }; > #endif > > @@ -396,7 +393,7 @@ static void evm_init_cpld(void) > static struct i2c_board_info __initdata i2c_info[] = { > { > I2C_BOARD_INFO("24c256", 0x50), > - .platform_data = &eeprom_info, > + .properties = eeprom_properties, > }, > { > I2C_BOARD_INFO("pcf8574a", 0x38), > -- > 2.18.0 > -- With Best Regards, Andy Shevchenko