Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp586402imm; Fri, 29 Jun 2018 03:04:26 -0700 (PDT) X-Google-Smtp-Source: ADUXVKK47JHy/5ej3lP0V6hLAV69qa1z/cOCh62o9WQRPlNkrnH8F4GnEALEhkfW96cb7hI2McZH X-Received: by 2002:a17:902:700a:: with SMTP id y10-v6mr14517959plk.249.1530266666306; Fri, 29 Jun 2018 03:04:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530266666; cv=none; d=google.com; s=arc-20160816; b=GjzKzA9MpsCZkTYsKlFr4ionQIMR+WsN9j7gYNANj8WCOsj9bh7+O7tD9kXDMTxIjy G8SHOw4a0SYfkfLk6X8OdIyxD84ThKlG82hn4vKEdHddmJC6/yevg5TeuLeqrhVEEeDh FOJOha4Sz9RB6NmmpKr1Db+vPCavePuKgAkToVKrGngM2M4E59wKrQ5e85t0Qr+orB4R MYCfoYinzE6AFSLkXNsm2oD2lyHM5fmAvboeWymmcUQqaN8Y+JSDDcSAtpONCTKOdstc D5ywoa2z7XKn9AEa2jQ5lO7J7XirgddU2vnnIyTHc3lfb5PXl4Wog/ARZ80+OBrTYHDw 2/Og== 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=lfsaVkyOCkKnfk4OcZ4zCb05BERfpaU/u2IQUf/oijI=; b=jrFSlEh9Y6B2AlpZz/bV2+D+cfJ9hWOAcFASOl0XLit3vuKElBkvMeZWSefQkEriUO cQ70N37+gOOfZjz4gD43WD+o9V2rhhL3v7hBuUDsffKI5SXkzbur9kLCXDqtF4pbY+MF I9vjTcucFXLO7q8EYWXaquk6WhD26YYU54bvABMPRpQHCqKxB7ENR3tAMMCYp6egaZq+ IBvN+IQEs1znBhS4NTlCFuFB8hmGM99Zn608tN9oarXvlvcThFBRwQgJkd2vUL5iYZhD NDWWBTigJb+FG02al7VEY8AGlumzkrJcM1/Y+XWDNDsnM15G1mggfFvBjNz4TIKXUNKZ ATPg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bgdev-pl.20150623.gappssmtp.com header.s=20150623 header.b=CTHB5EMr; 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 t5-v6si5804405plz.286.2018.06.29.03.04.11; Fri, 29 Jun 2018 03:04:26 -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=CTHB5EMr; 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 S966616AbeF2JmK (ORCPT + 99 others); Fri, 29 Jun 2018 05:42:10 -0400 Received: from mail-wm0-f67.google.com ([74.125.82.67]:50292 "EHLO mail-wm0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S935787AbeF2JlF (ORCPT ); Fri, 29 Jun 2018 05:41:05 -0400 Received: by mail-wm0-f67.google.com with SMTP id v25-v6so497750wmc.0 for ; Fri, 29 Jun 2018 02:41:05 -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=lfsaVkyOCkKnfk4OcZ4zCb05BERfpaU/u2IQUf/oijI=; b=CTHB5EMrCvEVYe8P3MALhMiSHnJVXg9paIFpUL9+sMLlEGOtYC/Ufgnx65AcXV1R0Y XuNy5TEKyBFBsxS+AG2fapX6AI4gU2cqI4SrDueeJhdUvNzfTlpUEF7tC4CcWEU0SSfw 7xLTNXNyST8670njVC4ZAk8yDKmlFJb2kWeOcG1tlz4t1IownSfuYMStV4gM0IjoldNI 0Bn4DTb8MV1Fj+B3+Amor/chn1LZLOamTbHNRXg3TdwRYBubc3MLUooQWgV1ryZquTyE DeE/Jdk+mjcMYiwQDsbd7GY4XMwUTEpgotcBSdwvqnaqmQOvVPBqMU8bOCQzqovnkvk6 fJiw== 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=lfsaVkyOCkKnfk4OcZ4zCb05BERfpaU/u2IQUf/oijI=; b=JmEvB0qfccKPAc9zjI0Ccw/fjvb1tuA4WKHnwpj3CGvcrrC+MRtwQxU+tY+9+84Osy 6noCZZg/unI/ZJeG8BgFfedlTtZqnUiVZT3ybcHyQ+YbSXPLvblWexHYsPlloIv71CXp Eo5+C7EJE2ysRUd7kA7bcZvzu01PDdFgWno55Dd1tOg8SrdSMRXOoXCTsUq9iLsG7yEC LdX8ZeNesWVnPj0ZEWGkfScbQzlXCW6O7fJPuPOlkxDfHz7Y0NkGTO3nlYbiYUq27tZp Qtruvgr6eqyREoUiVbHEMzlvU3TWyj9aqXlf/lh9AdNHF5pIKOmln4mu4mp7YAPaY4FS MFug== X-Gm-Message-State: APt69E170G47LSF8UptlSNeXkN+HEgoNAjf/lyz9/Jsn+kxXEWax475E moxVO0tYSA9Hp1JL27vXLYlZzg== X-Received: by 2002:a1c:8893:: with SMTP id k141-v6mr1221777wmd.133.1530265264555; Fri, 29 Jun 2018 02:41:04 -0700 (PDT) Received: from brgl-bgdev.lan (LFbn-NIC-1-55-10.w2-15.abo.wanadoo.fr. [2.15.147.10]) by smtp.gmail.com with ESMTPSA id d102-v6sm1386394wma.10.2018.06.29.02.41.03 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 29 Jun 2018 02:41:04 -0700 (PDT) From: Bartosz Golaszewski To: Sekhar Nori , Kevin Hilman , Russell King , Grygorii Strashko , "David S . Miller" , Srinivas Kandagatla , Lukas Wunner , Rob Herring , Florian Fainelli , Dan Carpenter , Ivan Khoronzhuk , David Lechner , Greg Kroah-Hartman , Andrew Lunn , Jonathan Corbet Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-omap@vger.kernel.org, netdev@vger.kernel.org, Bartosz Golaszewski Subject: [PATCH v4 15/18] ARM: davinci: dm646x-evm: use device properties for at24 eeprom Date: Fri, 29 Jun 2018 11:40:36 +0200 Message-Id: <20180629094039.7543-16-brgl@bgdev.pl> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180629094039.7543-1-brgl@bgdev.pl> References: <20180629094039.7543-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-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 5a9de47bc8a2..5049f0c6cd1a 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 @@ -320,12 +320,9 @@ static struct nvmem_cell_lookup dm646x_evm_mac_address_cell = { .nvmem_name = "1-00500", }; -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 @@ -396,7 +393,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.17.1