Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp5399951imu; Tue, 13 Nov 2018 06:06:16 -0800 (PST) X-Google-Smtp-Source: AJdET5daMfBz7RBxzaTbGoGGbKxzHs+C9axdFoLl0wtho4nER49i46x5FIMIeOmJEbjKgYERcCVz X-Received: by 2002:a17:902:e01:: with SMTP id 1-v6mr5056786plw.251.1542117976380; Tue, 13 Nov 2018 06:06:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542117976; cv=none; d=google.com; s=arc-20160816; b=KhOqqAdlHnqgkHkiqLJZf+3oCnO+0FwBZCbM1xS8K9AAgBnuUzxzHLniCA67mAT5aS gxQA9h/lTMRHRrEUP6TaZtXYxvXmgpSZHKrybXbeyCQa104oi54gMSm4J/SZgXAc8ZRu ze7YiFPGIksmzSxZuY9G8AcRYjETlakdRmIoQrrsbIh70TeXvRw427wvSvz184ZLuDJx UeUMDPomjisDRF73SOBbhZLc2gChuL8P7/yhB3jtiv7ygenJnxIsL2xcmEcSVHorrfum PueRTfMxM3OuUNbs+ao5hZ1OAmgMxn76esouVGZ5q72qUoWsw8du6pyvx5qJ94Wjn1wp JWLQ== 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=nCKNyyyX49gJ9CaNap8tpDC+pK+u47mv+sMMopDxMTM=; b=cXFEd3OCQL7YEz3C6yHMAfpvi7CDUwP98bbZVBW8TxlgyKbKnSS7CQt94NZC8jE7Nh PKpRcLXBAaQCsGFhZJLzbzS2dZ4Ho58YyDUZr8EyAFwtXtQhyi4y9mofgKcoswUDtgTO n9yqqBgFVeumtEYyIJAgtQ35gk8M7kHbZTDXkqmUESCq1RqlnlcxdAYfsnQB/SeCsLab QqqAKIEdITucf+YuEib3dNWPioAJU68d2+Ly512fjgl9TeDpUmIoFkPi69xxYFU1nTjE iOB5yy+C8AdnRd8krbML/k4CpPe8Sp+k1k9YAbO1jcGpyxSuMWfjzCkY4pCdwDnwyp89 IzeA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bgdev-pl.20150623.gappssmtp.com header.s=20150623 header.b=JoZ1fiVE; 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 x23si18638321pgk.272.2018.11.13.06.05.01; Tue, 13 Nov 2018 06:06:16 -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=JoZ1fiVE; 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 S2388033AbeKNAAm (ORCPT + 99 others); Tue, 13 Nov 2018 19:00:42 -0500 Received: from mail-wr1-f68.google.com ([209.85.221.68]:43473 "EHLO mail-wr1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387993AbeKNAAl (ORCPT ); Tue, 13 Nov 2018 19:00:41 -0500 Received: by mail-wr1-f68.google.com with SMTP id y3-v6so13412797wrh.10 for ; Tue, 13 Nov 2018 06:02:23 -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=nCKNyyyX49gJ9CaNap8tpDC+pK+u47mv+sMMopDxMTM=; b=JoZ1fiVE9ZF9GTDTPgNWKBckmgnqA1IB3gWL7zEF47gEGDK1+c59xiqItVL7kGGzUy dpyiuUUBsS8uXZoOraEzosPpYXdotzv/aGqX1RuNtxEWdZTqa7IpQ03wq+dKz6wtOuxb z85vrevS5euHqqIsIGzROloIry2wZrsTpK4hqkwVhbmM5skOGrAMJIxTK5wR1D2sxYaK VdZ+BuGqCpooXV9vGPFfrAwk3OtNb8WrlzFxpsCcCqz710Sc4mj64K1pIV3DLuTrq6Nn rii9XOkFbEtRdo/Pvf4wrrPNDyTWx4J/7WC7T00ZsHOVqAmkXSjHFDB4hOogAqdhlOeJ +zOw== 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=nCKNyyyX49gJ9CaNap8tpDC+pK+u47mv+sMMopDxMTM=; b=Nb0h2uL0Qqe4WQewCENpoi4mDRqM7q632bjSJwUr5wBuJY4avj/x7ukdJDlTRvFI2+ 5EaTfbznJBklitNHPMK8oylY9atoNDsSr9KOlB+7PwNBBp9I7czru86tMpzPAGPVlQzp 3XAJ8VEvn6Y0QX9hkAl2JejabWsiOn4WWuIy73+QxHhpGhtrgRrAhp0VLw23XOylasH6 CKj91g7p3JZrLZF08V0u1tPtHXThJWdFBTAfRN++0CtDUUvJEqn3w8R4BGHYskxaDJWW 1PRJtap2bQffY20mRAFxHALKJcjlY3wAYkQPgug+NLaVHGge7Sb2C8QAjSOXl+ioHnNs 26og== X-Gm-Message-State: AGRZ1gLewxHVHwPAof5eU7MSO10gwAowsCdedeqOHg2EPfvzABhSoHbk GPU1eG7uRm8fxwBpHeBsyjl/rw== X-Received: by 2002:a5d:4b05:: with SMTP id v5-v6mr5000343wrq.5.1542117743205; Tue, 13 Nov 2018 06:02:23 -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.21 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 13 Nov 2018 06:02:22 -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 16/25] ARM: davinci: dm365-evm: use device properties for at24 eeprom Date: Tue, 13 Nov 2018 15:01:24 +0100 Message-Id: <20181113140133.17385-17-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-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 8703fc18dd3b..f016584285b0 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