Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp969462imm; Wed, 8 Aug 2018 08:37:34 -0700 (PDT) X-Google-Smtp-Source: AA+uWPxNU2fwMQn7DY0+1taFRwpHnKdWKyiVWVlVVyV611mJgvzJRfOy4d7k2j5BQsvGaFUn/nxN X-Received: by 2002:a17:902:7798:: with SMTP id o24-v6mr3139103pll.186.1533742654409; Wed, 08 Aug 2018 08:37:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1533742654; cv=none; d=google.com; s=arc-20160816; b=dcw57KVlO33Lj5E7yyEAXNNYP0E7dpKv3iU79nHvjTzSyCl3TYWYHeyGOkcucY3ajs jSCml01vXhWnZgRRxlw9/V98+4NgxHY1K7GFHGiLE/h1EiHr31d05XxFX6IYESQENB65 ljA5c59xh0Bl0sV1RoJw3UxURhshLAQ7DZ3e+Tzc1EodkAlqqnw1cCniAuagU7VYw1kd jFmgKLOL1nVE/f6gsWYRKf/OXUNWOGoOfODQOQU1yx1/NElslFetGtXGh3+CF8SCd0ot lmVC2u6CpwUeWTk+KvuJa9ZuyqwAn2uN5mKaypbxKcTL/nSYKQ+Qn/pZqtg2rhWF3tdL Ccrg== 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=a/BOUiTdvWAmDk1aQD6bOGL0a+rPVeL/eLOK+TRSYBw=; b=JKjptKQTgBTaY6pyJ9BygrApo9K75MmwStqyRdmR4MbD3YjU3yRKQnXPJlyg5xa5Us QoUujjQH+g67I8xA3EuZcb3T36AuPVIpmZUUE0Lzg7hjISP0JPI3UcEKp2pmttcQo1G7 npvWBp72+SRIsaAf1zCCWydCGjZPnp5aE/zz6rbCWRnZdsDF7ymkDuYbMpjZPptJJngn 2rzIs2J7iiZiE72GLliXXLHNUow6Ou5HgGtY54U1HYp6LO/lN7Y/7AilsDEWRQWQ9K/D ab69AUoOhmySGraq+98BvlnIPLnfZgq3wbA2KAr42nK6+BDeTMJcsVlg5nHFj//pKW0D 1DJQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bgdev-pl.20150623.gappssmtp.com header.s=20150623 header.b=XWVIG9DA; 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 d2-v6si3886147pge.404.2018.08.08.08.37.19; Wed, 08 Aug 2018 08:37:34 -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=XWVIG9DA; 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 S1730039AbeHHRyX (ORCPT + 99 others); Wed, 8 Aug 2018 13:54:23 -0400 Received: from mail-wm0-f65.google.com ([74.125.82.65]:38283 "EHLO mail-wm0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729855AbeHHRyW (ORCPT ); Wed, 8 Aug 2018 13:54:22 -0400 Received: by mail-wm0-f65.google.com with SMTP id t25-v6so3201449wmi.3 for ; Wed, 08 Aug 2018 08:34: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=a/BOUiTdvWAmDk1aQD6bOGL0a+rPVeL/eLOK+TRSYBw=; b=XWVIG9DAg21hfeGcQ001YukvUzI3hLmFhFbJL9E9LKfvMDBDtdj6O/WL+KF1zX98c+ 6lrWefYHk3PPIT9ix5DmwQe/RenzPWO73DW5zXaLPGKS0n/76eNwJ6x8dRUFP4AvIYpX w4wJmiXoH41F2X8U9nU6XA4Wf6hvlcXcFrRSuqZOdC42a784zl5qqS27ymeZh/1kM4Wl LTEl+wCatoeybcGry3jjKw84JgJwCUKPh3iE03TFLoA+e8L6U4MubHtJZX020Z6TVVhI oO/VjYnDzT8ipDY+uJgIs9K/biY5I/7AHR1dbsTIzWmad+yXM2+gpMUZqy8I2uiaVEY9 VP5Q== 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=a/BOUiTdvWAmDk1aQD6bOGL0a+rPVeL/eLOK+TRSYBw=; b=o2hcVVivwhACjeT5Wp4iwkmmiv5gOZFduZGvCYAvqsEZluuifTEHRqw5CpK6FkIwhJ IVDhQn08904ciFYyI338/rnhOeLQF5hb/BvQK5qUjb6OysoscGcmtStpXNXV+Jz6Z78Z FSiRn7hIeNEa5fTG4Tw6FBD+VgfZv7iBUuQc+7Rjkc4lpUHZcoZoha3fKUCATsHdfKtT gP6oimeRHxDsQckaqe0IPOKzXO06KZ00wpE8XmeHGrYIMBqDhW9SyjOC1I+m3ouK00pm 93xe6z++m26N4FmlE8dODedAZHn4oSmsHL5J+k3iYwQs97u0kGKF69f5vDMonlQANiV8 +8hQ== X-Gm-Message-State: AOUpUlFNTehvwonNkdj5/GydXlDudnXLVP33oTGw+gCJ+DVWzTrVs+Vp ueduFPs3ixwO/YVXA3dvg03BHA== X-Received: by 2002:a1c:f46:: with SMTP id 67-v6mr2072530wmp.122.1533742450496; Wed, 08 Aug 2018 08:34: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 s2-v6sm5240915wrw.52.2018.08.08.08.34.08 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 08 Aug 2018 08:34: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 21/28] ARM: davinci: dm644x-evm: use device properties for at24 eeprom Date: Wed, 8 Aug 2018 17:31:43 +0200 Message-Id: <20180808153150.23444-22-brgl@bgdev.pl> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20180808153150.23444-1-brgl@bgdev.pl> References: <20180808153150.23444-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 --- arch/arm/mach-davinci/board-dm644x-evm.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/arch/arm/mach-davinci/board-dm644x-evm.c b/arch/arm/mach-davinci/board-dm644x-evm.c index 6d35c6e1b0bd..abfcf42da6fb 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 @@ -486,12 +486,8 @@ static struct nvmem_cell_lookup dm6446evm_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), }; /* @@ -601,7 +597,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.18.0