Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp968997imm; Wed, 8 Aug 2018 08:37:06 -0700 (PDT) X-Google-Smtp-Source: AA+uWPw4MIOYcIM10a3bQMIBWcGb9LQ7gx6XqyX1sk/n3AFNdsgIDaqX31SOaiyS38GJ2FKgpxXR X-Received: by 2002:a62:3952:: with SMTP id g79-v6mr3499348pfa.133.1533742626047; Wed, 08 Aug 2018 08:37:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1533742626; cv=none; d=google.com; s=arc-20160816; b=QOPRvN1GrO35jh4mYHS9nTacjeq+pClCbiL9yQ4BLcRWdlEqtMzbnvY70uO1zf6VvH 5Ia61Zq4igakCnWiFd1oqoYr0JiEebva9UCbZAj0pu66kVb30KCft753rCrx9hST7Luk /1QQeENGvx+x9O52lnYLn2aRo5tLt+ZaYX9BfCwPgDCIAhuyJ/dS0xH0Wxf5ndl30Cei hMb7mQtFSNeve8apqGKV/pXYip2ABlnDIUeV4+WqLJ8RdXgDhQ9qe+OTbG5egBexO7EI 8GGFujiHR7ddcChQdIIdCyiiZLXq1ALI/Qtw5GnyRjLBoyoA2s8ZbuCCeDERxBVVaFhk CBmw== 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=dK61Sm/OZ4gXBZLrnJshFkdxHXIagaw+2DY/FsoCvvI=; b=izDVAMJaXIMKQvGjC5dDGHTAjFsFg6obtM5kE8yWEeF1sa0qL4DWOyrxqV06Y0Ju4X L6kEDc1L1lcB9YsPpWPnOVylld0WEG0DjwjpaPJ6u2mxetVf54VAFc2TRcmkMgZDvUCw 7oMd/Jto1oYbn6rM1gxWW3eSvg7Ta/wfAMBcLD3XH4uwUfxiGAALL/NolXZzkuCu9jUg rrivLe//HCp9y2XjMuIHorBnD2ZbqL6TZ8vtUWSW5nxcjbdkwRCl1Ju7NU/DL82fUrvE IJttIZflRLFBZ8ONesSsdiptKNSG2zRpqvc7qHvn+uJjIjxVOfLJF356H7luTJdTcbOW mQVA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bgdev-pl.20150623.gappssmtp.com header.s=20150623 header.b=wx8KUUpD; 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 e11-v6si3429009plb.373.2018.08.08.08.36.51; Wed, 08 Aug 2018 08:37:06 -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=wx8KUUpD; 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 S1730235AbeHHRzN (ORCPT + 99 others); Wed, 8 Aug 2018 13:55:13 -0400 Received: from mail-wr1-f67.google.com ([209.85.221.67]:36251 "EHLO mail-wr1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730232AbeHHRy2 (ORCPT ); Wed, 8 Aug 2018 13:54:28 -0400 Received: by mail-wr1-f67.google.com with SMTP id h9-v6so2422627wro.3 for ; Wed, 08 Aug 2018 08:34:17 -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=dK61Sm/OZ4gXBZLrnJshFkdxHXIagaw+2DY/FsoCvvI=; b=wx8KUUpDrXR1Yk8TEQeY2WiyIeyoTJOeBd43Kz2X1m8jbY0l2rDH9rnaauh6kSiv5d FctheraTETsKIZy1woSQCbBbz0MbtAMtsSZrioYwb9K9bTUyZkitk6VPRyE84NwAbpom kCqS7oxgxKj0m2OKqf8DxC+gaY/r6LiIHfzO9/m7cgo95buiVQ7nvrbd6FJtqEL9cmhR r8CATQ6/MB/ZxhA6pNVStq1a9fcXHNuGZywEdskRH3LLQKg+LR7j7XjU1UxOL9De6W6O wNr2H99NmVWD0ijZ3vxgUPYXe0L92typj+9+KxDNLWyC8aSqFdg5PDaUXzBmWdPAkiAJ qCMg== 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=dK61Sm/OZ4gXBZLrnJshFkdxHXIagaw+2DY/FsoCvvI=; b=YcDOn1cpIR1EGnW5XVPgU2nIfZzf/0CgXavnF4Xlx+tnd6S84pT/zKZ9Cmjoj1xx1W 3CqLNUdKwwgh94+RjY5kcmlVZbgnoQD5C+TNOr2/1ps4ToiARLxkMAzSP4xUQsfBBkcT /Sv4J6TY0ir7VrjSN1O0MGXp9lfH71zrk1fpQRphnDBN8x76pQQFTMbqSU3P0uopJqLk 0kqjqJV65Rcog4oxXT6FqJDYeyappOXcmbXfpVNVij3oXUAX0MiQvUuId4WlycXT/I6W Q7ottnqBDlm5oWaeORul/0qrbF4btoyLvRrChWKpnlxi/cfoBR3cADkLNJ/ZxNtmLUQs vpgQ== X-Gm-Message-State: AOUpUlGiggS40dYGnRzBJttjEcjgpFWBek6LA7TYGAB6956XOP75IX/J njCuDikZ/mAu5l2mHd95QD4Iqg== X-Received: by 2002:adf:9e84:: with SMTP id a4-v6mr2236524wrf.70.1533742456417; Wed, 08 Aug 2018 08:34:16 -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.14 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 08 Aug 2018 08:34:15 -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 24/28] ARM: davinci: sffsdr: use device properties for at24 eeprom Date: Wed, 8 Aug 2018 17:31:46 +0200 Message-Id: <20180808153150.23444-25-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-sffsdr.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/arch/arm/mach-davinci/board-sffsdr.c b/arch/arm/mach-davinci/board-sffsdr.c index f6a4d094cbc3..680e5d7628a8 100644 --- a/arch/arm/mach-davinci/board-sffsdr.c +++ b/arch/arm/mach-davinci/board-sffsdr.c @@ -26,7 +26,7 @@ #include #include #include -#include +#include #include #include #include @@ -92,16 +92,15 @@ static struct platform_device davinci_sffsdr_nandflash_device = { .resource = davinci_sffsdr_nandflash_resource, }; -static struct at24_platform_data eeprom_info = { - .byte_len = (64*1024) / 8, - .page_size = 32, - .flags = AT24_FLAG_ADDR16, +static const struct property_entry eeprom_properties[] = { + PROPERTY_ENTRY_U32("pagesize", 32), + { }, }; static struct i2c_board_info __initdata i2c_info[] = { { I2C_BOARD_INFO("24c64", 0x50), - .platform_data = &eeprom_info, + .properties = eeprom_properties, }, /* Other I2C devices: * MSP430, addr 0x23 (not used) -- 2.18.0