Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp5400659imu; Tue, 13 Nov 2018 06:06:48 -0800 (PST) X-Google-Smtp-Source: AJdET5eDfK/uLrhgiUKPUFR+SKtVbCujywZn/xQyerrtyLlO5/srVtfb4yWq4FqpXJqyKK/v8DD3 X-Received: by 2002:a63:8f45:: with SMTP id r5mr4865439pgn.222.1542118008573; Tue, 13 Nov 2018 06:06:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542118008; cv=none; d=google.com; s=arc-20160816; b=PHZjxfQzODZ/xh3uforGUXnILQZdl1IWTEzzJmArCl277Ao1cL8N+VpgKv9xv5py57 usJcO+vrL27y4hKmIIh2igmShTG1OPwOggo8gLZLm83VljoiE7acO4vVJq+eXLDLWvfa UVH63pPWASEyQO4j5zNr13wuyM2IU6ra0ZFsK8oU5FHlUigNighFVqMRJc35z9SuwI7y hR2kCXPIYwGITZJTgxinSHkQaupIooNjZgbJtoF42GDsfTcrNKsrvFQ1aKl6RceP1DZq nSM3ot4p4mfLfnfuGhitsPQaIDGrKIhBT47GFV4sXmLUAROqt7qu1ONahGOVtvdf0r62 DgQA== 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=ztnUf8638FUSA3Znei2oPXxpgrZCrlfwVxJL7f5VqxM=; b=tYGaWLX/nP2aSn3nHMiS3pXtI0gxR2kSzspXJdXcbwcD/eO1rcLPfZS8RuihcqJh9o HP9W1q5aolsXI04ifCK2AMNU5ufuuTVmnA5i7estlo/bi4g76/zJRcxw0l09+56iI2pS /jdXkUtwT5qtblhzf7ed2NrrpLSekfyO7bdap+k7fSaJqtdELT5qi2BYSLFO6ZbVoSfs cOAUL3ghfKYM3W46hPGKgH43CxZLRkeiMgs+WxbYBruCz98W65GN04s+uVt16CbpwVZ1 ep8BwAiAKhG9YzYIy7IzrJHPeI4nZ0gcQyVCVuUDcWNlpTOROqzTKbeyYHK2nS8euEPC R3sQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bgdev-pl.20150623.gappssmtp.com header.s=20150623 header.b=zZ2+34Dg; 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 o9-v6si11122432plk.434.2018.11.13.06.06.05; Tue, 13 Nov 2018 06:06:48 -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=zZ2+34Dg; 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 S2388125AbeKNAAw (ORCPT + 99 others); Tue, 13 Nov 2018 19:00:52 -0500 Received: from mail-wm1-f68.google.com ([209.85.128.68]:51414 "EHLO mail-wm1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388097AbeKNAAu (ORCPT ); Tue, 13 Nov 2018 19:00:50 -0500 Received: by mail-wm1-f68.google.com with SMTP id w7-v6so12037909wmc.1 for ; Tue, 13 Nov 2018 06:02:33 -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=ztnUf8638FUSA3Znei2oPXxpgrZCrlfwVxJL7f5VqxM=; b=zZ2+34Dgw8tffkWguG4iGMsMH70bbh6uhUNdkKwDhFjL4IRxWYrOU+2yvIBpAuTHZx 4xh5JA1UYHCUlYMAkx/bJ0Dl573316D/C8p4BroweHER1WfBAnp73CxyfRQ8x2N81O/l 57HLn+U1/gQ0dRAKmgtEW4XmL0/PGfjW5IIEd0Kodi0H38dOQyJWnUpGobPQ7nFSvSg+ S8o+glqZDkMR+y6PgS2rlmSF72xcTIESNGIPQIh/5lvlUZcljPRALzpcRXrDrDFNpARu 3nL1DwDRcjN1u3nic0kAru5TCge19MNd02RjoKwGXljpk63ecdA9Lik9Wc0W9IyR0AQ/ xIwQ== 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=ztnUf8638FUSA3Znei2oPXxpgrZCrlfwVxJL7f5VqxM=; b=FAAZcbHBQ+0F1WSxPVMzrKPbvAcbG7WVUpVKmQYC8J8IyM9nj1x4/g+D9Y3Z3toDXB zKwzfRDbjvQ7852JL31x+EiL2P42Z4qeqk4A/Bgk7NXcb8/ilCKKa/xTOfRb94/OX/gd 3Edn3NI1V8iFVdX6IbfvoYHulsUpuaaMqUjRjIXmBLFqUMUZVnxJo6iKed/mlYkJmogH z/fryq+xYabkGAZLXt71W0xzJajiv/3RCyJbpduMF2npaPdauAyB6cnBPNjnDU0TN7Yb mSN7CNuNxDvjiHpQnWxxnLQxknIfje/Pj4vdc+PmR5kh/jVNdhlFjbUm+Heg4Dnh8d29 eHeg== X-Gm-Message-State: AGRZ1gIvQJnDllm30km1SeWDPMqA9ssP0sGFLrLUnMx3vEPMWCG5Jpdn DQTvT5BUS1vwWLr2HSitJnEAXg== X-Received: by 2002:a1c:e3d4:: with SMTP id a203-v6mr3298181wmh.16.1542117752512; Tue, 13 Nov 2018 06:02:32 -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.30 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 13 Nov 2018 06:02:31 -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 21/25] ARM: davinci: sffsdr: use device properties for at24 eeprom Date: Tue, 13 Nov 2018 15:01:29 +0100 Message-Id: <20181113140133.17385-22-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-sffsdr.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/arch/arm/mach-davinci/board-sffsdr.c b/arch/arm/mach-davinci/board-sffsdr.c index acd9778ffa07..ff14de1396c8 100644 --- a/arch/arm/mach-davinci/board-sffsdr.c +++ b/arch/arm/mach-davinci/board-sffsdr.c @@ -26,7 +26,7 @@ #include #include #include -#include +#include #include #include #include @@ -92,16 +92,15 @@ static struct platform_device davinci_sffsdr_nandflash_device = { .resource = davinci_sffsdr_nandflash_resource, }; -static struct at24_platform_data eeprom_info = { - .byte_len = (64*1024) / 8, - .page_size = 32, - .flags = AT24_FLAG_ADDR16, +static const struct property_entry eeprom_properties[] = { + PROPERTY_ENTRY_U32("pagesize", 32), + { } }; static struct i2c_board_info __initdata i2c_info[] = { { I2C_BOARD_INFO("24c64", 0x50), - .platform_data = &eeprom_info, + .properties = eeprom_properties, }, /* Other I2C devices: * MSP430, addr 0x23 (not used) -- 2.19.1