From patchwork Tue Aug 6 16:27:40 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frank Wunderlich X-Patchwork-Id: 11079373 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 1CEB61395 for ; Tue, 6 Aug 2019 16:29:53 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 07CE8287C1 for ; Tue, 6 Aug 2019 16:29:53 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id EC40A28866; Tue, 6 Aug 2019 16:29:52 +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=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED 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 938CE287C1 for ; Tue, 6 Aug 2019 16:29:52 +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:References: In-Reply-To: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:List-Owner; bh=TKitgs3vSXwHsG6w3UyReI7vfcEB2xwU0DP2pPZzeQY=; b=iELYj/hH7OD/l/ZzJ54JT9nNtQ JhwNW2lNVZ7tJ2P8yHkwwEEEw4+iKWs4y+87DP6vv8s4PJTaK0QM7AVC5yTB2eRfAJXcrBhpRJwYV QZcgAQt7T3i9nHHqC5DeTD6rIu+N2rJxALUDTcEpsUCP5IMuxzjWEvGjrC6hc+tosSHqVl0QOFVjX 0IjgC5xbgXNp1qE7PgdRYLYcmfPULXTD5EYhlhgPGnWqq94ggzIRBEOeVFGal5i0JZu275jsVAr+i 8FaNPFNn30mMDP9zBv4QUpQ9MQzCRcOv6nrY5y4ajQgg4ROscTtrULQ2LgKzYG2le5WdeZjNDARvl TghkodEg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92 #3 (Red Hat Linux)) id 1hv2LQ-0001hZ-0p; Tue, 06 Aug 2019 16:29:52 +0000 Received: from mout.gmx.net ([212.227.17.20]) by bombadil.infradead.org with esmtps (Exim 4.92 #3 (Red Hat Linux)) id 1hv2KT-0000Td-Mf; Tue, 06 Aug 2019 16:28:57 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1565108891; bh=8gcB2Y1P8SSH9aDUi/qMuaH1abxfVQO9b3fZW4tMYTQ=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:In-Reply-To:References; b=U7td5nPFbcCHuXvafAlc/iOM2+O7JofTOjmK7Lu3GcH5PehobU8I8GkjyFaAKjJYM AdWrQBGOOqYwlze+ynLrPHD4RusRIpT/zlPpQ2+StLkihSn3H1RkqHq3e355+3XKT5 fgp15x6ygO+0/qNZodycQOhQ9qCQxV+x6NFgTApI= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from localhost.localdomain ([217.61.153.94]) by mail.gmx.com (mrgmx103 [212.227.17.168]) with ESMTPSA (Nemesis) id 0ML6XF-1hulKt3KJl-000H3o; Tue, 06 Aug 2019 18:28:11 +0200 From: Frank Wunderlich To: Alessandro Zummo , Alexandre Belloni , Allison Randal , "David S. Miller" , devicetree@vger.kernel.org, Eddie Huang , Greg Kroah-Hartman , Jonathan Cameron , Kate Stewart , Lee Jones , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-mediatek@lists.infradead.org, linux-pm@vger.kernel.org, linux-rtc@vger.kernel.org, Mark Rutland , Matthias Brugger , Mauro Carvalho Chehab , Nicolas Ferre , Richard Fontana , Rob Herring , Sean Wang , Sebastian Reichel , Thomas Gleixner , "Tianping . Fang" Subject: [PATCH v4 05/10] mfd: mt6323: some improvements of mt6397-core Date: Tue, 6 Aug 2019 18:27:40 +0200 Message-Id: <20190806162745.8414-6-frank-w@public-files.de> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190806162745.8414-1-frank-w@public-files.de> References: <20190806162745.8414-1-frank-w@public-files.de> X-Provags-ID: V03:K1:+iJfjBRFYOn5WAoXepUrh13Q4VN8x0Pn6CZbVyyfzp1nlJk7Eaa fM00X5uVPvHuR4yEfqQDwItl0Vq6mGkZ8HXTDNzO1DxpZ5TOmjBS68h2tdCVMzWB0rCamWd GZu1q2wvYM8TWMa6FA0QC1GxIrP05tZ9Q2bfZM0goxn8B7BbrS6Na9xJiZQ8JaV4QodItIZ jLT+LxQppzWiatoHlqbwA== X-UI-Out-Filterresults: notjunk:1;V03:K0:MJvW8qc5hm4=:lAYxn4cfPwTASX+zg1i74R qpKmfVTZRA8Cp/vTqoiid//1VOohTVi7PgWw7HLPBit/6gKWLq1zewIgVi8PvbhlNqXksEeRF kR0PDqn90h1UyJ8Ddvzrr24cvOKg/yzDctRdyCKRTf3/cNBriT3qlTHSeWE1oCYHa3IsTvEwL EHkMM3lKR99zdE7Cg2Afg8aqiFb1diaNlnWYN9CasXGfZ9xQZGGSHlFoyWyzBy1D9dE5MpEFO MUXXa0L+nbx4Tl3A2r2RBSTKuIm/t+frimTBgXAkD+5G/bHncXcCOouuZs3l5NKlOVzq9usFn hhYF6PayadlaA05xSx4PXxN72Abu5JgcA725vIvFffHaHPkdV9u1chCJfDh2Gg8jlQeCLOKCD iIooGX5qwY2Y3cVnfcSmUiD+YFQWvmvSnUx81SHQqvgQ7jC0XIIeMRHpUYicB5ErmKOiD/2f2 j50kiQ4ikevgIM9tLZnnL1zdg7cdEl+uhFxeWJE9VfWHnIuglf3pb6eZ2ELWhTfID0j5WFa2+ ukBjvv4u0VoNGZPC/UV1WrI0i7Qdv8ScSZL14H48UC0EbjpPjcDCTLoVPzzTPS+aYpxvXW0sf GxIStdBGfyG4Tp6R9wOynwuqCKWYbhZJNswvd+Q0aQXQzEvQKoXRosYWpfi1Nbrh3/ny0L7uZ G9hhbydgP12VvugoCG37qKWFysRCuMKxSuVrUw/sb3Ny9mWF5FA9f2/TNerVjRcyhoKsH0uBx kwlx8HzY47m6iCjHSO9Bx2Ic0ANI58L89kCGcWuY+XQYTP3nSzpksAPumhUvftf8dfdfigfQU W/9b353G9V1xiBXSJSA8mj2zhdYIUbsjEyGRLdYuYjm+2wINq2tkHhUqoI/NMhZ+ypH5dGU2R Yy1ewQQcnul2tpZkYThqdfjp3quPWbB1ORvud6PDCO6xtCmXnF4/HcAMYkdtRRRQYv+jguOtV tRksqUX2O0SfcM666SL4SP8slFKtCvkwyg5N+rCR9n/Ad/GSOGSdfnbpcJT12k6KeX8tWkbPa 3XMuY6/sc/tWVgC8vNV1dUCJm1SBviIx1WHp9XQCZhMmU/KtwT/l0imJf3t7tQxUip5O2xJ1c FKBF2n1uI8v7ObMTJH9SxLsWYnF7YgMMF6koDCcbY0+/obmf/Tbk3CArw== X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190806_092854_044535_A04C7435 X-CRM114-Status: GOOD ( 11.23 ) X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Josef Friedl , Frank Wunderlich MIME-Version: 1.0 Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+patchwork-linux-mediatek=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP From: Josef Friedl simplyfications (resource definitions my DEFINE_RES_* macros) Signed-off-by: Josef Friedl Signed-off-by: Frank Wunderlich --- changes since v3: moved part 6 forward to let compatible and driver be together changes since v2: splitted v2 part 4 into 6+7 drivers/mfd/mt6397-core.c | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) -- 2.17.1 diff --git a/drivers/mfd/mt6397-core.c b/drivers/mfd/mt6397-core.c index 337bcccdb914..5f7070267c9a 100644 --- a/drivers/mfd/mt6397-core.c +++ b/drivers/mfd/mt6397-core.c @@ -1,10 +1,11 @@ // SPDX-License-Identifier: GPL-2.0-only /* - * Copyright (c) 2014 MediaTek Inc. + * Copyright (c) 2014-2018 MediaTek Inc. * Author: Flora Fu, MediaTek */ #include +#include #include #include #include @@ -23,16 +24,8 @@ #define MT6397_CID_CODE 0x97 static const struct resource mt6397_rtc_resources[] = { - { - .start = MT6397_RTC_BASE, - .end = MT6397_RTC_BASE + MT6397_RTC_SIZE, - .flags = IORESOURCE_MEM, - }, - { - .start = MT6397_IRQ_RTC, - .end = MT6397_IRQ_RTC, - .flags = IORESOURCE_IRQ, - }, + DEFINE_RES_MEM(MT6397_RTC_BASE, MT6397_RTC_SIZE), + DEFINE_RES_IRQ(MT6397_IRQ_RTC), }; static const struct resource mt6323_keys_resources[] = {