From patchwork Wed Apr 4 11:47:06 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bartosz Golaszewski X-Patchwork-Id: 10322467 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 0569460318 for ; Wed, 4 Apr 2018 11:47:34 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id EB7CD28C29 for ; Wed, 4 Apr 2018 11:47:33 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id DCE1228CBC; Wed, 4 Apr 2018 11:47:33 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 5D5D628C29 for ; Wed, 4 Apr 2018 11:47:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To: References:List-Owner; bh=wmZBvR3YfEJgVnGPKhXY0IcuLRklXaQoC4k42ypj3lM=; b=K6F o6LS5VaVpBPXYXf8UaMZd0LF7k8YJFvdaYaqQFNiRXC38MsNImTt056j8C6FVCh3LzAcuwyRk+7PQ A66HGCuQEv3fzaEKh90C0vow8/jCDy17L3i+hved/giDPbnraVuyj+Wmi9554d/OAeWBG238zN1tS +SVxNDkcwKuePFZpXYFb9KGpr1Tk2Omuj3PGAL+DF6O9lqAm+gx4Hy+GmH8Q9QD/b6zhIjjOMXVff 5iHbuzSnggyb+T2DoD0Flxyohxg8m8OBPnlBsKGT7Z8O6NLwit3roVetYHoJIkUjnmaxdgeOHUuW/ 4QrOaG1mIO+cT5GuqPo+EO5Yy8n4nRg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1f3gsu-0002zF-GH; Wed, 04 Apr 2018 11:47:24 +0000 Received: from mail-wm0-x244.google.com ([2a00:1450:400c:c09::244]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1f3gsr-0002y0-5Z for linux-arm-kernel@lists.infradead.org; Wed, 04 Apr 2018 11:47:22 +0000 Received: by mail-wm0-x244.google.com with SMTP id p9so40015529wmc.3 for ; Wed, 04 Apr 2018 04:47:10 -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; bh=Q7hNSOCArNl11mLUDYYgFQcN2csnH48TtwzfyqzC5cY=; b=OQPHYzLnCrk1NUMIywnqG9ehyPTG6oQAi+3Mlx/cuqZvIG65JzaLSRtVTEQf8WC6kI W1NU1ZbR0n7yaG/+iT2ZGG/EvZXldfqYUaSsf5w8wHZAfyvTiee1LYl7XnQcp3iZDd6N cVUmJyEOo9iHYbUQowzKsYMxhfksE9QMWuliq5kIrgU3KnEQMawxJHdnGlJk+19OBob0 pU/Nfrcqi9AVzD4/w1XV6567T9yquf4+k1GQerTBTa4YC0BzqKD6yDWiQti/PHJSIbgc NhigEgzXHq/Co3Ff3C71g6721z1M+jU+13pcHXV3NHJAo6YgoQ2e+MOu4UDJOP1KZthB ngnA== 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; bh=Q7hNSOCArNl11mLUDYYgFQcN2csnH48TtwzfyqzC5cY=; b=jwwdbdVgCHISAPzcNBgIJ5E4/TD/0HhMgmNjPIdjq5z5ICT7bQE27ox0wLDmuXCK7F XZF8kBLRTxAvr/SBYrwWpvsCmkQJcLodVdBaTHWcHJ5/WtYDTsiOOP3sbG0EkdP8MDcC zZuiEY14W7OOxu7gRx2fh2O+OBKNY5qdW1UtkeNKfQX7++gvpxDpyDViiHQFyMu0Z3VG 7ErAMpHEYz0geowyGOHAbNKj2ip9UX1EoNWZQIv92wJgQWroiIqBa73n+uQlzyQKagXE cuvg2o7+Nb3CpQ9gQKOPiuaj2OtxNUTMuqwkHLmS8ZkV3Jn62/GSPmfrMIPKJwoK8u70 hr0w== X-Gm-Message-State: ALQs6tDIGP7eBtHZZGMJ0lPWq/GmD3v8g7gang70DuL5sVKHG6Gz0DmC uMi+1SXhjpuT680P+84r+eSQXA== X-Google-Smtp-Source: AIpwx4/7DHecbHRAxbZfqLk6ks0WyZi37/taaNZUya60i6boUuKnROIajG35q5+EhwDp242CG6NMXg== X-Received: by 10.28.105.92 with SMTP id e89mr7598532wmc.146.1522842429546; Wed, 04 Apr 2018 04:47:09 -0700 (PDT) Received: from brgl-bgdev.baylibre.local ([90.63.244.31]) by smtp.gmail.com with ESMTPSA id l41sm11365624wrl.2.2018.04.04.04.47.08 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 04 Apr 2018 04:47:08 -0700 (PDT) From: Bartosz Golaszewski To: Jonathan Cameron , Daniel Mack , Haojian Zhuang , Robert Jarzmik , Russell King Subject: [RESEND PATCH] ARM: pxa: stargate2: use device properties for at24 eeprom Date: Wed, 4 Apr 2018 13:47:06 +0200 Message-Id: <20180404114706.15856-1-brgl@bgdev.pl> X-Mailer: git-send-email 2.16.3 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180404_044721_214829_F1A74A35 X-CRM114-Status: GOOD ( 14.04 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Bartosz Golaszewski , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP 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 Acked-by: Jonathan Cameron --- NOTE: resending with correct e-mail address for Jonathan Cameron. arch/arm/mach-pxa/stargate2.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/arch/arm/mach-pxa/stargate2.c b/arch/arm/mach-pxa/stargate2.c index df62bb23dbee..bbea5fa9a140 100644 --- a/arch/arm/mach-pxa/stargate2.c +++ b/arch/arm/mach-pxa/stargate2.c @@ -27,11 +27,11 @@ #include #include -#include #include #include #include #include +#include #include #include @@ -795,9 +795,9 @@ static struct pcf857x_platform_data platform_data_pcf857x = { .context = NULL, }; -static struct at24_platform_data pca9500_eeprom_pdata = { - .byte_len = 256, - .page_size = 4, +static const struct property_entry pca9500_eeprom_properties[] = { + PROPERTY_ENTRY_U32("pagesize", 4), + { } }; /** @@ -935,7 +935,7 @@ static struct i2c_board_info __initdata stargate2_i2c_board_info[] = { }, { .type = "24c02", .addr = 0x57, - .platform_data = &pca9500_eeprom_pdata, + .properties = pca9500_eeprom_properties, }, { .type = "max1238", .addr = 0x35,