Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp1117330imm; Wed, 8 Aug 2018 11:02:23 -0700 (PDT) X-Google-Smtp-Source: AA+uWPzLylS6OEnaQ2so4Lr4/IHTYXRSDtGUSFebAHp1W57jaBlglu8oOJ+QznlzB+bmfxXIDq40 X-Received: by 2002:a62:4add:: with SMTP id c90-v6mr4055287pfj.23.1533751343902; Wed, 08 Aug 2018 11:02:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1533751343; cv=none; d=google.com; s=arc-20160816; b=NeFW+yZhrV2al7PYosaD7NV+qb1O79B6ds8giZMGLUdcOFTjAPjnWZKNLW601Nbk/o OKBGcrCPRuZeaOHthzIPtlZC8yUDL2Sd2z1OWJXi6m4a33wtwfUUl91E/9rF/xaCCxIP q0b8ktQ9x1pFZ8fGO+GzoUYxGyojzvG91tCjtoK5l43NUyevG0fgoYhP2afe3zWYwSPx dnnzYESRC6fw7cWlU9Bphz1pcQ0qqcd/mVnVjATea7z/IK0F0nSAKLDbWQtU/Cjw5Loj 8CMgyhik8wgA96WqmKDBoRJUdzCbFYdV60EiggHdnCHZkfgXwQXmi2EEcCY6o1uht3bs jb4Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature :arc-authentication-results; bh=4vqmyB4c+FSQSvgyW1IRCwyeON37+EKfaHb/P+YrR4I=; b=0k+J5uYPPbXv2L4bx0G2L4QoJflOVKQd799fpHGyhNFiiVPDgL8d9nub6ijMAyiLff LCWlU7+fuu/gNRAidbHQkjXZdtjB7wkVDbvr+40FaL2vQqRjw82o9gGv7RWJ2CkxPsOb 4zMr9nrYdMe3akp9iTAw8yHdwMdDmyHVMJ3tKEVb/ES8M8KfthpIqpa7eurUJApISx5u 7Bwr0a+nzZNvsJmvTGzYoWapUsXJwTU5OY5yAVKNQCFOLU6/7WKlWistGyDpxZdp5oKe nq1/V3jN2SsGuXlpAz1tQmRQbAWAX+kVu3nerfW5UOQUB7GhgWbAKVhxxJqecu2qNx6s Mw1A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=SVVrQBLD; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n85-v6si5099386pfj.251.2018.08.08.11.02.08; Wed, 08 Aug 2018 11:02:22 -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=@gmail.com header.s=20161025 header.b=SVVrQBLD; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730235AbeHHUVV (ORCPT + 99 others); Wed, 8 Aug 2018 16:21:21 -0400 Received: from mail-ua0-f195.google.com ([209.85.217.195]:37025 "EHLO mail-ua0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727748AbeHHUVV (ORCPT ); Wed, 8 Aug 2018 16:21:21 -0400 Received: by mail-ua0-f195.google.com with SMTP id y10-v6so3365229uao.4; Wed, 08 Aug 2018 11:00:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=4vqmyB4c+FSQSvgyW1IRCwyeON37+EKfaHb/P+YrR4I=; b=SVVrQBLDB+ax5gj6USvNODKGNe+pJWVPX/T4wcSL5OnaxXt/4evWB8U1CKyD8ljb2o TIy5k0fUMLsx44C4Cx57f7tjDV1yZcMJBlvjbtBoXLx+KiTyhBdYrLZXZKlht0jmwgk3 O2H6u402GqNjBz1GFBveeTS5X03/ZhnLx667N8x0janbLxBrq6lXIo2+CmKY4nLQYFul KheKwc2CYwr3IG4LmVAvh8GJCPpEjNcSDAr30IRvxIoSeeZMSS48ap/LgF9gaDMWkEb6 qc4qPMC+dFO0jxkDatqg61eNxlQruqMyFXx91nXUdp093eZPW3fTlPka4KDnbFRKv73u lovQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=4vqmyB4c+FSQSvgyW1IRCwyeON37+EKfaHb/P+YrR4I=; b=iQaa4ffNp1GdAkaDLPa93wAuQeLraHuVGPMviBoQpdkcBtwbdcWx8PuskP1HyY2Uys cmEntYXeeBfxc2hye5s87Idl8XvfDtvUZ6DDf05ls97yPItbndbqIKK8Ni8K8D7J5FEA 1RUn+C4+If9JrHaD4JTy3u1mqx5R3PxeLOwzr3uzsQ0+bbeNX7E/mbcWam9ZQoL586Fm tU11d5QHsMvD7zjC8L1EqVBAvXBPRY3c7Zfyg+qbYyDw2uwqgiMNlfhVUx4DBDCPwKa4 96VKjOBFwJtTdaikM/jAfGlcMbeVNs2OBR2MlEFXnxWa62eUqn8SjeZB9dZJt9VzZZzA 9cNA== X-Gm-Message-State: AOUpUlFFqIrAezAWWJoS22+SIDWQjl8LT1//XH5ZqpOoRdso36Ds9GOz tWrb1RC35cfaJjvYNqHpZErBr95MoexoanXa8ZI= X-Received: by 2002:a1f:c884:: with SMTP id y126-v6mr2452520vkf.76.1533751232571; Wed, 08 Aug 2018 11:00:32 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a67:2149:0:0:0:0:0 with HTTP; Wed, 8 Aug 2018 11:00:31 -0700 (PDT) In-Reply-To: References: <20180808153150.23444-1-brgl@bgdev.pl> <20180808153150.23444-28-brgl@bgdev.pl> From: Andy Shevchenko Date: Wed, 8 Aug 2018 21:00:31 +0300 Message-ID: Subject: Re: [PATCH 27/28] ARM: davinci: mityomapl138: use device properties for at24 eeprom To: Bartosz Golaszewski Cc: 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 , Linux Documentation List , Linux Kernel Mailing List , linux-arm Mailing List , linux-i2c , "open list:MEMORY TECHNOLOGY..." , Linux OMAP Mailing List , netdev , Bartosz Golaszewski Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Aug 8, 2018 at 8:58 PM, Andy Shevchenko wrote: > On Wed, Aug 8, 2018 at 6:31 PM, Bartosz Golaszewski wrote: >> 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. >> > > Reviewed-by: Andy Shevchenko > >> 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"), Missed terminator >> }; >> >> 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 >> >> -- >> To unsubscribe from this list: send the line "unsubscribe linux-omap" in >> the body of a message to majordomo@vger.kernel.org >> More majordomo info at http://vger.kernel.org/majordomo-info.html > > > > -- > With Best Regards, > Andy Shevchenko -- With Best Regards, Andy Shevchenko