From patchwork Tue Jun 18 15:43:47 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabien Parent X-Patchwork-Id: 11002075 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 2D0C31395 for ; Tue, 18 Jun 2019 15:43:59 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1B32028A89 for ; Tue, 18 Jun 2019 15:43:59 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0F71728A96; Tue, 18 Jun 2019 15:43:59 +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 591D828A89 for ; Tue, 18 Jun 2019 15:43:58 +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:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version: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=fY+PkBNMhFs1hVvh7qazBQT1+DUyPbTzSfthPnNHQJU=; b=jRJjhfBd44ciqN raFwZ+GP7SUqFFlN3ClA+bpajHEYLk15v+zk5C93CSlFyEojd2BsxU6iCGURaRGPlJa/KvZ00HWdB tAYomk9skmLlAKSJwP6ie6etnloGjHMq3iABt9GMwaBNnwmUN7D4jk5c3SkfP+497QLGfurpnT0bA +eYm6zKkJ33WfrFX9w5ZahKkIHX/to56be8P+cHnIeVLkeSm6uuHGgiuywRX8SJms/wQue+k4lylc f1sE8HJt6o0d2a7+OwEEeCIw/eg6D2YAwV/jlvqWGzYiZ3Jd3w2CCucmHvvXT4MosXPMGpk38rkb9 6D+SZIE4LTgzJgYGiMKg==; 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 1hdGH8-0007FK-23; Tue, 18 Jun 2019 15:43:58 +0000 Received: from mail-wm1-x342.google.com ([2a00:1450:4864:20::342]) by bombadil.infradead.org with esmtps (Exim 4.92 #3 (Red Hat Linux)) id 1hdGH3-0007Ct-Od for linux-mediatek@lists.infradead.org; Tue, 18 Jun 2019 15:43:56 +0000 Received: by mail-wm1-x342.google.com with SMTP id x15so3841029wmj.3 for ; Tue, 18 Jun 2019 08:43:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=0vbPMnSPTFmTNhTvb78jQv/BzhDnMGLR+xrvA6q/kx0=; b=VDRhhU5RFfax5iw/D6bgy+EWGO4v9G3xyws4yLORV4eWIzJ+FQZTTX2x7NttwaSvVf bK8l7V8vhqYmhSUgyQ/sRTOMPTvLpBxKYC5k/KQ7fdi9Duu6O5z4Oaf9xXBDQyZssKp+ qIhECCaw9iKwmiov+X2tMABtA8kzifXjkEp+r3IdyfTCaMmBiy1j00VBTVDo3Bb1ZH1n w2Lr9zATdrTXx5jVOf8iA+f0U9OGOTjLO/N6yqwu33aI/OPmXjx6TGd53gIhVWJNtU7f 5PnxVhRqlP376h4FR8KVPGDFnjsAgEeNRzF8rL2ZloB1/47IxNoAMC5H5MZ7CtXcVHL/ OSkw== 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=0vbPMnSPTFmTNhTvb78jQv/BzhDnMGLR+xrvA6q/kx0=; b=dQDDZ/Anxey/hC4VTXYtd0dLvGFIPoamOyWqFTe4EqHVLNrgaNRMP0Bj5nWT5n9XX0 P1gW/Q7Nsnn+mwexaQ+fA3klZX5pzPyUwS8Kud4Mx9XLDuGBry/D3MbPtlNY8LYhF6F7 BE5Edb9o+VTvrS0Arw/FF5Gv9wIRQJDchlR2BrN9TVt6ZbFSl1YZlPLk7AAE/043baYz jTUa6+R/w8iPICZbbU/MT8/httAAl2wQmz+tIy/zWA7VdYob+MY2jMV+mPthuZSsSaQU 9m2EfBOUPQ37pr+6M2Do4EjZNHKBQ/H/c+VWamGJ0g7uTU3w1J4amdZEPdrDqCCUG06M 25Mg== X-Gm-Message-State: APjAAAU6iuJfE+gyxX6mnwv0szNi1p1YSJrwom4rvqV0Q0u7IwKHhjAj S8qB77fTJij2gKzZRytQO37Z+g== X-Google-Smtp-Source: APXvYqwtw4L/aIDQ4+qEJmUYMfZ7EYwaOEj6yOOtOOc3CwsfJo7ZPI8soRXlk3VuzO+bkNaQhH2WCg== X-Received: by 2002:a1c:2c41:: with SMTP id s62mr4270696wms.8.1560872631849; Tue, 18 Jun 2019 08:43:51 -0700 (PDT) Received: from localhost.localdomain (amontpellier-652-1-281-69.w109-210.abo.wanadoo.fr. [109.210.96.69]) by smtp.gmail.com with ESMTPSA id z5sm2633287wma.36.2019.06.18.08.43.51 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Tue, 18 Jun 2019 08:43:51 -0700 (PDT) From: Fabien Parent To: lee.jones@linaro.org, matthias.bgg@gmail.com Subject: [PATCH 2/2] mfd: mt6397: use DEFINE_RES_* helpers to define RTC resources Date: Tue, 18 Jun 2019 17:43:47 +0200 Message-Id: <20190618154347.16991-2-fparent@baylibre.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190618154347.16991-1-fparent@baylibre.com> References: <20190618154347.16991-1-fparent@baylibre.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190618_084353_820979_A3730CBA X-CRM114-Status: UNSURE ( 9.13 ) X-CRM114-Notice: Please train this message. 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: Fabien Parent , linux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+patchwork-linux-mediatek=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Use the DEFINE_RES_{MEM,IRQ} to define the RTC reosurce for the MT6397 PMIC. Signed-off-by: Fabien Parent Reviewed-by: Matthias Brugger --- drivers/mfd/mt6397-core.c | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/drivers/mfd/mt6397-core.c b/drivers/mfd/mt6397-core.c index 190ed86ad93e..1e315712870b 100644 --- a/drivers/mfd/mt6397-core.c +++ b/drivers/mfd/mt6397-core.c @@ -23,16 +23,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[] = {