From patchwork Tue Nov 13 14:01:29 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bartosz Golaszewski X-Patchwork-Id: 10680795 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id D6A70139B for ; Tue, 13 Nov 2018 14:13:35 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C483428756 for ; Tue, 13 Nov 2018 14:13:35 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C19B7288E7; Tue, 13 Nov 2018 14:13:35 +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=-3.6 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_LOW 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 526732855E for ; Tue, 13 Nov 2018 14:13:35 +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:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: 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: List-Owner; bh=8o1MPyeuG1KrmxmIFfKYeb3kj6bClhptXX9F2su7ZIk=; b=fNbED8AOnfsTUV JLa9E5bHHiqWajAUmAZIPgSRzAYr2fST8o4qItRCst5Q5lux42tIpdiZ/4cBKHUDEr3QE40PQ+Uib ujIHMQXGWOD933oyzjOcDuvEgWLVFMxaSTDU4lAwczPaM6Zaavz6h5J3INxG9wQcXReC53bYqkapw Fot8JPYedGL5GC5K8Gfctd55yPRwDiB5hQ8x0dsZpH2hsIanzmsvSM6hZW+RMm0QzL8BVrhrRzVsv qaYmUB/6/X7RQg5/rKxJbcVucFfh987lvdU7IFlE5QNA0AR6nKEgqgRnsaOvz3lrB2dJ2oqg7oS08 KWZF8gXzqbvdS1NqsCpg==; 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 1gMZRW-0002R9-De; Tue, 13 Nov 2018 14:13:26 +0000 Received: from mail-wm1-x343.google.com ([2a00:1450:4864:20::343]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gMZHA-0006m8-5V for linux-arm-kernel@lists.infradead.org; Tue, 13 Nov 2018 14:02:45 +0000 Received: by mail-wm1-x343.google.com with SMTP id r63-v6so12091332wma.4 for ; Tue, 13 Nov 2018 06:02:34 -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=s+KGqPqUAHEaQ5NMe03B1iWCN58o3wi3ncvPQOhSOBiQx3iFreQ1oojtn7H/rCLT9e skEa7BlFdplDWbE9wJr1fEsRL59acETQMdQcuYaTE5L2oFEnryXJlN1VYnNXyrciwnPf xUT0cN5z/ujN/YntaGIhc1dBoacVqkJj8nWTSPk7+58Rv8WTEbpHx4TeUyJoX+H6xvLW rl6jaCDZwDEgOFn17gB51ppnBwXZgmwjAqTseRSXZXxTd6dYVp92lcUXe25DpoJKTV6d RLSqycpjE5agceemgFWP18460/jOPcI0jMkwRizq4RjpdMwBUUEN9B6amnE9Ap1NnsLL A9dA== X-Gm-Message-State: AGRZ1gJTVFOPC/O5BYTOhRMNdpHnzWCGB7soSZboJ1TKGdAJFOjXpvbi x5ORKtfkGcgzqpW4x2dxS8b0fA== X-Google-Smtp-Source: AJdET5fZDtnaImMGTTAvHsDmPnjEU9pLpWpgoZ9sBGQD4RDKI5fISFfh8jg9ZcLoSmrmKmjrcKTJ9w== 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 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181113_060244_213686_20BCCE4A X-CRM114-Status: GOOD ( 18.60 ) 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: devicetree@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Bartosz Golaszewski , linux-mtd@lists.infradead.org, linux-i2c@vger.kernel.org, linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org 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 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)