Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp2963462imm; Fri, 10 Aug 2018 01:07:40 -0700 (PDT) X-Google-Smtp-Source: AA+uWPwW4+nJWCYvkHIknWu0hOh0pNTPcYaVwW+0pwerE+Ke555EsQQzlRF11dHqysin4kpQpKrp X-Received: by 2002:a63:a919:: with SMTP id u25-v6mr5512462pge.211.1533888460305; Fri, 10 Aug 2018 01:07:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1533888460; cv=none; d=google.com; s=arc-20160816; b=sItSN6MKjNTLn5QTbc0jlt2hT20ywDaTSylUgaLXO7gPu8L7bTxo2a8V0CO0PTruj7 PpDpdY0G/7h1IeDQlzmJoH8gBAUSC7eJ/tl4ArFbpGwIRkobApVhBYdshP0lpey+APqL +7WKHZ+foHJLqjqrWw9KBPGdxAQg5QEEDvBFNNs7egfkh3RQEn8ENjhBby69OdH23ncK TqH+Tfx3rUIQ0BYFrYkOmojVKThlMiva6LPcnAX0r1n1JCk83z4PZHgE0bSn4kuprCJi d8q5X3kLFLbiNdov6ZpF+wDGMFA9biHd1D7uhMuTMf/jtRapVeE3qRSRkv7xPGgC3+he mj8w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:arc-authentication-results; bh=+IZEKVYmKeDxsrYMT6IImwtkDFAn5lkIQ+xlbddXw+s=; b=KZOKiqQ8SCiyEceLOEvYyOcD1uml5G5OpqKHPCCQg1wCZDGxOv+Ma4EhFGnCw6+WhH LbFcctFStq/108HtM7015dORGcZ/orLn4h322QZqLBTzKCDN6t2UUjOcQYePI3RHgFVi 40rCE5vrhEBXwhxzHtdnSgDF9VZyqF63TaHh+oaUs65SqmgdiaFXHqSi+noAhHUfP+MR EOXtdIcE2GRX53UxCz0V/Upl0uygXqeU9vW/5WK3Hl8SNYBe+Sesi5+V5g3o0JsGBhPV 84mUD7WtcJMQlUweG46OYWjZUIgZLd3fV221MFEskphsxXMkY3isejU0OkFLyEzC6o/i F5IA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bgdev-pl.20150623.gappssmtp.com header.s=20150623 header.b=WGuGo0xb; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l6-v6si8673776pgl.567.2018.08.10.01.07.25; Fri, 10 Aug 2018 01:07:40 -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=@bgdev-pl.20150623.gappssmtp.com header.s=20150623 header.b=WGuGo0xb; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729142AbeHJKfH (ORCPT + 99 others); Fri, 10 Aug 2018 06:35:07 -0400 Received: from mail-wm0-f68.google.com ([74.125.82.68]:40377 "EHLO mail-wm0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729060AbeHJKfG (ORCPT ); Fri, 10 Aug 2018 06:35:06 -0400 Received: by mail-wm0-f68.google.com with SMTP id y9-v6so933383wma.5 for ; Fri, 10 Aug 2018 01:06:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bgdev-pl.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=+IZEKVYmKeDxsrYMT6IImwtkDFAn5lkIQ+xlbddXw+s=; b=WGuGo0xb5j0hcr3045clvo0egQZTJcQ1zPsTs1L7DK+iDqpEvZD5y5dM7hpaMrgSYT nQifoecUNQNdPH8vP5Q+a0o+SxAWK6j0wtRzKJLUkCgUDw+z99LvN+nfilIL0Y73cbW4 Yw95c8IIHAMejR6WEJz5kl8AGpeQTaPFddp8+WSNNSHmd8+7iiV7vu8kHzweWnBdK0pa npIW7/6z8YPPgpDOk7P+SwCUNbMpFyKrOBtU8KTU8S9kqPS+2/ffc6pvGJPvezusmGcN xs+ykCtoP9UzWRxNNQzH1rX9ejMRs/ZAac+BZ7PjEWL7+6/7M4XPnBiJOsccxp5zNu9V krtg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=+IZEKVYmKeDxsrYMT6IImwtkDFAn5lkIQ+xlbddXw+s=; b=jPpcn2uCergonLb03F2+LA5d/HmZ+Km4TvOIpDH6SeMelCMZTInk7AufSBnxrri3ow TXfTfaOkDrBpmU/m0THC0n+0A2U3gbV38ymyqP2d7xd7zFKNrnKD4Kz9OaXCapWYWrUN HQbRekqgfp6aQ2y3dirsGxxkcbBE9gDv0m7K+mFX3vQ0MPkM4s3QTmAAtlgChkKTQWqs XUSuCr5Y98IWuKeCLjotlIKHy9UnmtRmqiWAh1Pf6eu3cQWBz88CksM4uYslqEa7v33M YDNoulTyQGDCh3DIwxwUh7PWHaPVP7ROGFtiWCAcxEQchpdHIXmMY9hFqVvb8NxhlU9G d8rw== X-Gm-Message-State: AOUpUlF70o1TvzdNj2iOOtq6JPcGrPc0eKnMJ0HH3jIsLrsU1NiURAKT jmfBi7X2zmyWN/FYxcdie2Vzzg== X-Received: by 2002:a1c:9e89:: with SMTP id h131-v6mr752656wme.13.1533888380637; Fri, 10 Aug 2018 01:06:20 -0700 (PDT) Received: from brgl-bgdev.lan (LFbn-MAR-1-609-89.w90-118.abo.wanadoo.fr. [90.118.185.89]) by smtp.gmail.com with ESMTPSA id h7-v6sm9546405wrs.8.2018.08.10.01.06.18 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 10 Aug 2018 01:06:20 -0700 (PDT) From: Bartosz Golaszewski To: 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 Cc: linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-i2c@vger.kernel.org, linux-mtd@lists.infradead.org, linux-omap@vger.kernel.org, netdev@vger.kernel.org, Bartosz Golaszewski Subject: [PATCH v2 25/29] ARM: davinci: sffsdr: use device properties for at24 eeprom Date: Fri, 10 Aug 2018 10:05:22 +0200 Message-Id: <20180810080526.27207-26-brgl@bgdev.pl> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20180810080526.27207-1-brgl@bgdev.pl> References: <20180810080526.27207-1-brgl@bgdev.pl> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. Signed-off-by: Bartosz Golaszewski Reviewed-by: Andy Shevchenko --- 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..4f3bc78e8154 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