From patchwork Wed Apr 4 11:44:58 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bartosz Golaszewski X-Patchwork-Id: 10322463 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 8668760318 for ; Wed, 4 Apr 2018 11:45:30 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7684728E33 for ; Wed, 4 Apr 2018 11:45:30 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6AED628E57; Wed, 4 Apr 2018 11:45:30 +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 93A0628E33 for ; Wed, 4 Apr 2018 11:45:29 +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=7cEW60hhTLFUImCQE81xghN0RC4OjlnORpwABExxVjo=; b=bxX 6pLyt2mJ8Xo3merD1TlD3N00AmWoJDRAb/g8KugxMetmiiu+jAstXDQdVv7iw2LY2s8ACezq3Tbuf UKebvunwriB429z8mLgFLb2+WwlSIldZ8iwt+wktM4yFVW7OI0SZaKobgpM2K9Jzn/wFp06qq20Qn 6K6JEMGxYrQ7Y5kTgVh+vbj2Qa/fG9aYHt8HCCiAU800Hpl5VEsUMlVbdqI4oCDbBoZYJZokkw1Ep +Yfrn1b1ovCzPjB5XA4d+RV7OyI1nrUc/jeYa4FWMTk8vQGcdR7uKoxG/8dLghy3RjSxKZgKESpSb TBJOa3I3z9bnB50nNpPp0Jr5neLUyRQ==; 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 1f3gqy-0002HO-Oz; Wed, 04 Apr 2018 11:45:24 +0000 Received: from mail-wr0-x241.google.com ([2a00:1450:400c:c0c::241]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1f3gqr-0001Ob-68 for linux-arm-kernel@lists.infradead.org; Wed, 04 Apr 2018 11:45:21 +0000 Received: by mail-wr0-x241.google.com with SMTP id z73so22135581wrb.0 for ; Wed, 04 Apr 2018 04:45:06 -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=8AuObVDXW+3AuOqoXZVXU7Eiu7iVzrbcHAztWnEby8k=; b=QhyQCGm0kZ5sp2PAVUrnu/YvyZGreoxbeTRWPvqMGbjPF1Wone2mhnzVR9k+RyeLAz ZnjaDSYnMgEC23F6UPeo87PZMs7nAc7wgYUka2qR0TaxzKIRspPjDu3Fq0KhJOTXblZW uA/EjPR8ZO6gawz5bYimGq5C1875DhDnTB41l9374EZ7gBHJDtXe4kjrRgqPqwj+3v91 ox0e8w4m26FQmoHQX2Q3PKXgFuYbDpuSZaYW0dlrNJujdKupCIHNfm/OWxMs6Rf8ftOo N8tGSU1OoBuZBULv3ulbEGJ+K24RNzL9OmoMNwnEYet6roO2jZOs3RLRV8gE+UBZZDSJ mHug== 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=8AuObVDXW+3AuOqoXZVXU7Eiu7iVzrbcHAztWnEby8k=; b=EOTAf+1LGfE0KMNWPeraerXnTvlXCEjc8BEnU/XMMorP2HjZDI0Kf1tVPs/NxqEaov TkO5H7FsxqHi/SN7k5Qd/ZxE3VVrG92gr79fOmbDHEFsJ8Oj//q4MS/gHMuCQqhlOIa7 Mvqq0lWhpv6J4uJb4ntLs9qAYr2P7xxH2yTdkETLkrse1POTHOEN4WubIplRLnQk1UOk OL7dF3MUp2FwqkHBYr3J/34YrqNKXKxpPFx1B2Dq64j7kBCSF83cbK/qcT9xLhOKhqXj 2z2XXhMdZEzNTP96PlMTsaFYTHotxyPU1v4wnsNhTzcXarGxHs9aYr5OcbNsjILahUrq Fm9A== X-Gm-Message-State: AElRT7GhAK8DqfcTaUlRuCS8VmvChAcznXDTbUn1mMK43yNweaVYn3RK MrG1K5CQytWb/INpjLOqPqdrwg== X-Google-Smtp-Source: AIpwx48v8l7WqNsEsbzRlxIk5+GCAfi09RPmIvmaPdGZDOL2u3pETYZ/dWvDmOy/QoLxAIABtH79Cg== X-Received: by 10.223.150.161 with SMTP id u30mr12414067wrb.151.1522842304919; Wed, 04 Apr 2018 04:45:04 -0700 (PDT) Received: from brgl-bgdev.baylibre.local ([90.63.244.31]) by smtp.gmail.com with ESMTPSA id n29sm2806443wmi.32.2018.04.04.04.45.03 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 04 Apr 2018 04:45:04 -0700 (PDT) From: Bartosz Golaszewski To: Jonathan Cameron , Daniel Mack , Haojian Zhuang , Robert Jarzmik , Russell King Subject: [PATCH] ARM: pxa: stargate2: use device properties for at24 eeprom Date: Wed, 4 Apr 2018 13:44:58 +0200 Message-Id: <20180404114458.15376-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_044517_389900_08AE577C 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-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-pxa/stargate2.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/arch/arm/mach-pxa/stargate2.c b/arch/arm/mach-pxa/stargate2.c index df62bb23dbee..bbea5fa9a140 100644 --- a/arch/arm/mach-pxa/stargate2.c +++ b/arch/arm/mach-pxa/stargate2.c @@ -27,11 +27,11 @@ #include #include -#include #include #include #include #include +#include #include #include @@ -795,9 +795,9 @@ static struct pcf857x_platform_data platform_data_pcf857x = { .context = NULL, }; -static struct at24_platform_data pca9500_eeprom_pdata = { - .byte_len = 256, - .page_size = 4, +static const struct property_entry pca9500_eeprom_properties[] = { + PROPERTY_ENTRY_U32("pagesize", 4), + { } }; /** @@ -935,7 +935,7 @@ static struct i2c_board_info __initdata stargate2_i2c_board_info[] = { }, { .type = "24c02", .addr = 0x57, - .platform_data = &pca9500_eeprom_pdata, + .properties = pca9500_eeprom_properties, }, { .type = "max1238", .addr = 0x35,