Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp4511654imu; Tue, 8 Jan 2019 01:17:27 -0800 (PST) X-Google-Smtp-Source: ALg8bN7x0H+TpWY5Tk+3JtjE4n8wsLIFemb3tpuoMr8e31lwI8vtbDSRkOXfoJhvYGW482Zijucq X-Received: by 2002:a62:8985:: with SMTP id n5mr942661pfk.255.1546939047463; Tue, 08 Jan 2019 01:17:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1546939047; cv=none; d=google.com; s=arc-20160816; b=ELeBdxxE7wsnedJpZlPhYIvycaVYPmjrUFwTuII1m6w6XbTjP4T9lLYuq/zXVAIEFe +A5vt7rSJz6kT/zImmAKJe0y9SRGjVNwNrTkiH+U5Bpv7oTJdvf82HvbnvMxMVRUFco5 oleanHaaZ89VMrjg2oTDkUq9XJTK7zN+LeOJ9z8IrqWDpDJt0CvvR+8DmH+Ox+7cWXsM 8NQWW89xD/U+BvUnZKrGqFGTnAHIo7QQaMWeHxYaeMRUrBe42EPnJZjAPcsvf+wSCLgG jssjPRk2QusnPo26korRsTAid2qs/cAU0ijcvRU0Ux2oTu06wcwGO5WGZjH+DCZc4DOp pjpw== 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=NtdPGnoNcOA+uAMeykOlFvJi5M25GSj2otU8Jlp5mq4=; b=oemrkYNTlkEfF/zHx0VeDRN9OM7wKskyBEGGvd5PL8NF76jSOobD1wDpb91naoqcQN /l/aQ62HrSTmtV+4ShQItgmXVrDMN0uM1YVlmEJmL1GHBs2BLKKWAYIFJsgAdYdYc4ws +T+51E/K1MOk4LGasbkA9CnwJIgOlgg9rugjP+xOjzN9R5Sudot9YiSrYPUr4pKiOZdU OrsSTaRJhfIvfuEWuG6W5IIMXVfkOCEssHUTfTorS8c0YTeD7jm+xyV+psZedJon7dID OOwh3bYACFeRKnk9ouTAB9BYf0qzAviKESSKYq2keaPj9ljLgFILDDcjr/RkdX925ChL AR3A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bgdev-pl.20150623.gappssmtp.com header.s=20150623 header.b="t/6BSrAC"; 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 s11si10834796pgi.324.2019.01.08.01.17.12; Tue, 08 Jan 2019 01:17:27 -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="t/6BSrAC"; 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 S1728307AbfAHJQA (ORCPT + 99 others); Tue, 8 Jan 2019 04:16:00 -0500 Received: from mail-ed1-f66.google.com ([209.85.208.66]:35696 "EHLO mail-ed1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728253AbfAHJP4 (ORCPT ); Tue, 8 Jan 2019 04:15:56 -0500 Received: by mail-ed1-f66.google.com with SMTP id x30so3485253edx.2 for ; Tue, 08 Jan 2019 01:15:55 -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=NtdPGnoNcOA+uAMeykOlFvJi5M25GSj2otU8Jlp5mq4=; b=t/6BSrACMpojsU1VWdUposfrHgGClFWcP71qT2s+vhPd/29df5n7Ij1XEIkIpX3trL Ng0MgVNjxdG8ubvZUNa5zZLkG5dheBnqizItOOhgONxNx/eyS9KTcjKDTeANVeRPf6UO zJMQmr/kkrSCSqcLoqc6J5iPa83k2FKKpUaRPVsmLDK1VnY2wx4fCVi2/l3E15nwXem4 q9K6APrr05FYA/HC093TIqL6BiD0WWAuCYBcfsDPC/qaF+wCBvs4uTjCvX7BDzSq1wn8 afdElkXMePx1AXpaQ9JW0FsxZUUJM4Q1znYXW8A0gCDU/LIzplp2S240APmLJjWaGBl0 M/cA== 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=NtdPGnoNcOA+uAMeykOlFvJi5M25GSj2otU8Jlp5mq4=; b=CWq7pdBwBohqw6EBxQIv623XmIW6jVj2rsqtPK9Yw/aH+KuuYm9q1TH99NVG4J4/Iz l0abrlCVvVxMfQoHH4qjWy0mYZ85wc71DCxIDH0geHWV3iKMvS/3Lz9/xmkP/m4tryJQ kdU2dQHo4ewqLMPyPtOpJIFkIm18Wkf4q5NK6eDcsPs2g2O0PrcvJOB/7PAXTEjnWgEd gmFaG/KIOF11NEd7441HMkfXbkBiy+qu2QGJ9CiKLN9zozc+I6/Tl+ap8e0b8c3L5kTT H4TUTMBGdA2GZ46gAkPRsKiI/nIxRdRwLnJZIE8UJiUw8fpOIw1GXxam9e/Ncl1AEgzk CZ8Q== X-Gm-Message-State: AJcUukeIWgLvlNvKlEANVp6ZJNbZrZNzEixy5YlRROwsY+H04jFsXkYS POW5Yhx6KaGrSZtqZFjrybrQxA== X-Received: by 2002:a50:f5af:: with SMTP id u44mr1351249edm.172.1546938955234; Tue, 08 Jan 2019 01:15:55 -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.53 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 08 Jan 2019 01:15:54 -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 05/12] ARM: davinci: dm644x-evm: use device properties for at24 eeprom Date: Tue, 8 Jan 2019 10:15:32 +0100 Message-Id: <20190108091539.16674-6-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-dm644x-evm.c | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/arch/arm/mach-davinci/board-dm644x-evm.c b/arch/arm/mach-davinci/board-dm644x-evm.c index e1428115067f..efe4e170e87d 100644 --- a/arch/arm/mach-davinci/board-dm644x-evm.c +++ b/arch/arm/mach-davinci/board-dm644x-evm.c @@ -16,8 +16,8 @@ #include #include #include -#include #include +#include #include #include #include @@ -532,12 +532,9 @@ static struct nvmem_cell_lookup dm644evm_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), + { } }; /* @@ -647,7 +644,7 @@ static struct i2c_board_info __initdata i2c_info[] = { }, { I2C_BOARD_INFO("24c256", 0x50), - .platform_data = &eeprom_info, + .properties = eeprom_properties, }, { I2C_BOARD_INFO("tlv320aic33", 0x1b), -- 2.19.1