Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp1116676imm; Wed, 8 Aug 2018 11:01:50 -0700 (PDT) X-Google-Smtp-Source: AA+uWPyU1kn0KhM+bsbFz64SD0YyNATuKTtlRNQW7ofa8NNZqHj8nH1XxWBY3Yii7a4XC1fcjNdL X-Received: by 2002:a17:902:9695:: with SMTP id n21-v6mr3546264plp.6.1533751310675; Wed, 08 Aug 2018 11:01:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1533751310; cv=none; d=google.com; s=arc-20160816; b=UjQtrysq5UGSRE1J4dRYxcf3IOfk60sL9WcbUYImY/iixxqo2UpWOM20wzkIfRPEOY p/dNVyL9st8+U0JT5H54tPyULqol+SvdI4np6kfzErD9mJjzIwdeJKmhh+MFP27Ko16S 3mhJJpBey79rLjG6RAbD2sEcoCnRULhsZd3KCVfGc1GG9JLS2OMzV5IXb304jjcnj+wR RGhggt+U9Ni4hb/TVMwqZGnwvIIAYxh7o4HUqMLb6dAjbgMfG8P2hVBBX9dOp20SR18V 4mmy//gBaGWuGyE+ZPsG+gm+CK1IHDt57wmn/u76cXstn6/F3kIQdho4YK79tHzWCL05 Rhvw== 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=QlrxmH2OfZkWCPu/JDILLtLL8fGPu0Km/c9e1TkaC+4=; b=k22i+nyUGZrEbPNt7Um7YgPMTbLDVQ93K+B4whINsFztGqeK3HPIMFSAEl2wBJRD/E G3/4yoP/B65ggMh35+F4gYitUpcedldj/jHhOGtA4djjhbh13veI/gL/a1kmwDNwO+Ap GDwqEnx1W8DwPa14i2qYM1xF1igfQe6xC8fJ2JbgLqteGjBiA1o3D0/OXeEcrbrOd04I hXaMQhkf8Pb1v2ClSfRHmifFfMX65QsiqLWWo59LV7Sc4LxN6W119g7pYmyJd9j2YoKX DXQlhZHAPnHYIyuMpeWZXWm9ZogGgQyys0Q3WkQ8qCs34duJtZ84Iy2DhyfJOwTfn4Pf SSqA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=mSjTQbnc; 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 h11-v6si4296014pgf.558.2018.08.08.11.01.35; Wed, 08 Aug 2018 11:01:50 -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=mSjTQbnc; 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 S1730021AbeHHUUz (ORCPT + 99 others); Wed, 8 Aug 2018 16:20:55 -0400 Received: from mail-ua0-f195.google.com ([209.85.217.195]:36792 "EHLO mail-ua0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727748AbeHHUUz (ORCPT ); Wed, 8 Aug 2018 16:20:55 -0400 Received: by mail-ua0-f195.google.com with SMTP id c12-v6so3375171uan.3; Wed, 08 Aug 2018 11:00:07 -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=QlrxmH2OfZkWCPu/JDILLtLL8fGPu0Km/c9e1TkaC+4=; b=mSjTQbncu/eNETdbyE/bWAPiCGlbRCQXtKcT9D9jZ0u4GhKEXrn/JxJMTt/1AfYkw5 lyWVTV6jV9pLbThsSUuaxQTYICeVsOy/8SCzdKL9vfK9RDC2i74l2YgrxBLRf+YCDddD h+Gc3vfQp21GAyNqivKT2tSCkfzpNq9gq4XrV3GKAzFgr+0bdAPyMiInRB00Tr6KQKlo lCApS6SJEAjyPQGhw+3f0qPVa5Ax7rl0pqWLJw6z4HdSPaVJLlutcgS9Y25kz8yjEtkT rzQ0YxJ1thQ3Yd2gRbpBegT8r+0Cxx3VofNWWRAPMlUux8BRop269RrMnyG9okoh6Z9d cByA== 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=QlrxmH2OfZkWCPu/JDILLtLL8fGPu0Km/c9e1TkaC+4=; b=udRov11fRRLLzTgogVtVhVYC8xDG/gsqqG6dbtpn0A+pFyuNQGrfkeCPeFs1Qe4wPW BQe8QwY4OJxQDg63nl1RXpTegEiOiB6t3eUYzQGjNtGd7NgJLyLcAQY5WTczQCRWFWR5 rKxGbB9aDC+v+I7Er4sAVCL++9R5QCFN18Q++TyS5vw9abFgPRPoTD4RjsG1rAq4G5Cn FuaPvbb9xEwtn/74lUVnIa5Q68M0QC/kqCJm523Xdb4rRUEyd7SK0otRKohKptMkvMwV rltzmbZqdS1PLR9H8RefX8txrlm3p964J4BPMgy82OJneGN4I+1WJ2tu9TX+dCNDLfcr x7YQ== X-Gm-Message-State: AOUpUlGGiFT/EGOzr0Rwe23BdQN3QGhr4aQ6ZO9Atq4a0WnAsmzKKRcO 2QHN9PScXBLTqJ6dXNXN1xG7FTGMbbk3x8FbvPU= X-Received: by 2002:a1f:844e:: with SMTP id g75-v6mr2645386vkd.16.1533751206641; Wed, 08 Aug 2018 11:00:06 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a67:2149:0:0:0:0:0 with HTTP; Wed, 8 Aug 2018 11:00:05 -0700 (PDT) In-Reply-To: References: <20180808153150.23444-1-brgl@bgdev.pl> <20180808153150.23444-25-brgl@bgdev.pl> From: Andy Shevchenko Date: Wed, 8 Aug 2018 21:00:05 +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 8:57 PM, Andy Shevchenko wrote: > 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), >> + { }, No comma needed >> }; >> >> 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 -- With Best Regards, Andy Shevchenko