Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp968810imm; Wed, 8 Aug 2018 08:36:55 -0700 (PDT) X-Google-Smtp-Source: AA+uWPyc1tF54lRWXVwwtqzfAWsp9P7zsjZtA6JxQlPXtaKwA702LOP+Pky7F03mYio5F8UyqSrf X-Received: by 2002:a63:181e:: with SMTP id y30-v6mr3028668pgl.82.1533742615188; Wed, 08 Aug 2018 08:36:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1533742615; cv=none; d=google.com; s=arc-20160816; b=X9uzxMUUuPwe6ie00Q1l/s3+wnPohjtrmOZQhD8MCXHUjuaF9/FZsYT5Ri5JnaSu89 1TKC/MYsLoSl5041PWd9S7Qm8kSTpDnkXsR1CVFkJGwMO8ogwd3uuoNSDWH8cFKgAq6Y wkpxjhKwfV4xN9OXsf35x0a2kcueZbQxFdYFh6gbZTMUPFqCTY1j1sfkkHwNtWFS3wTt OcCdYhgeaSpewMGkixhHFTumvW5sqs5ovhJ3Hc3ty0hGQfVIG83XELTRx2ov0aFFLmtk MpZ8OcNylkNRw2vg2BOTMAHxgkshEz7givTMR6za0jk7+kdIGYcP0NZurlG+llaCERPH eImg== 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=OvKwhd2mCBVUwPnMRE5AwwMx496gmP74HrCO7MDmB+U=; b=ESXzC/UIzC/CJrnn5lUB15P4h97wLnBKRUElY065AzlQzsGyYMc5lgh0tv+8iybGGE gu0377AnqMaknO5zrcAOC6GL/ydWYRnUdCvcWXTH+qHpNi52lzex3m+o4fT9aSYe0o6v GaWl4Gd2eTWIsW89yjfQBpJ8mjgdAjcHprwCr/QJcLExFXVw1c2z9UUj+Ro3ojuUBh4D aIlcEeVd90kEsBA0uSivqNRR6W5zj5YKWdW/X/fWRFda0jYwL07+SGyWy0ZwjKL76VGH Lx4IqZk/2KBJCRxHzRdNjG5BXKKf5rEglLzF+PG7cmPXevEOvLV+JD8sDWZWkcn5RGya vlHw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bgdev-pl.20150623.gappssmtp.com header.s=20150623 header.b=S74xJ2V4; 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 o33-v6si3445888plb.192.2018.08.08.08.36.40; Wed, 08 Aug 2018 08:36:55 -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=S74xJ2V4; 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 S1730110AbeHHRyZ (ORCPT + 99 others); Wed, 8 Aug 2018 13:54:25 -0400 Received: from mail-wm0-f66.google.com ([74.125.82.66]:39143 "EHLO mail-wm0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729987AbeHHRyY (ORCPT ); Wed, 8 Aug 2018 13:54:24 -0400 Received: by mail-wm0-f66.google.com with SMTP id q8-v6so3221303wmq.4 for ; Wed, 08 Aug 2018 08:34:13 -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=OvKwhd2mCBVUwPnMRE5AwwMx496gmP74HrCO7MDmB+U=; b=S74xJ2V4qE2OWDv56e8ZgVKuC6BowTpGgNREJayNLwLD1IUpDA4vUU3xQC3TkvWvf0 QeWQIFp++qv7MWqofZr7LFgFDNZ7RFZvQl0PSWJKjzDVa3PnPRoea7XEvMfKV2FiEqIz wna4Yofjol0X/TnS153inNlMQ6b4gjzoPB7kZoYVCnR6FLEnBBSil2FrNSbGV4fG0RJX bYaNfB3U6b78SjkujVor02ZwG6i64fZFzYnrGsGM833bwqoiAbLXMY10cNq5iX04pLdL bKvClCNnyasWxLK3k+RzurJZRCdBFnP4aRS664aInm2cqah5gT6w6Ac/+CzU50phiAw4 ZgeA== 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=OvKwhd2mCBVUwPnMRE5AwwMx496gmP74HrCO7MDmB+U=; b=YEeL+wAwz7Qe9NY3YEQAISia5dOtsTPxkK012x7OrBgYU390JiH3/WI/kdZbOnoUO+ 9MgpwZT1mAlLWnZBormIwtyiV8Z3HDGp5Z387swPpY7VMsAniJuKj42B5SKICa4wc8dx ss0oGLaZHozTCZFh1MK9y3hiLG64Nuw0gKmfkkoRWE53eVcN8txPvYPuhTVmtEiD9S8h GheamA+/ZwME9Ozn5hg7O42Q5BQpmjdMVUU2GAj+x33tDLx3RuruZElnUjLXU7w7DeTB hpvbdpZ0RF4FXfS1JEAaCtSFmlOGgYAqDd+c0yLCchQhxs0/2j2rTgc+XQl7Uep5ECCS ygQw== X-Gm-Message-State: AOUpUlEZboFj+c19WIFUAD6RhdGws6/TC6Bd1F4LpGQX55V7axfwAoK1 zUNnbs3U1jb8A1hU04sTvGLRhA== X-Received: by 2002:a1c:9f12:: with SMTP id i18-v6mr2156022wme.124.1533742452573; Wed, 08 Aug 2018 08:34:12 -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.10 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 08 Aug 2018 08:34:11 -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 22/28] ARM: davinci: dm646x-evm: use device properties for at24 eeprom Date: Wed, 8 Aug 2018 17:31:44 +0200 Message-Id: <20180808153150.23444-23-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-dm646x-evm.c | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/arch/arm/mach-davinci/board-dm646x-evm.c b/arch/arm/mach-davinci/board-dm646x-evm.c index 5a9de47bc8a2..5049f0c6cd1a 100644 --- a/arch/arm/mach-davinci/board-dm646x-evm.c +++ b/arch/arm/mach-davinci/board-dm646x-evm.c @@ -22,7 +22,7 @@ #include #include #include -#include +#include #include #include @@ -320,12 +320,9 @@ static struct nvmem_cell_lookup dm646x_evm_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), + { } }; #endif @@ -396,7 +393,7 @@ static void evm_init_cpld(void) static struct i2c_board_info __initdata i2c_info[] = { { I2C_BOARD_INFO("24c256", 0x50), - .platform_data = &eeprom_info, + .properties = eeprom_properties, }, { I2C_BOARD_INFO("pcf8574a", 0x38), -- 2.18.0