Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp5398631imu; Tue, 13 Nov 2018 06:05:14 -0800 (PST) X-Google-Smtp-Source: AJdET5fqw/7YL1MwmkOtXyfrq5jZZF3K6GIuDHqG2KiJfqik6K8+4kO5wRDJhQKn7tSEVEcvYq9a X-Received: by 2002:a17:902:50e3:: with SMTP id c32-v6mr5200699plj.39.1542117914342; Tue, 13 Nov 2018 06:05:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542117914; cv=none; d=google.com; s=arc-20160816; b=hqXb8fsUyrrcm9vo8JSZ0rQ0sQ1ruV752lPaw20W/MUuvmVGHf37kzxtR1uYeo9aan JZxE+fDEsK0nPv/e0R4qTBrwdTQAZ2DEptiztOkB2LxZ6GkLp4ww7DP5apxkZOAUD6kR RkN3mhYxqY9YZbBA6CfEH6QQhP3y1wts78Qo13SRrnDZHnsOG6aLpTzlbJIwsaEwdsJU RmQU1qxUpohB0qdeXersRUInpIYwyNl5jXL+upsbUXgAVihL5/IJrDgLGk5zHGp+aIDw 3Ivv9jQ8XG5x1Ze3Bon10HlO340sL2D0P/moQxGHO0ggWH/ShmjfjLq5pKR6eNcKGvIT QxzA== 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=y6CnoSnAghqXfvJxle+GvrI/3zBYrrM1Y8Ul+jXt50NKbcHoSI6SFPRXINAJv7KMS6 fcL5k2ogY1jnCF1JCs7Yz2dxMvPrK/snJbfLQCDP7MTXCGTpNgP4d/3eCUNHaHDxJ3ys zfApPdwNJ4AxWgjGyhrSPvC3m0LGnttwvhUeOIRKOO6dmE58TEAkjrIJLfk7P9Zou3FY YmGsPb2cpOy3152k2qhggUYr3j3NIapMffcZMj+rOUmEYBNdDsnX+5LjvXba0KVKlThq iMp0JQcjKB+qDmTXrjnD+E9fczK4E3K0hTpRTXdnrA7n0pkTyLARd37jciObMAOp0gnt ONVQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bgdev-pl.20150623.gappssmtp.com header.s=20150623 header.b=w014nPI1; 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 z70-v6si22124450pfi.165.2018.11.13.06.04.46; Tue, 13 Nov 2018 06:05:14 -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=w014nPI1; 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 S2388270AbeKNACC (ORCPT + 99 others); Tue, 13 Nov 2018 19:02:02 -0500 Received: from mail-wm1-f67.google.com ([209.85.128.67]:53406 "EHLO mail-wm1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388057AbeKNAAp (ORCPT ); Tue, 13 Nov 2018 19:00:45 -0500 Received: by mail-wm1-f67.google.com with SMTP id f10-v6so12018706wme.3 for ; Tue, 13 Nov 2018 06:02:27 -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=w014nPI1uJ7XLo9ncewVaZ4F3wu8fqdaXRgFGCsxn5ZsTiXFGgW8T+bc8vpPfzKJx8 g8vkxFQ2VzBmEDQ37zLwng0EVbgn0Z5b4Lr4vSmo1oQcaDy/PmrITZ/b8MXCbarvNwzP f/OGvH4iIKmWWo9ibBjb1LRaD43qlMciij1OCUqjM/XjMJ2nLJ8Q+mylydEHvj8l8Jgp 7789G2xZdpCi5eYrMggu+ZglSi3o9lCnqeVYnS0X3fdFuv27r3gkPCdTNX27PPJzS5Xv 3+vkukmuOlvhkZe2B0WlFmC/WS413912TxnPtz/uqEv19c7D2sFzO8NGpr626Nmrn3EQ CWdA== 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=QQyE9EY9As8EJeyanS9shRYyL0D+YY76BXBLJlxNbJf0kN53rETlASy7/nnp+eNI5/ nE83wke9BpoK7YDBDt42vVG6vypM1uo7fMrj3okAo3nMCSb5AOg0anonxk1msFGqTb4d zEIo+5aSxIVr7Y/rbeNRxRVKHVBlJ6iZ11kiph10a+OHtck03ltvR7B7UcLALXhZT40u oqlK4aMs6i53yKc6ZM5Zae2MBTlW0GrBFxhBkh4NpzgFVm+rpG4yudP7Dd5gQYl0IITn nopl0hSsIHpcQEHQ9r76fg6lrvv/yLxc9z+4/M8yM5FwJ7XhKdVPOUCVQAeNGpzGCyFJ HKvg== X-Gm-Message-State: AGRZ1gJBvRrL7I8IYCjQHsEDB8Z0A8Vq0NGluY943Xfm7rQMIoEOdLgj sDxJnhhXOt9X1Fz8mCbxRxR0WA== X-Received: by 2002:a1c:730b:: with SMTP id d11-v6mr3320577wmb.107.1542117746750; Tue, 13 Nov 2018 06:02:26 -0800 (PST) Received: from debian-brgl.home ([2a01:cb1d:af:5b00:6d6c:8493:1ab5:dad7]) by smtp.gmail.com with ESMTPSA id m69-v6sm16604122wmb.8.2018.11.13.06.02.25 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 13 Nov 2018 06:02:26 -0800 (PST) From: Bartosz Golaszewski To: Sekhar Nori , Kevin Hilman , Russell King , Arnd Bergmann , Greg Kroah-Hartman , David Woodhouse , Brian Norris , Boris Brezillon , Marek Vasut , Richard Weinberger , Nicolas Ferre , "David S . Miller" , Grygorii Strashko , Srinivas Kandagatla , Andrew Lunn , Florian Fainelli , Rob Herring , Frank Rowand , Wolfram Sang Cc: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-i2c@vger.kernel.org, linux-mtd@lists.infradead.org, netdev@vger.kernel.org, linux-omap@vger.kernel.org, devicetree@vger.kernel.org, Bartosz Golaszewski Subject: [PATCH v2 18/25] ARM: davinci: dm644x-evm: use device properties for at24 eeprom Date: Tue, 13 Nov 2018 15:01:26 +0100 Message-Id: <20181113140133.17385-19-brgl@bgdev.pl> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181113140133.17385-1-brgl@bgdev.pl> References: <20181113140133.17385-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