From patchwork Tue Nov 13 14:01:25 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bartosz Golaszewski X-Patchwork-Id: 997195 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="GcvO/Q1+"; 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="IDljafRj"; 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 42vTzc0gCvz9rxp for ; Wed, 14 Nov 2018 01:10:20 +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=+XAsA3jkM+MWbuMS7eV6evjR1hgFP998BEFNzlK7DQU=; b=GcvO/Q1+ygmDic oMG5VUGF6BvvU7VjO+QYwUGz/EkZ353eHS/or9MzEic+ASz26kd3U21WoCy8O6Ca2N8gGtyV8HzqA HKqZ0b1MYJENdpsIt3ZMU2cxrwPmJwlLmp2Nj0jhS9txqdUaAyw/sac0zGantbv38Sx+h+9x/UFjh YdA1XtTaHQsJHBX28p5FZ/Ar4X2Uc3s9AhXoW3Uv3k5yfvXnS3f/B/8Pg5UhX3fyPrnf2GfMc0VV+ XwNstDcUC+3pX/wXG3ncJcCM8sQVEXZjlA1vCE/KRKqpvwfIbV/r7Sj7/q9x5HOWh4oP4hbOR2+Jq PMCoSoaP5zCZ5Bzqd/FA==; 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 1gMZOI-0006gz-Bj; Tue, 13 Nov 2018 14:10:06 +0000 Received: from mail-wm1-x344.google.com ([2a00:1450:4864:20::344]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gMZGv-0006dE-6R for linux-mtd@lists.infradead.org; Tue, 13 Nov 2018 14:02:34 +0000 Received: by mail-wm1-x344.google.com with SMTP id i73-v6so6745567wmd.5 for ; Tue, 13 Nov 2018 06:02:26 -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=sPuMqMq9r2hIniTC2IBiHD0FDPb8NBERuqBhYrjNhTE=; b=IDljafRjAEOauqjxFmN1aBn6PcPzI03ubbHWQId+R0m8iLm5HwH7ZGWm8DF/0zk6D6 8Y+9C5jWPK6BYd/oFQWB6zUQd1b3/QXbcKuqSIMX5uVo6NkhdSuofrD08F3N1cETUgOG mPBe4SwESiWeFOTf4A3iyKd4TbiL1rZTXAGVAY+z3658ZbFky24wuJ9dUHSUjh0tuMmU U5lMPlHr4gDFBSpB4fMTm/uGaDAp0TYEdwcvWNwh4oBPLexahiUYfO9nQ2484xx+INkQ 69IcVq1iuDC/3VIuwOkkh/FGMKa0WNPB86qnO+Az1ECSQjV5pVontyGkxpVUo3a7R2Wf s76g== 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=sPuMqMq9r2hIniTC2IBiHD0FDPb8NBERuqBhYrjNhTE=; b=E5vyDgCFYT/10mCNQrfRZowmX6MFi0Zj5Re5EnmREJeEnvRVm4eRwHCsAMXTjkL8LH xyqmR+/t3xjFfrBbkAsIrswcHdT+yTpVxbvALsAzydBA96yPMwd523f6ybC5RpzXgtII YTEeR3Cyf6gK5HH6+JISK6H7mI7pauIty0ddKm4adUWGDvNQPdz/1PveUk3MiVTapuNq A3/vX1MXpDR/Z/fnjpVopkLiqtjk7D9/bpmIz62bxTn3pNdaMnn6ta2TNCmeBdxxRUB5 OEobhjsenhIMD6jaKQPsh+oF7w7byMxDOloUpDDov5bJQah32EDwcd/zpRl++5RpbYxa aqaw== X-Gm-Message-State: AGRZ1gKT+md7vTLnkryH1pJBg+Nzsm286dnWtf7OPINuBwL/SaJmPX7I /gUpvVweO1QoNnW+1rFUifRohg== X-Google-Smtp-Source: AJdET5ffOXzcrmnj/X9DmPRLspwEQNS02Hmpuhdm53pLYF5ldj1o5KZ1HztDac1HlLqZ965HC/gAGQ== X-Received: by 2002:a1c:38c5:: with SMTP id f188-v6mr3269738wma.19.1542117744928; Tue, 13 Nov 2018 06:02:24 -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.23 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 13 Nov 2018 06:02:24 -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 17/25] ARM: davinci: da830-evm: use device properties for at24 eeprom Date: Tue, 13 Nov 2018 15:01:25 +0100 Message-Id: <20181113140133.17385-18-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_060229_344192_577A278F X-CRM114-Status: GOOD ( 17.96 ) X-Spam-Score: -1.5 (-) X-Spam-Report: SpamAssassin version 3.4.2 on bombadil.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:344 listed in] [list.dnswl.org] -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -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-da830-evm.c | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/arch/arm/mach-davinci/board-da830-evm.c b/arch/arm/mach-davinci/board-da830-evm.c index e52ec1619b70..ddd871d8b44c 100644 --- a/arch/arm/mach-davinci/board-da830-evm.c +++ b/arch/arm/mach-davinci/board-da830-evm.c @@ -18,7 +18,7 @@ #include #include #include -#include +#include #include #include #include @@ -457,12 +457,9 @@ static struct nvmem_cell_lookup da830_evm_nvmem_cell_lookup = { .con_id = "mac-address", }; -static struct at24_platform_data da830_evm_i2c_eeprom_info = { - .byte_len = SZ_256K / 8, - .page_size = 64, - .flags = AT24_FLAG_ADDR16, - .setup = davinci_get_mac_addr, - .context = (void *)0x7f00, +static const struct property_entry da830_evm_i2c_eeprom_properties[] = { + PROPERTY_ENTRY_U32("pagesize", 64), + { } }; static int __init da830_evm_ui_expander_setup(struct i2c_client *client, @@ -496,7 +493,7 @@ static struct pcf857x_platform_data __initdata da830_evm_ui_expander_info = { static struct i2c_board_info __initdata da830_evm_i2c_devices[] = { { I2C_BOARD_INFO("24c256", 0x50), - .platform_data = &da830_evm_i2c_eeprom_info, + .properties = da830_evm_i2c_eeprom_properties, }, { I2C_BOARD_INFO("tlv320aic3x", 0x18),