Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp4512974imu; Tue, 8 Jan 2019 01:19:07 -0800 (PST) X-Google-Smtp-Source: ALg8bN4RHk6o7Tau6qmnDIfSxyN+Fh/T7LH7U4seFmdfW1fIhcIPKoax6m50BXEKfFrzYYzMJiy4 X-Received: by 2002:a17:902:9305:: with SMTP id bc5mr983491plb.86.1546939147473; Tue, 08 Jan 2019 01:19:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1546939147; cv=none; d=google.com; s=arc-20160816; b=0yBy0nD77k+kLJKS1ao2w33HJNXLRjV9Q+jgkpHGML8rwu/9EifglLaKTlnVv3yE27 fD7ktjgYbYOaMkQfShQMhEsDaCqmuVof2E7FptwiXRbWoHt+SFhZr+UUiyPMeJj05ha5 GQPEVf/kgeCIennZx57/jxCnkoi+rQ00s/xni01yqvBAZrSLG0yoalHQp70VsdvjoW08 HzuV4MBOUmGWyB8UFY3ynlCcDBvpkbC3x/btcaaO3T9wmxDaxpv/c7Jy6sr0nMyK8863 r4qzCQLIUO6Qm9tCztx76UswfS+TMiNfQB1OSv9LUlQJEDwfjSN8BiBwYyKDDPVkvO3k /d2w== 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=oXTGXgrClMlW8LabyP51oPTHLt1d9TPP5bN7Oy9yaTQ=; b=BGuRnKPpuGc3zXJrzviRdpGL62IX5FdOsET920eYZEWVr4TAvscwQNV2eHoWJADroa 022rU0UWsIG41CVh+48xoy9GGQIv9u4fsr0Qd9UBc0uFw5Vj1gkF3vI3nF41gGujBidI uDyEHAgWttQ1u/vdUM4B+IPnCpJlI7uK3ou15QYAqJmkkumQnXffPEZjAb3E9QvrpqHb PR0CGR5D8beVmy5ewRViE+pJfr0+lc7C6aqUuPcZN7zs5vX9uXM61VYQFYydzzgh7KJT FNqyr1AV1FV5MNgJLmxG/t6LlwX8MNjxFeHmx229v5puKnZztITjaMNaZUzPzs/C6VAs Yz2A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bgdev-pl.20150623.gappssmtp.com header.s=20150623 header.b="Fu/QOCWK"; 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 p189si29981610pfb.0.2019.01.08.01.18.52; Tue, 08 Jan 2019 01:19: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="Fu/QOCWK"; 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 S1728446AbfAHJQb (ORCPT + 99 others); Tue, 8 Jan 2019 04:16:31 -0500 Received: from mail-ed1-f68.google.com ([209.85.208.68]:38275 "EHLO mail-ed1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728336AbfAHJQF (ORCPT ); Tue, 8 Jan 2019 04:16:05 -0500 Received: by mail-ed1-f68.google.com with SMTP id h50so3458114ede.5 for ; Tue, 08 Jan 2019 01:16:04 -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=oXTGXgrClMlW8LabyP51oPTHLt1d9TPP5bN7Oy9yaTQ=; b=Fu/QOCWKaQzM2CCroguKhoRNbbqYVmumF4ev4NEHPxj7T/7yCHXXnkIVLB0hTrpukK 1t11LaomRucyU3qot62gzR0r9TZZAHscsL5atPEX+Ngqsj+xzuykuNkXPZjkVK/v8G5Y om0lBoJtgLINU53aB9oSllH3KUr19uT2CCGKp/LG0OGrXa4ermeZ20jhiKjrNcTx4FNA LD7MyuFMtLpw3w1vFGKSxd7Rr33nRYgCx5IhtvRzoO01e1RWawuVvfIB5XQdmxnwnmrh VPwt672T7X0qIPlvqwPHVNUTKby3uuhKSV5l5RP2Xrr7hGCChClmb/wgHw1bbWNJkxnJ mUKA== 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=oXTGXgrClMlW8LabyP51oPTHLt1d9TPP5bN7Oy9yaTQ=; b=fC/AlAMZpA9wFI8AHoFSSqC1MFi9hOQb6RkHYfW6irWTV9oUBQTijPFkYx1nkfOEWT TgDzRhLLL863te7NARh57N+gNVanqwhWUhKMrwANcr+AGklTpecn+bYtsolaPfIvMJol OPvSbr1KAEHGPmG1bjwIy8VequucR0vIDD3nzefO7s5b9TkCPSeelYpsPrHX0R1GOS1X f+3axOZRWkJuk3ofegcliHHEACV0HLfhEHqGVQHKL8hhECtiDKu1bRaQf8e6RC4CQqy0 jNEVN//fxFYy0hxuv+AMPp5hVMoacAoS1f9T2lF1FbTE/dbCmsC49vOYDdUNaZe7er/B BnZg== X-Gm-Message-State: AJcUukcXx+dnnpe56sQKQg9C/cEgLBDMxXIvu3wdDJcKXMOqPT2ImFzy MZ6DwMxl+PanLMDXiP4S7GXDlQ== X-Received: by 2002:aa7:de06:: with SMTP id h6mr1274531edv.137.1546938963541; Tue, 08 Jan 2019 01:16:03 -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.16.02 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 08 Jan 2019 01:16:03 -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 11/12] ARM: davinci: mityomapl138: use device properties for at24 eeprom Date: Tue, 8 Jan 2019 10:15:38 +0100 Message-Id: <20190108091539.16674-12-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 --- arch/arm/mach-davinci/board-mityomapl138.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/arch/arm/mach-davinci/board-mityomapl138.c b/arch/arm/mach-davinci/board-mityomapl138.c index ac1a1699d185..a381b26328d8 100644 --- a/arch/arm/mach-davinci/board-mityomapl138.c +++ b/arch/arm/mach-davinci/board-mityomapl138.c @@ -14,13 +14,13 @@ #include #include #include +#include #include #include #include #include #include #include -#include #include #include #include @@ -192,10 +192,10 @@ static struct nvmem_cell_lookup mityomapl138_nvmem_cell_lookup = { .con_id = "mac-address", }; -static struct at24_platform_data mityomapl138_fd_chip = { - .byte_len = 256, - .page_size = 8, - .flags = AT24_FLAG_READONLY | AT24_FLAG_IRUGO, +static const struct property_entry mityomapl138_fd_chip_properties[] = { + PROPERTY_ENTRY_U32("pagesize", 8), + PROPERTY_ENTRY_BOOL("read-only"), + { } }; static struct davinci_i2c_platform_data mityomap_i2c_0_pdata = { @@ -324,7 +324,7 @@ static struct i2c_board_info __initdata mityomap_tps65023_info[] = { }, { I2C_BOARD_INFO("24c02", 0x50), - .platform_data = &mityomapl138_fd_chip, + .properties = mityomapl138_fd_chip_properties, }, }; -- 2.19.1