Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp3004518imm; Fri, 10 Aug 2018 02:00:56 -0700 (PDT) X-Google-Smtp-Source: AA+uWPzEF6mz5dCy65Cfbd7wW4pfuZ4qlQF77ShAgEBqsOJN6XXD8xrjBUKWuv5ja75Do7kcoUHR X-Received: by 2002:a17:902:aa83:: with SMTP id d3-v6mr5370690plr.242.1533891656598; Fri, 10 Aug 2018 02:00:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1533891656; cv=none; d=google.com; s=arc-20160816; b=OUuYvl0srUzbr66/o975SSC2TSrUv5kYVUYd8eN6wf9eN1dNrtoxY+4Lm1OvoJZvaH QDWhW+DA2RPxvzzoPZu8+tAQIgrrk4hYyLOUHfKTJbRf+sC5PWfwl01PbgXQClVr97tj 4fy94E5eJubVY+9x2+vYXwHWxyqrNmh4pQ15ILmkiwb0yfjUguKSU1+LsRXbj3RW3UFS CmXSX2XAax348Iko5aQyH5NSoJlH5Ga3toPkhdsF02mqxXsyaXU9OjB8TxVLkIvr31yj oIw1y3jbb4aLnqkjnaKHyNdRlUuspANCmJ2zjhuNih336bhm9xcpbZ94288qw+LvAXqE 9VDg== 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=2XJsVm0WuqF5PCKtq4F+QgEyPMFdIFrJ0P6MxMphb2w=; b=LsL4NXkML07qk6Txk17erNzEziAFa+O8/QN2+El75VVv6pJra3PDjMAyMmcFHIlNUd rnv435q4RahDF7AmWpLvOr0Lbx4XWFlMJ6G8BGigIjHEsfkl3dfcsL6YvcU9Fx3UQi7z G/Bj1GtH8gSqOFslX/dLdFsuXIuTKthXsTrCZTtjK6YTMNm9Gxv/fBXk95/RYQvHbixu JhU8nMJ/GeLif3MTUuO1n7NQ7AKqgSsRAdZ6rAiRJ/t0g/L38a4NnQYF9Jf5YPaG/rFS Srv2xV9fMzk4UnwPqpJnBh38+Gbi69ppHwey3O1dGykQKgrOSEoEJ0tIl/rnU8moMSvd QTYQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bgdev-pl.20150623.gappssmtp.com header.s=20150623 header.b=1hQ9fY4f; 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 x23-v6si10216296pgj.543.2018.08.10.02.00.41; Fri, 10 Aug 2018 02:00:56 -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=1hQ9fY4f; 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 S1728706AbeHJKfB (ORCPT + 99 others); Fri, 10 Aug 2018 06:35:01 -0400 Received: from mail-wm0-f68.google.com ([74.125.82.68]:52696 "EHLO mail-wm0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728639AbeHJKfA (ORCPT ); Fri, 10 Aug 2018 06:35:00 -0400 Received: by mail-wm0-f68.google.com with SMTP id o11-v6so925264wmh.2 for ; Fri, 10 Aug 2018 01:06:15 -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=2XJsVm0WuqF5PCKtq4F+QgEyPMFdIFrJ0P6MxMphb2w=; b=1hQ9fY4fRn50E/NBrltIjcbGRbvpoX35hybYGJ/WjXssEj+a5sBJgUoiopfctEacsD ou7ZH3w9iE+ZWFNgBgk8KNWzSPK6J8gxHyijHjDL95XTk3SBIcffkszH25aoGUY7WGky eKcviDDKKDRVkyw51s5Mw9xvfVyhjXEyhpk/wFqgdetHBFjqtnrln+UgzEzrtnyZ59lD /LWzvHPwuhrnsSsgvZe/ZTMWzdr+RpRytfXqdwV5oByARnfG1dFarrQN7JTQg/24vHiC 8+foTnaQGSWuZ+28/lLNC6CLfxRUF6IUA1GeIpGOj4eKJMsXMfoVemYZb/VNaqjgJPui J0yA== 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=2XJsVm0WuqF5PCKtq4F+QgEyPMFdIFrJ0P6MxMphb2w=; b=rw/u2Ubr96YUqI0vncJb+HIcdmBcr9qfk81VV+ewYPg4GN3FxA7ceajxtAaBVkywRk 0P2xRsT1sOAS0LXcD7KukP5bMB16oCp2q5gEhZkwIWcAojj3CwZhcZ/msGvU//BShRO6 FvSurJHrrcMbAEAdu9XFyNzBF41dCykkPzk/zVFlvM/fPJVEUwZOSm4vm9veAhsbs/eS 3/h6RhtFLDAlpcf+kunBDM+pIsPr/v3VEbaOaBN4PjjfS9mfnLmaYgbEt+N1SHLT1yDe 3S5mlFbEhYEj4rFCexsyl33bPL40d8dUbRhcxsUBtwUYuRzTAMuBK7QeGDxAVbJWr6wQ VQfQ== X-Gm-Message-State: AOUpUlEVxzUFrF13O4jPuQKMfPKk6SIL9yQ0iMB/EJC+1ABlASeQWHoc EMaspHlYcTK5knRaLvpc5YMkhw== X-Received: by 2002:a1c:af53:: with SMTP id y80-v6mr746897wme.55.1533888374272; Fri, 10 Aug 2018 01:06:14 -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 h7-v6sm9546405wrs.8.2018.08.10.01.06.12 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 10 Aug 2018 01:06:13 -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 v2 22/29] ARM: davinci: dm644x-evm: use device properties for at24 eeprom Date: Fri, 10 Aug 2018 10:05:19 +0200 Message-Id: <20180810080526.27207-23-brgl@bgdev.pl> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20180810080526.27207-1-brgl@bgdev.pl> References: <20180810080526.27207-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 Reviewed-by: Andy Shevchenko --- arch/arm/mach-davinci/board-dm644x-evm.c | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/arch/arm/mach-davinci/board-dm644x-evm.c b/arch/arm/mach-davinci/board-dm644x-evm.c index 829fa1c8d0b4..954296d23297 100644 --- a/arch/arm/mach-davinci/board-dm644x-evm.c +++ b/arch/arm/mach-davinci/board-dm644x-evm.c @@ -16,8 +16,8 @@ #include #include #include -#include #include +#include #include #include #include @@ -486,12 +486,9 @@ static struct nvmem_cell_lookup dm6446evm_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), + { } }; /* @@ -601,7 +598,7 @@ static struct i2c_board_info __initdata i2c_info[] = { }, { I2C_BOARD_INFO("24c256", 0x50), - .platform_data = &eeprom_info, + .properties = eeprom_properties, }, { I2C_BOARD_INFO("tlv320aic33", 0x1b), -- 2.18.0