From patchwork Tue Nov 13 14:01:26 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bartosz Golaszewski X-Patchwork-Id: 997212 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.infradead.org (client-ip=2607:7c80:54:e::133; helo=bombadil.infradead.org; envelope-from=linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=bgdev.pl Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="CcksLsVR"; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=infradead.org header.i=@infradead.org header.b="G9qCeshh"; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=bgdev-pl.20150623.gappssmtp.com header.i=@bgdev-pl.20150623.gappssmtp.com header.b="w014nPI1"; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 42vV3n2Hb4z9rxp for ; Wed, 14 Nov 2018 01:13:57 +1100 (AEDT) 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=8wK9k7BhAgF+x18jAhaJH1Ob0ldxozumVsOcZJ0nCSw=; b=CcksLsVREqODxT r5bzdeXDZlmodWqyCMESNF6Wx9LxBT06JasF24hLprpX9KwefTRTbR2bqPQTAcQAP33O+ynFIUDnK keeLv8BZj9IKsK1QpbODzaIQU599oIHtoYoQ8C2ZumvlxGIO98S0j47aqJ4YeNSlYJw2QRAdluHZx gl0RiYaUKWfeKwliwuTmlweNI/StxJCgLrWc0/z2r7qi1n7R0LwXS3aYNKVAGvGomNqIwEI39dsky kqJdNOkjPbrWmumldyErfu0PZ6rj0dL/P3FEBm2jkBaFhlQ9LGa/TeLClyhmaDBEI22DdS8FFcUWD yPfZGjoVeoK7pyEoWisg==; 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 1gMZRt-0002kw-Qg; Tue, 13 Nov 2018 14:13:49 +0000 Received: from merlin.infradead.org ([2001:8b0:10b:1231::1]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gMZHB-0006xh-QX for linux-mtd@bombadil.infradead.org; Tue, 13 Nov 2018 14:02:45 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.20170209; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To: Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=NtdPGnoNcOA+uAMeykOlFvJi5M25GSj2otU8Jlp5mq4=; b=G9qCeshh1mUGkChsjF53xNW/EK JsFoYd4JQ2h2cktWDm7NQUxc3LrQ0SeLD53VkoIQWtvYP4yvRelHOuuIqzQ90iQve/kO6Cp/5Q5i1 0kmxLi39NFIhthMlTbG2ZhhNTruRPIJq9Qr/jH9PhaRZjGGO3o6Pg7ROWdjoFVwH1ddkCLSPWGf6Q /K6AyvymuCgKRcC3AD/djVYIn9sXMA7dmeqAc2U9CUGVseRzl7nWBIuEDPYbLJyxFiZ8w6vmjTcBG eLxflaxMQKfq01tYWksR+5ftfr1JNnYYs+VJApuGKN3f2Fc2oNcXab9isNRtSAuLOZw78SRYOVyXJ 1dxkBiSg==; Received: from mail-wm1-x343.google.com ([2a00:1450:4864:20::343]) by merlin.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gMZH4-0005FU-GN for linux-mtd@lists.infradead.org; Tue, 13 Nov 2018 14:02:44 +0000 Received: by mail-wm1-x343.google.com with SMTP id f10-v6so12018705wme.3 for ; Tue, 13 Nov 2018 06:02:28 -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=NtdPGnoNcOA+uAMeykOlFvJi5M25GSj2otU8Jlp5mq4=; b=w014nPI1uJ7XLo9ncewVaZ4F3wu8fqdaXRgFGCsxn5ZsTiXFGgW8T+bc8vpPfzKJx8 g8vkxFQ2VzBmEDQ37zLwng0EVbgn0Z5b4Lr4vSmo1oQcaDy/PmrITZ/b8MXCbarvNwzP f/OGvH4iIKmWWo9ibBjb1LRaD43qlMciij1OCUqjM/XjMJ2nLJ8Q+mylydEHvj8l8Jgp 7789G2xZdpCi5eYrMggu+ZglSi3o9lCnqeVYnS0X3fdFuv27r3gkPCdTNX27PPJzS5Xv 3+vkukmuOlvhkZe2B0WlFmC/WS413912TxnPtz/uqEv19c7D2sFzO8NGpr626Nmrn3EQ CWdA== 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=NtdPGnoNcOA+uAMeykOlFvJi5M25GSj2otU8Jlp5mq4=; b=muIol+3HRisB4gxeiTCValkdQTd/1c8ffTEkW5IQOeMXrMyc39TIard4+mN91dfJUT KcJxAsOPU/LbPdopoJ8Ln2f/KjtigaDZ7ST9ANGILeFQUXstmuPBXvDQUPwdBu6BKOCk S7UX7ubDivLIogk/oWGwgRcFuHJzmfDl0UgY+pNsBRTwQ8fN1hYZNOkhGOJw8OT+4eRU N6q7rmydBhlsI1w4mVgijB7rudjipy0gH4mjuFKPP+ZUyGCTkpygUZ8+M+61E2ymkma9 /Q+bEPUXByHVyvI9t9LnzgKDZ0wufd3nfK8+hZM09+6WvS4B1Qjq4j+CfgVrih9CID6S dIjw== X-Gm-Message-State: AGRZ1gK870zAj5PUHsPCQ4n9qvjHBWgQb80zrsHaqKCWXH4bWTiYHcxZ +SL/0AusSibzXbNs0uTk6U1goA== X-Google-Smtp-Source: AJdET5fLy10Q+h27Bzq/mjdp88BBAVLtFCdLs2zd+Oh1qCRYRTe/HiO6Yxd4u0R30FeSSyuhnJgtbg== X-Received: by 2002:a1c:730b:: with SMTP id d11-v6mr3320577wmb.107.1542117746750; Tue, 13 Nov 2018 06:02:26 -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.25 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 13 Nov 2018 06:02:26 -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 18/25] ARM: davinci: dm644x-evm: use device properties for at24 eeprom Date: Tue, 13 Nov 2018 15:01:26 +0100 Message-Id: <20181113140133.17385-19-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_090238_560899_51DF714A X-CRM114-Status: GOOD ( 17.99 ) X-Spam-Score: -1.5 (-) X-Spam-Report: SpamAssassin version 3.4.2 on merlin.infradead.org summary: Content analysis details: (-1.5 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [2a00:1450:4864:20:0:0:0:343 listed in] [list.dnswl.org] 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -1.5 DKIMWL_WL_MED DKIMwl.org - Whitelisted Medium sender X-BeenThere: linux-mtd@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Linux MTD discussion mailing list 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-mtd" Errors-To: linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.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-dm644x-evm.c | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/arch/arm/mach-davinci/board-dm644x-evm.c b/arch/arm/mach-davinci/board-dm644x-evm.c index e1428115067f..efe4e170e87d 100644 --- a/arch/arm/mach-davinci/board-dm644x-evm.c +++ b/arch/arm/mach-davinci/board-dm644x-evm.c @@ -16,8 +16,8 @@ #include #include #include -#include #include +#include #include #include #include @@ -532,12 +532,9 @@ static struct nvmem_cell_lookup dm644evm_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), + { } }; /* @@ -647,7 +644,7 @@ static struct i2c_board_info __initdata i2c_info[] = { }, { I2C_BOARD_INFO("24c256", 0x50), - .platform_data = &eeprom_info, + .properties = eeprom_properties, }, { I2C_BOARD_INFO("tlv320aic33", 0x1b),