Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp5399104imu; Tue, 13 Nov 2018 06:05:37 -0800 (PST) X-Google-Smtp-Source: AJdET5eb4f+22Tz5Eg5iU0vgjyfLrdWGLFQsBaO6pb7A2U5MQ3dM2bqtiMmHmAEJF5BtnfuxQI+h X-Received: by 2002:a17:902:b104:: with SMTP id q4-v6mr5269813plr.5.1542117937062; Tue, 13 Nov 2018 06:05:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542117937; cv=none; d=google.com; s=arc-20160816; b=c9EZurztbmVV4h5Bk3XOV7hGnyx0nqZRLJzZcMcZkaVamxzRXAm/PvLCUFK6KRIDyn iFr/l28V9hxeLGxntRqWF43tu0l3B06y9kYeX5P6gWGCRPf9PS/Qh1BqJTGIuvtba5ZV OgJQs9Ey98Ebm3kK/Sm3Szo6mSxWfgGIkT7Y6cZf8F0fwW5JwnaSJ+1FV8jZK63AF9JJ Gej3ZxFDSuYxczuwKebAHfLMlQwsmPaa++XSMcAboTlOhDwkTg4K7/bMS5jW+X0PwpWF Ppk98xQeup5w+AEhD6ci5buuqKKwHgXeFSb+HtUyGrhCM4te5NXyFD7OaW8keahz3/Jc 42bw== 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=sPuMqMq9r2hIniTC2IBiHD0FDPb8NBERuqBhYrjNhTE=; b=qTj57Yt3UWs+TVD68+zP2wwcnss3fhbOBCtXP5cdv/2V5RkmQgH9AuNxaE33B/F4CZ 3TMq1Kl+eCxCidZQRVY8r28ukvnOrzsq1YBrytPsB+bOGD3L5D334FoM9TChB4l2TmhV qjc1EkPJpCka/OA2+Mkt1DdrUavYp8d2sv4MEafDgzlNVGbGwdXp53txBt/ByA5uyNQH wkiPFX4y/bWeGkVBwrrZwgYtDnQVI6JhGsehXD29DmlRgzAd2RM8if8sI+AZ0BWiX9S8 01QDhrUSDK6ePRGHqIUuCWcB2y4/1Zt/MgqcD8cqfxo/JI8UGIoNWiB5vRbX0ucmNhBm RrfA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bgdev-pl.20150623.gappssmtp.com header.s=20150623 header.b=IDljafRj; 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 v1-v6si20372001plo.134.2018.11.13.06.04.43; Tue, 13 Nov 2018 06:05:37 -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=IDljafRj; 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 S2388048AbeKNAAn (ORCPT + 99 others); Tue, 13 Nov 2018 19:00:43 -0500 Received: from mail-wm1-f68.google.com ([209.85.128.68]:53085 "EHLO mail-wm1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388012AbeKNAAn (ORCPT ); Tue, 13 Nov 2018 19:00:43 -0500 Received: by mail-wm1-f68.google.com with SMTP id r11-v6so12019895wmb.2 for ; Tue, 13 Nov 2018 06:02:25 -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=GE3DIQjSlmbctAfyLGn0KcKPuXIUx0Ry4E9NnlH3CvhgrQJQb/EF6g1rYBGFKlLXd3 hWeQTq2z0IV79MXnPA6scoBRUVAnByRBrDqtnfsjLJ07iptJeiMb5c/4sVripUMI+XHm N/AKcv4yuSMUKXvwxYSAzKCaGuXXywqFUf4dzXjtgsVlTb3jN8qvwX4oFN/ztUWQrqVl TzlD08wzx2+Oq5hMLC15Q9VjctIVoOrh4cSChSUJgfNj408AA1+O/iCgkmCm6yWCjseb Fw3cbTcjVfmGdzSdz2I10MhOdbCcZqh/b+N94Rqum/+XxJfAqjdWypDYt20p4TnN7hSx fHvA== X-Gm-Message-State: AGRZ1gLNIq8VjqTgNmdL4/xxgbvaAleyfyuKNNJq3W/1che4sJIwch/w ybH2fFC8ySABw7Se582oWNFHhg== 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 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 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 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-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), -- 2.19.1