Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp967927imm; Wed, 8 Aug 2018 08:36:05 -0700 (PDT) X-Google-Smtp-Source: AA+uWPysZcH2ydBlbulkpMQt8Wc7ha7w5x/9bJ1BOVqLg87VLvG6ou0OMp6XxKqy28xgQ1dqolZp X-Received: by 2002:a63:d401:: with SMTP id a1-v6mr3015781pgh.414.1533742565765; Wed, 08 Aug 2018 08:36:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1533742565; cv=none; d=google.com; s=arc-20160816; b=Yqic2wotDU9l8SReywrW7/ivTNe0hgcXmkgykFhNX+ksj0RXGDNwubXa6YukJLngkK DTWugmZazE6RTT3UUT0XsATuGlxOG5skx8+ovwRQn+e380ML8hGJLKMNBU4WeMo9p1Un paUMwwqDvCX6N15EyQhk1mO3iQwoIC4O35cDwpJo3smWu67cJiz22FPOBGlAbtAQNUHL 2Vmws7s2PkNqQnePMc64JGQ0ZNCppRbCOHyyG79iiDnPKq1dd3M+OAtguMDTVrO0q+Z/ /AYcqfKN045huqB3tPJQw5HQI6W0/Sk773ScsB+w8IMrLBctgN32H12mg/rJgScAwwK0 Ofgw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:arc-authentication-results; bh=5BmTvmpqVPdPXiWZLqUzgpWunx/nLJo3Onxdpacg0zI=; b=CLv2Q0JOJdyV3zahVezoWYsaVGJXPG89y3Def2Jd7wE9UTFh4En1KuCgbkFN9OJJjo lMaeK1LdzunOUdR5yJTjFxOmgdaI2UmpW42eTX37UPtPrOCENLwIaBNfcRcqHuokb6ZM BUqFFg3Ca4TU2iP1TlOUWirxbTrFzUpzr1B1M0GJfXg2zUpk8wpZyzJ23MuCpQc8yatk YngqoATupZKnzZY8x22jOA7PBkVg6q72u7/eJ1eJHCE2xF2Uaumxj+uEf+va5ryeJjYp KyuKWVuOkMDEO25dl1DT0sL3wtNhjtdjzMOJbu6elcb6vaiVKM/8b5iEuc+ouDgk3QWf Yugw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bgdev-pl.20150623.gappssmtp.com header.s=20150623 header.b=Kis6cTi+; 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 r29-v6si4392630pff.24.2018.08.08.08.35.51; Wed, 08 Aug 2018 08:36:05 -0700 (PDT) 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=Kis6cTi+; 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 S1730755AbeHHRys (ORCPT + 99 others); Wed, 8 Aug 2018 13:54:48 -0400 Received: from mail-wr1-f68.google.com ([209.85.221.68]:35026 "EHLO mail-wr1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730528AbeHHRyf (ORCPT ); Wed, 8 Aug 2018 13:54:35 -0400 Received: by mail-wr1-f68.google.com with SMTP id g1-v6so2423875wru.2 for ; Wed, 08 Aug 2018 08:34:24 -0700 (PDT) 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; bh=5BmTvmpqVPdPXiWZLqUzgpWunx/nLJo3Onxdpacg0zI=; b=Kis6cTi+w4SEAI/fwvgBrnj472bwYN+eyv3mo4kGmNQZDXxuLvKb94AGGLiHNSluxG 2U8ySAl8kvhqXbe2XhqUaf010LnH6lGXajML/GnE2zBMR1XM77EY31pxw/b1GdGnCZx5 gJOe0IfIUYJkGio9jj5W+yBVZYIlJGQVF54kEeEoMADSIZoHwsXHaBmI9vj7cwYVPs/D i3KLzjafr7kQx93rS+kuCWvz8fPGBU81PxZEPcgXnNzwETjXU43zkWGjIpBDTRBMFyiK DLgcYgpWKxPBpCaCZvyhg/gFXQiVf4u2d0Xs1jOd81NQQj0YaU7PeELSb+8PWjY8TE92 DySw== 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; bh=5BmTvmpqVPdPXiWZLqUzgpWunx/nLJo3Onxdpacg0zI=; b=cLBq6XYBLeUGhWruEuqqhb0Wlh720dEII41SUEAUx2A3SfZBdX2DdQiAOL/FxRLnEg T+Cy2D+jfggLrkdTDaH+xdZ8EItFKw53GlM7QRU9nI+rbKW7K2gkKoKHtJ4Fh4F4fTC/ rY4P2IbD+JfebfsBboG2s8Q/r+cUc5paT5tDdBD+NAwyWG1MyouQE9ctEV1lqyHHIiFy BiwoZI9wU40ZQ35bkv4vsPFTEdhFBwGn645M960ph/m5HTBwZ9I8qA95iPUEru6XGcXl EIQFp3MbjwVP87Yz0+Yg0j5XVtnUIcZnoPWziR7RgUnwqo3mrWS1XuuqkCRHEoYjxZvF aXyg== X-Gm-Message-State: AOUpUlFa8Pr4I2MjEhhfLa3n3lD0q28aORIZS4/8VW6QSukvnQdqPwMc jRm4+UsuY+r+HMbFfdGHL1imlA== X-Received: by 2002:a5d:4d8d:: with SMTP id b13-v6mr2149850wru.80.1533742463447; Wed, 08 Aug 2018 08:34:23 -0700 (PDT) Received: from brgl-bgdev.lan (LFbn-MAR-1-609-89.w90-118.abo.wanadoo.fr. [90.118.185.89]) by smtp.gmail.com with ESMTPSA id s2-v6sm5240915wrw.52.2018.08.08.08.34.20 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 08 Aug 2018 08:34:22 -0700 (PDT) From: Bartosz Golaszewski To: Jonathan Corbet , Sekhar Nori , Kevin Hilman , Russell King , Arnd Bergmann , Greg Kroah-Hartman , David Woodhouse , Brian Norris , Boris Brezillon , Marek Vasut , Richard Weinberger , Grygorii Strashko , "David S . Miller" , Srinivas Kandagatla , Naren , Mauro Carvalho Chehab , Andrew Morton , Lukas Wunner , Dan Carpenter , Florian Fainelli , Ivan Khoronzhuk , Sven Van Asbroeck , Paolo Abeni , Alban Bedel , Rob Herring , David Lechner , Andrew Lunn Cc: linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-i2c@vger.kernel.org, linux-mtd@lists.infradead.org, linux-omap@vger.kernel.org, netdev@vger.kernel.org, Bartosz Golaszewski Subject: [PATCH 27/28] ARM: davinci: mityomapl138: use device properties for at24 eeprom Date: Wed, 8 Aug 2018 17:31:49 +0200 Message-Id: <20180808153150.23444-28-brgl@bgdev.pl> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20180808153150.23444-1-brgl@bgdev.pl> References: <20180808153150.23444-1-brgl@bgdev.pl> 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 | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/arch/arm/mach-davinci/board-mityomapl138.c b/arch/arm/mach-davinci/board-mityomapl138.c index 17b67e26bc0e..be0fb7d17e25 100644 --- a/arch/arm/mach-davinci/board-mityomapl138.c +++ b/arch/arm/mach-davinci/board-mityomapl138.c @@ -14,11 +14,11 @@ #include #include #include +#include #include #include #include #include -#include #include #include #include @@ -185,10 +185,9 @@ static struct nvmem_cell_lookup mityomapl138_nvmem_cells[] = { } }; -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 = { @@ -317,7 +316,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.18.0