Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp2984505imm; Fri, 10 Aug 2018 01:34:10 -0700 (PDT) X-Google-Smtp-Source: AA+uWPyKMkiluW4wVFQcwX0+5Vl7eyFovXSE3wywld+A///x344bRwsYRj9eW+rk3u4h0YJfyeH9 X-Received: by 2002:a17:902:6b44:: with SMTP id g4-v6mr5277111plt.50.1533890050824; Fri, 10 Aug 2018 01:34:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1533890050; cv=none; d=google.com; s=arc-20160816; b=DkXzwVizS5QcCdLVlt/SKL9KsAL+dC+deTEX2LY3YwDbgOxjLlKxpGXPTx4pzZtxhe kfqAPivW2B8XL/GJ0u+l13R7LUs+PgZn4PppsiYqyin2g4EHO07iAyYYnXH+vlssXlA+ iU232se6Ag5ne3a2/61S9/pUnQiKL1ZU6JNoO58wQ1wUbkcQPbswQiRahD5eFIKW1R0K IhfOiwdgFk8NZ9kxDucx29IYTp9m0F1Rw2C7usSVWoTuSkVlkWL2IUqucRdyTHrIxyg6 cu36PlxMpzAX/yOxgG+qBE34jd7eWwtJw9KfqQoR6b059/MsCHHpa6CjATRob+xCmz9z 4uuQ== 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=HPXa1j+zFmSDAVh2jGMcP3wD/npPGnLx7r1kNiFN+9Y=; b=dSUNA8g4JicTBASdVEQql0MN6gVCfvu9HeTrqf+Ntl8O0c7rvrVNYJZM+Tfhmfvr1v xYAZAchGPJJplIQLO4StOQRe/s3a7VANM17L7v7hVAVoKWz6H7n7gK5r78dd0i8PQ8f5 +KjTsCgmd0kyqTN8fd2gub507gegK1AaPkPpkndnK9ypQXCTUoH6u/fVnXQLu8tOFdtp g79lKDea7aW+TpvCkkMFt74byBndrA/9v4WcguYAl9liEk4LzVrMEBvRhaxfIgMCJ0DG PXljlj+BTQgkCcB06OrwJO8Ozmfzc9tk8hTW8xH/lBmKMk14ALds8Ca+gVahu8MwUFKH QtQQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bgdev-pl.20150623.gappssmtp.com header.s=20150623 header.b=O+OECH4n; 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 g12-v6si8387501pfh.346.2018.08.10.01.33.56; Fri, 10 Aug 2018 01:34:10 -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=O+OECH4n; 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 S1728548AbeHJKe4 (ORCPT + 99 others); Fri, 10 Aug 2018 06:34:56 -0400 Received: from mail-wm0-f66.google.com ([74.125.82.66]:38891 "EHLO mail-wm0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728511AbeHJKe4 (ORCPT ); Fri, 10 Aug 2018 06:34:56 -0400 Received: by mail-wm0-f66.google.com with SMTP id t25-v6so933099wmi.3 for ; Fri, 10 Aug 2018 01:06:11 -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=HPXa1j+zFmSDAVh2jGMcP3wD/npPGnLx7r1kNiFN+9Y=; b=O+OECH4nC1bg5wtlSFpOGT9gHilp0o7Nlfityg//si0KFiuNYA0OwATePITmZCM4PC blWQAKqRmehTaQnZkumesFl/qcoEjM5nFW8kFursazipXQlAfP02T8lsI4ZaA66KMY+G pWqfiU7os8y3GFa9Xm2lZocwn8SouFVV7qtnRn24oyISNd6zXxMBsmBy0OYwAJqFkJ1e WB3tB1JokligLEXKuSYyskmLiZE+0pE0xX/Z3DUBkmrPUtFyCeKQK5/13Rsqs7sAwB4c 99bV+y+gVHxXXS94l8dx9yFX+ItRGrMV+YHv60Mf2T+df+l5vi2XQd+A3VZTsLLz00Cc 9/5A== 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=HPXa1j+zFmSDAVh2jGMcP3wD/npPGnLx7r1kNiFN+9Y=; b=i6EA0gP/Vl7jBmeBp5Kd5MCTz194jMG+wvwXYPlOlURT1rTGYbnfX0cR+tN7VtbcxW xJonYst5e6JEc4GD3JarIcNDPAwq+exF0JTk/BzH5w44DMbl96UgbJI2g+Qx6yR9V5NR zE+ldAW1cCo5msbZg9zF6TQALsoARvrs1vjuif6Jh3hZrvUDS4Z5pfEHrVIaS8jOCqWq fHDQHapcvuR9ecDSPeKnD9ZVca1J4ZYwY776Fj3vRf5bVdTR4OryCx4MU3ETZaK+5FgL /IJZ07v6i3/4NbJnAgKiLqGt5drUJ7bmRf2UGUWVOsNUY3cTKq92C9nlPAyE9pTmCvv0 tXiA== X-Gm-Message-State: AOUpUlEmmwwKq1l+aoYOszdbPk42xGF8ayMIk9LZ5pSTIkl/6Dzkg6ir uw8hTkMDwP/P2P5VFsnaAJJulQ== X-Received: by 2002:a1c:8b0d:: with SMTP id n13-v6mr730702wmd.46.1533888370458; Fri, 10 Aug 2018 01:06:10 -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.08 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 10 Aug 2018 01:06:09 -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 20/29] ARM: davinci: dm365-evm: use device properties for at24 eeprom Date: Fri, 10 Aug 2018 10:05:17 +0200 Message-Id: <20180810080526.27207-21-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-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 cf3f2e611228..2447e08dd68d 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