Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp4529337imu; Tue, 8 Jan 2019 01:40:07 -0800 (PST) X-Google-Smtp-Source: ALg8bN6NdIqSU+5HZAk9nhLfNwMkbcYvOPv0OP5SGyQTiEFrsUY0TK5zdXD6DSf5KJkHMAM09Gyv X-Received: by 2002:a62:1542:: with SMTP id 63mr1030341pfv.230.1546940407523; Tue, 08 Jan 2019 01:40:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1546940407; cv=none; d=google.com; s=arc-20160816; b=gunW1eKmINv2O5ynx2aTsSqBj3raL0Vh5mgJPz2lIJPc/wGAqJm7o96+kCLGpXatr3 3nJhMjCHxZxyacL3h0n6tbCpsrtTVZVs4GuHhH3zGNqibnGeDw0+wlR94nY6dWyRU69v 7dE7XRylzhY42oElYAmyxZIS2fM78uaRGKRIT8xiwvkII8GZDVRIGKsKJYZ5VCFIdK48 YZ6IUtYfWPhZrWpZiaPzI0v9kLTKMJyOwAStUi092XSEopgp5Q0cGGCFeD62GY770V2L 3j4oXbJTvV6GTPXbidkk9AA+AHtICk0LHTAc6CrewZXcyFIcPn2k/Jgi4kSEIiZvr96p qGMA== 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=hh5b2k/7h0Wkn2rLn6NIi7mvwMbeZ/cPsG4EAD277Kg=; b=jZJZdYFrR0xUqpXQPOvwj6zU4Jzq4XpaTv1wDeVWUKUiUw3IwirGlMynATJNLjtTh8 QSfvbvq+o0Gfvs6ovK/bgmSdkYr263DI5NU6BLIIQ2mMcpb6SMk2c9IpntNnZTskbaqX vi7J/iIwyxMkdWuaaocfGPz0RHqRnK36qpXYHKmeyJjfqjr3m7VE6u/h881jzCRPesH1 geKRA5xB3fD1pTa/gQ2eQ7QL6kx2D/+dVL7oJ5VQTAhQo/tuU4v03zb29WWz2bSk1Wd9 ufKT0RTv7jxJG1Yt6xz2/HerVIOHerx7HsM/PbsLJfhobLpazf1b3MpZICdrEpXpUj2Z tCwA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bgdev-pl.20150623.gappssmtp.com header.s=20150623 header.b=SkoiwJ7m; 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 d11si17718011plo.184.2019.01.08.01.39.51; Tue, 08 Jan 2019 01:40:07 -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=SkoiwJ7m; 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 S1728519AbfAHJRA (ORCPT + 99 others); Tue, 8 Jan 2019 04:17:00 -0500 Received: from mail-ed1-f66.google.com ([209.85.208.66]:39886 "EHLO mail-ed1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728258AbfAHJP6 (ORCPT ); Tue, 8 Jan 2019 04:15:58 -0500 Received: by mail-ed1-f66.google.com with SMTP id b14so3460944edt.6 for ; Tue, 08 Jan 2019 01:15:57 -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=hh5b2k/7h0Wkn2rLn6NIi7mvwMbeZ/cPsG4EAD277Kg=; b=SkoiwJ7mSICbm05UcVobOCupwPj7xv1ZeuUR0Khw9wxNITzWgKNtdimlgv7XTUWAis 2ugNlNJEvdY9KG5yJ9922gDbYhSWs5Nz0ghJwbYqrg2Y51kMeueMvewtjf1UVBc8gaWc M4VV7MPIDiv95So++iXt/5Dlv1ec3R0cYyZeRKB4nPJUSFcz5c6891WOdCbX42Oo42lo p5NvKyBdNhLXTJNFUR+eNNVOkNn6R4yORHZIhX9d+EqjcR3mWEdymo0ZNxDztspCSXxF XB3wFSYErdZYf/WSdhYwIE59inECFrbHcoMCxrrsWjLlcYfiLOIZCDifDpUgJXcVORKn bsKw== 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=hh5b2k/7h0Wkn2rLn6NIi7mvwMbeZ/cPsG4EAD277Kg=; b=jGKCP83wvgnMm9guYMWp/w2bAvxn9pC4pc6HDPBRVbqprMC24/vI2mFvDG4XGr8gxO irVLfYXQE0HC1LT+g5cbLyN7I41hu2e6dd9r9xHdhFVGIDikZX/OE3LlNFuIBKbfS/3D EzWZZDdqrST0XOl5luPez6peOh4UnLrrPVwynpFRvPBDeENh/QEQRpHhJTQpqso7VaPa Pr89KtLhFAslzdhw7euNHuswtVs0+eVkEKc2EMG7/kvvb3vLcN+2yQk9gleF2tpSBEqH uJpWjT0EjsAs5NFdPyoTLU89MSCSTmcOatSuFwsKbanBTZfAw/w2pKHdL7gWc0UcwC8L oGdQ== X-Gm-Message-State: AJcUukf/YaHD0yiYkwROw6b5ZeJlpuv4A9lQW8zG3FdbGKXhAFEvxM9q nK17mn3rJMpELvStxBAQjca20Q== X-Received: by 2002:a50:ad55:: with SMTP id z21mr1310568edc.74.1546938956451; Tue, 08 Jan 2019 01:15:56 -0800 (PST) Received: from debian-brgl.home ([2a01:cb1d:af:5b00:6d6c:8493:1ab5:dad7]) by smtp.gmail.com with ESMTPSA id gp22-v6sm18373560ejb.4.2019.01.08.01.15.55 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 08 Jan 2019 01:15:55 -0800 (PST) From: Bartosz Golaszewski To: Sekhar Nori , Kevin Hilman , Arnd Bergmann , Greg Kroah-Hartman Cc: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-i2c@vger.kernel.org, Bartosz Golaszewski Subject: [RESEND PATCH 06/12] ARM: davinci: dm646x-evm: use device properties for at24 eeprom Date: Tue, 8 Jan 2019 10:15:33 +0100 Message-Id: <20190108091539.16674-7-brgl@bgdev.pl> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20190108091539.16674-1-brgl@bgdev.pl> References: <20190108091539.16674-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-dm646x-evm.c | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/arch/arm/mach-davinci/board-dm646x-evm.c b/arch/arm/mach-davinci/board-dm646x-evm.c index 8d5be6dd2019..02b57face113 100644 --- a/arch/arm/mach-davinci/board-dm646x-evm.c +++ b/arch/arm/mach-davinci/board-dm646x-evm.c @@ -22,7 +22,7 @@ #include #include #include -#include +#include #include #include @@ -364,12 +364,9 @@ static struct nvmem_cell_lookup dm646x_evm_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), + { } }; #endif @@ -440,7 +437,7 @@ static void evm_init_cpld(void) static struct i2c_board_info __initdata i2c_info[] = { { I2C_BOARD_INFO("24c256", 0x50), - .platform_data = &eeprom_info, + .properties = eeprom_properties, }, { I2C_BOARD_INFO("pcf8574a", 0x38), -- 2.19.1