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: 10322519 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 1BE9160318 for ; Wed, 4 Apr 2018 12:38:49 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0C91828E75 for ; Wed, 4 Apr 2018 12:38:49 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0183328E77; Wed, 4 Apr 2018 12:38:48 +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=-1.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 7D27428E75 for ; Wed, 4 Apr 2018 12:38:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To: References:List-Owner; bh=hVxRDQn8s8J3HsZAXIZVVmSKGQSy9xdpsT9TqZIGeYo=; b=JCW /255OGYPZU2YAV+7QcIdbUpVIKO5nVzcvEJx0VzBYdx/myM/YaZ7fN0qga2+LZ+Ic4xyNuMn9tvRB raeSfGKtgVDaGVqPQOA+NqCYbFe0EZfk5UutUYkk2cjwR/kKjn3Deqgb5nksONOFlTaQy5eM7m5sF cWu28ngV2+e8HSicSrUYhBrEuAg09TRRuVGyllJ2I38RZ6G3LoXGHNJCfBNnUroW/+A4XGjUjs24q y8COuSRIL7S5wXbE2q4a/UUvXyItzKGkXKPNO5GW2rrq0REKK++PZQVsGfQaB0uMwtchKz7uPCBw+ UHuxtFBZFXSvrCZqlQPLi2U5XMI4N2w==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1f3hgX-00083S-6p; Wed, 04 Apr 2018 12:38:41 +0000 Received: from mail-wm0-x242.google.com ([2a00:1450:400c:c09::242]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1f3hgT-00082O-EZ for linux-arm-kernel@lists.infradead.org; Wed, 04 Apr 2018 12:38:39 +0000 Received: by mail-wm0-x242.google.com with SMTP id r131so42063396wmb.2 for ; Wed, 04 Apr 2018 05:38:27 -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=ccYWuEcAsKSrGNgqMvnD7I1+Taqg6Oukdh6V4stZzYB4sl6gqHmE7gPXw6PDyX1xu5 VpupNiebYXUS4dHr2K0xSvTcg55sZxia4dtOVteOFxybTKxpehOtt/yWd1Z4OsOcqrqw IM170hlndMwmFaXOqSe/WD6XIGLbU3FlnUhvGtmWtTr0HteR3CNa4Ob8WtPjzsVlYCVb 3o2dEUEM3u6/c4f7a0faWehLmJbNwaK2cncXNfCcYkh7dTsk6OV+cP/yovJwx2Yqrajs IBeVp2FF03QonaiYlRoXbyHWQml4DWm7x7WcsnIiyzDqVFRaJ1QDnnB5hX5aFFSgD+6x qwOA== X-Gm-Message-State: AElRT7HAooM72CQS5KOXkDlmlA1lZ2TmZRYi8sNg73sJBZni8O5pJvbz gubuoe8ZaIG+VcOmRv6ZPv+Lwgnilz4= 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 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180404_053837_490517_D800B650 X-CRM114-Status: GOOD ( 14.45 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Bartosz Golaszewski , linux-omap@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.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