From patchwork Wed Apr 4 12:38:22 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bartosz Golaszewski X-Patchwork-Id: 10322517 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 E77396053F for ; Wed, 4 Apr 2018 12:38:40 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D906C28E76 for ; Wed, 4 Apr 2018 12:38:40 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id CD2BC28E79; Wed, 4 Apr 2018 12:38:40 +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 780EE28E76 for ; Wed, 4 Apr 2018 12:38:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751268AbeDDMi1 (ORCPT ); Wed, 4 Apr 2018 08:38:27 -0400 Received: from mail-wm0-f65.google.com ([74.125.82.65]:36761 "EHLO mail-wm0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751038AbeDDMi0 (ORCPT ); Wed, 4 Apr 2018 08:38:26 -0400 Received: by mail-wm0-f65.google.com with SMTP id x82so42071348wmg.1 for ; Wed, 04 Apr 2018 05:38:26 -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=RQhvaiqdVaYQ92wl4DG3e6meHaIwEHVWlonXlkWTlYs=; b=kH/gSS6LJtxTSRetE6s6Au0GVit4fbcprA8GdxOZpxgEfdYdjxr4ss6gew+FVjexGw NQP5U08lO+gei5vNVThno56irMU6Inqx7SmDWhtUQvK26iERIuJNBoa9P6HiXVgODB5u aoAgmhuIGSO/LezlOCV1lTvmUJDZzOm/iTxQIEAb9EuU1kQSjYHHtZMFRuroOEW8fyA4 HuGiAFnzkexFn3WIZ0ivx/76M9ENEsz0N/asr7OYPFtJoxN5iVqjTcIkU57dgFZ8G01C +0tkWTt2xgFXe2xNtwrNpveTxxBUZm66Q5asB04hyJp2MCLDid/BlOh8yYWYmhbWJPsH LFQA== 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=RQhvaiqdVaYQ92wl4DG3e6meHaIwEHVWlonXlkWTlYs=; b=qB/W6FF7QoYlCEoMgI3erWjm7Kib1IHwnuHgQsmFgfLikREKp6xhQq4pa9NJHr+i3+ hZXAR2v8/6VS0m2NZxEsggfRtZRd++0rgWHcMeKka1MCmBUXUyR9iPTWGnF4cfJfpKB9 sVXXYD1EHKasmS1P3SkuEfu7WlXFxpljUpEb57HziKkXK092nRQu5WRSzGJEC6vAuCno C0CK67W0K5zEruzNqNs41PloyHYWacb+FNStC5GfMGf0EZdE1uwavLC9iuxqC13CzK+F Q2QRWWelryg/G8ETdacncBSWdoEkqj1tXw3cFkMx8ELXqE59eETKFeNRTW9SZlP0t2Ae /sjw== X-Gm-Message-State: AElRT7EC8cXdFEx0ghmQ1RHV+IXEXEJCCDquxbQQx8j0zMkOaEE388Ju hchlYWbm8+m3Cb/AUi5WfgbvJA== X-Google-Smtp-Source: AIpwx4+k2y3hDlviyr/IhkLRMdDNf6JshWPYOorWN6HYgU720Prt7GjOtGYUOo6F0YcYLTtMr61wqg== X-Received: by 10.28.94.210 with SMTP id s201mr8245495wmb.140.1522845505707; Wed, 04 Apr 2018 05:38:25 -0700 (PDT) Received: from brgl-bgdev.baylibre.local ([90.63.244.31]) by smtp.gmail.com with ESMTPSA id f10sm4097504wrg.0.2018.04.04.05.38.24 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 04 Apr 2018 05:38:25 -0700 (PDT) From: Bartosz Golaszewski To: Aaro Koskinen , Tony Lindgren , Russell King Cc: linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Bartosz Golaszewski Subject: [PATCH] ARM: omap1: osk: use device properties for at24 eeprom Date: Wed, 4 Apr 2018 14:38:22 +0200 Message-Id: <20180404123822.5664-1-brgl@bgdev.pl> X-Mailer: git-send-email 2.16.3 Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@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-omap1/board-osk.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/arch/arm/mach-omap1/board-osk.c b/arch/arm/mach-omap1/board-osk.c index c66372ed29e2..9ffa8d755a59 100644 --- a/arch/arm/mach-omap1/board-osk.c +++ b/arch/arm/mach-omap1/board-osk.c @@ -303,22 +303,22 @@ static const struct omap_lcd_config osk_lcd_config __initconst = { #ifdef CONFIG_OMAP_OSK_MISTRAL #include -#include +#include #include #include #include -static struct at24_platform_data at24c04 = { - .byte_len = SZ_4K / 8, - .page_size = 16, +static const struct property_entry mistral_at24_properties[] = { + PROPERTY_ENTRY_U32("pagesize", 16), + { } }; static struct i2c_board_info __initdata mistral_i2c_board_info[] = { { /* NOTE: powered from LCD supply */ I2C_BOARD_INFO("24c04", 0x50), - .platform_data = &at24c04, + .properties = mistral_at24_properties, }, /* TODO when driver support is ready: * - optionally ov9640 camera sensor at 0x30