Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp4512683imu; Tue, 8 Jan 2019 01:18:42 -0800 (PST) X-Google-Smtp-Source: ALg8bN7d5vXSqRrhGCOTkRDSx7W4ylw6jeNz/LOACSnxtgkz9Sri0BoKsoKJf3Kb1uTWzK/w+1zh X-Received: by 2002:a17:902:48:: with SMTP id 66mr963446pla.68.1546939122781; Tue, 08 Jan 2019 01:18:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1546939122; cv=none; d=google.com; s=arc-20160816; b=l3/475bcMSN5+0swmV7C+CdNUAJYxhCxncuuslhPlDqR4Bh6ubT2fx5qGw7GzadZAL Ha0IuJc+/BpZecIXnlwXXe3w6qnyhuKzhkWlSN7ng9A19pGV+RyWa0t/NXCI0X/kmFb7 z41UnnqCEALu+U6v6Z/eDnBX9nku8AaPhxrScVbpwQ8C7X4kM9V2NDp1LBoigjJdV//F okVIvq5w/lYFsPE4RdjybnzqNOJOR2neQTYHs6TfUzu2ct4WpmRojXUgynxVcGzI+x3v HvWYM3mepeFCdfZXyZlfbFmytqX2RrL2n0Ecuy7xkUnt9OTURKiGInhfAAeaQ71q0C5F YJ1w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=d9WKYwfle5iDpDbapbl3IuLnt+LCk29VTN7zfdkUdEk=; b=cLw3jY40/VVLQK6CdHxQmTbYOzH1rQ74qgwPhzZP9MblE4BlGNc0y/kBRFS1rXQz5J LGMDPm75IyADxVDmHYoiQeSfb12k5SJCVSO+GpUSLgpj7P6Gf+dnzgW/0rbH1QSrFPhS WDNsS09sF3DoFmG9I5AIjgbW+4Y22TZQ9ZMZdyYq5ThHvSwIGP42SIQAQOJkY+FSw4GF 2sKr6Z5H9WThK5WKUPQ3KrtheGc+IlTCzghlVO86ZJ3BxOjv/n2sbOfx7OZb1ShhRBKs rk+0j064rDrmxl6TRcRFzHqdnl4+IcXx75zj9qiX1BsC3hmc0AdQR3BYXF4cqkv0mFKo uBEA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bgdev-pl.20150623.gappssmtp.com header.s=20150623 header.b=Zg8t0ZSH; 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 k20si7184330pfb.215.2019.01.08.01.18.27; Tue, 08 Jan 2019 01:18:42 -0800 (PST) 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=Zg8t0ZSH; 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 S1728286AbfAHJP6 (ORCPT + 99 others); Tue, 8 Jan 2019 04:15:58 -0500 Received: from mail-ed1-f65.google.com ([209.85.208.65]:42788 "EHLO mail-ed1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728209AbfAHJPy (ORCPT ); Tue, 8 Jan 2019 04:15:54 -0500 Received: by mail-ed1-f65.google.com with SMTP id y20so3438877edw.9 for ; Tue, 08 Jan 2019 01:15:53 -0800 (PST) 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 :mime-version:content-transfer-encoding; bh=d9WKYwfle5iDpDbapbl3IuLnt+LCk29VTN7zfdkUdEk=; b=Zg8t0ZSHGq5+XwEHztECZ+pq2NswnAhNF+REWdT0SKfdX9bJ4nN5h+wBoHhxfB7Hk1 0tYBwmAbTGnqQuRkZt093/IZtkl0JToxqIqwSukwlN5wfuP8nGUS0AGWw1yteG5kpnA+ 6drX4ac/iaBeCUwrMrEzd88ZA4W20PuqHb0qfWSHYe/3BflsEDZXE465wfz+/ystnhvY jA4RAOzgdWuqQgrYcUs5lzYEUfdObdtiP2moeyRXDi3AAy8xgCpWla1/LltR1wp9Iu5c Mkjq1xQb5z30kpkoUIDPhIK0ruEuYlYqQ+JlyHMtdrL0pkG0csZF208L1zj3iBWshYHs drLQ== 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:mime-version:content-transfer-encoding; bh=d9WKYwfle5iDpDbapbl3IuLnt+LCk29VTN7zfdkUdEk=; b=UV1ME0zccxjplQ2Bq+HM6WROJTahrqrj6CrmGkrrv0HfteZSf8u1ZIUc/7Q2H6LBUM m8W8Q6y5o5xDbq2B6b9qY6+iaHfDvPcj34yftinF80FnMs0AMGcTnN/Hf5FHfE5ThPH3 Hn/SQSgZCQ+VWK3LyHhwOFL4qANMkrco5NurAjz+ZkmFsFV2vNEY1l8ySqzxQS0XKqo3 E1XCj103QZDj6Unnc5Hp/0Oayv+wWow5jPHjAEEiLxD2xXzVRAb2OKGyDEAWhiGi1vth c41R6L+AuiXu/cQUVaa7YqktIxG4Kkc+BLQHnjNdS5rcGe2hdZ4QFbvAPw27nhBDSPPc kPdQ== X-Gm-Message-State: AJcUukf1DpqhCOHCyckhGbHrLPHdalhyFOxip4PcYCRFkZft0ZNGhu/E vsbp36i7Qedt+ktxs5SCV5oJUA== X-Received: by 2002:a50:d753:: with SMTP id i19mr1316410edj.75.1546938952367; Tue, 08 Jan 2019 01:15:52 -0800 (PST) Received: from debian-brgl.home ([2a01:cb1d:af:5b00:6d6c:8493:1ab5:dad7]) by smtp.gmail.com with ESMTPSA id gp22-v6sm18373560ejb.4.2019.01.08.01.15.51 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 08 Jan 2019 01:15:51 -0800 (PST) From: Bartosz Golaszewski To: Sekhar Nori , Kevin Hilman , Arnd Bergmann , Greg Kroah-Hartman Cc: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-i2c@vger.kernel.org, Bartosz Golaszewski Subject: [RESEND PATCH 03/12] ARM: davinci: dm365-evm: use device properties for at24 eeprom Date: Tue, 8 Jan 2019 10:15:30 +0100 Message-Id: <20190108091539.16674-4-brgl@bgdev.pl> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20190108091539.16674-1-brgl@bgdev.pl> References: <20190108091539.16674-1-brgl@bgdev.pl> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 e3b0b701e395..f21dc8d3b28c 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 @@ -225,18 +225,15 @@ static struct nvmem_cell_lookup davinci_nvmem_cell_lookup = { .con_id = "mac-address", }; -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.19.1