From patchwork Wed Apr 4 11:51:47 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bartosz Golaszewski X-Patchwork-Id: 10322471 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id AAD3F60318 for ; Wed, 4 Apr 2018 11:51:55 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9E4A228C29 for ; Wed, 4 Apr 2018 11:51:55 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 92B4328E40; Wed, 4 Apr 2018 11:51:55 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 139D028C29 for ; Wed, 4 Apr 2018 11:51:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751387AbeDDLvy (ORCPT ); Wed, 4 Apr 2018 07:51:54 -0400 Received: from mail-wr0-f195.google.com ([209.85.128.195]:41568 "EHLO mail-wr0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751279AbeDDLvx (ORCPT ); Wed, 4 Apr 2018 07:51:53 -0400 Received: by mail-wr0-f195.google.com with SMTP id s12so11565937wrc.8 for ; Wed, 04 Apr 2018 04:51:53 -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; bh=jotR7RiApue1iRnEQc86W8o6kYbCa2ZDZBFsFyKsHUo=; b=0kbS83jxvRp2xlZCWbGFL4i9uDsU7ilDUzaIRbOYqvRRqMJcoClyNmftYZS7+xsjF7 ndWkvrttnxrlndXN9Xno8aW8nGsFeChBM0DOdbUAiwuJh0FEt/blQYdg2XSrphJc2GmA rOgs0c84lqTT1RMcer1PXiFnDWuh9sucnQRaCt7n/DScH3QHmVrSN3c7NDQ6703jeWQF x6aOuidqnvDHTU4s0nTOJUeCxUcJxffPBtnsl8PlD+2q8Fyku/7gO46PA7WVStQ++wC/ 7H83yPLGGS0Jlc0wEvpdRhKDbO4cbmWWN2iVa9cHi+xosWvi15JkUOadh5daulRVWH5+ PLVg== 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; bh=jotR7RiApue1iRnEQc86W8o6kYbCa2ZDZBFsFyKsHUo=; b=UvRzaOeJr944YtgJHCalC/k2Vd/jpnEcAqk1wt4OSgiPAGSITFNn26cN7gCOeZX0kb /eFCgGXYFT/FsZN3LRtTg9PdRq65l9rbSUCVaeyXUOv0fPjZEBqZC/WE8u8ZcWlsekSP 4NOlXQjHsadw3mKK3Lt9nsK5a4dOqlP9sPvkJu1VJ0tVp3C7kd522WCxq1ijoe4rjL0v ykPhAPTajJJcMHOgBymPsnzOFMWx1/wjfxJgdreuM8SjW9D9vNBxf0siyYUNYtz5vpQP 8QmRCryEPv6h1WDgmKvC+HiNf2I6hAgmP0zUpUARE3BVACFWk4wx2oREncgwLSWdbyz/ B/tQ== X-Gm-Message-State: AElRT7EYMLdxZyfEuVnKWC5qx/oZDbqhnnuEimXjwP3vuh+uMAx1ENxt XNUwh0+t6F5CVC4aSx+wuQsT7w== X-Google-Smtp-Source: AIpwx4+3S6MDMwNQ79XNSJMAiakGEWmbAM+RzLkzaBRArOBLVMtAQa4UN+CfZl0aHdGmjt99bW/k0A== X-Received: by 10.223.185.76 with SMTP id b12mr13398460wrg.205.1522842712446; Wed, 04 Apr 2018 04:51:52 -0700 (PDT) Received: from brgl-bgdev.baylibre.local ([90.63.244.31]) by smtp.gmail.com with ESMTPSA id w204sm4313147wmw.23.2018.04.04.04.51.51 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 04 Apr 2018 04:51:51 -0700 (PDT) From: Bartosz Golaszewski To: Kukjin Kim , Krzysztof Kozlowski , Russell King Cc: linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, linux-kernel@vger.kernel.org, Bartosz Golaszewski Subject: [PATCH] ARM: s3c24xx: mini2440: use device properties for at24 eeprom Date: Wed, 4 Apr 2018 13:51:47 +0200 Message-Id: <20180404115147.16448-1-brgl@bgdev.pl> X-Mailer: git-send-email 2.16.3 Sender: linux-samsung-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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-s3c24xx/mach-mini2440.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/arch/arm/mach-s3c24xx/mach-mini2440.c b/arch/arm/mach-s3c24xx/mach-mini2440.c index 95753e0bc073..f9fc1f8d2b28 100644 --- a/arch/arm/mach-s3c24xx/mach-mini2440.c +++ b/arch/arm/mach-s3c24xx/mach-mini2440.c @@ -20,7 +20,7 @@ #include #include #include -#include +#include #include #include #include @@ -481,15 +481,15 @@ static struct platform_device mini2440_audio = { /* * I2C devices */ -static struct at24_platform_data at24c08 = { - .byte_len = SZ_8K / 8, - .page_size = 16, +static const struct property_entry mini2440_at24_properties[] = { + PROPERTY_ENTRY_U32("pagesize", 16), + { } }; static struct i2c_board_info mini2440_i2c_devs[] __initdata = { { I2C_BOARD_INFO("24c08", 0x50), - .platform_data = &at24c08, + .properties = mini2440_at24_properties, }, };