From patchwork Tue Jun 18 15:43:46 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabien Parent X-Patchwork-Id: 11002081 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 1AB741395 for ; Tue, 18 Jun 2019 15:44:28 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 08BAF28A89 for ; Tue, 18 Jun 2019 15:44:28 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id F12C228A96; Tue, 18 Jun 2019 15:44:27 +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 A71A528A89 for ; Tue, 18 Jun 2019 15:44:27 +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: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=7jNn0IFKvU0hQVLZdBdoNmok8JSmwODysh5RtWwB8PY=; b=NdIj1Ffulrt74x pWTdit+0/Rd9OPtmEgBXQTQO+WEI57dRV3vbDWEkgo/28gb33BNrta8/iENVtrTOehfU0iuIPo+fd QCIf0vQ/IYktZqZlcZgf6inG/0y4aHCJvbW4/sRr1H0d5JcY7gB+ItGnwuHHaMOjKvjOHhGxnX6Pz UVbjdJM9hTmlpdCkyB4nJyY0kYSn/0PS+iHQKPvX0HlyIUM6U764WHpuWiZS5IwIn5ZZvv1pe6P3y vJUptJGKYYbSvEQDSWq8Nd4wRgOK0o2UCbZFs1+tr3VAuwFYDW+n2KCG3Wu2uePFnwKEeKiaD9pVP 4d+BH+MuuriSKYExK54Q==; 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 1hdGHV-0007VX-NV; Tue, 18 Jun 2019 15:44:21 +0000 Received: from mail-wr1-x442.google.com ([2a00:1450:4864:20::442]) by bombadil.infradead.org with esmtps (Exim 4.92 #3 (Red Hat Linux)) id 1hdGH3-0007Cq-6o for linux-arm-kernel@lists.infradead.org; Tue, 18 Jun 2019 15:43:56 +0000 Received: by mail-wr1-x442.google.com with SMTP id x17so14024wrl.9 for ; Tue, 18 Jun 2019 08:43:52 -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:mime-version :content-transfer-encoding; bh=z2DroQv2ruFtbq7x0Nc/gqYAN5TH+pK8pLfYV3S723M=; b=RUZ5pi4GEOGMywZronlWI8Un8Y1j8se22zqHCih+IyO1yuWzno8FVkuUjJBI3m0H6Q WP+YBGRHeje8c5wvIMHqN7krS90n0cJhrasXt3x0ulEmWaGWSp/ys+LYjmb7QWdcRWu+ niqe1vDD6rIcuo2KfRBS5a2SQZMCAzEE7Ydb2pGdgWlJblMRS7A2EL3Pt31Z29uGh/Co /96ef69t97+oB8uh+groM6vvJwNTZ4IdxZE9tWyCd1AnCvU2fOJB/EJvIs/1t2gKJJv2 Hzb6Bdqzi6zhHpcMMg+XCwpFEzxSGcqCaQoIFoAWu8YaeF2JM64TdjnYcyWZNTccyS3v vbrA== 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:mime-version :content-transfer-encoding; bh=z2DroQv2ruFtbq7x0Nc/gqYAN5TH+pK8pLfYV3S723M=; b=eZb/4rGm4YRYWMdzBOwPP09D745YdkpYsqhHn0H88SWSMaq5/GPFimo5imFcusvFRU UMCw2PrELTr2wYtIZwUoV8pzNAu5SQYCrcR+/UfLIGeho15MlrF9MU9cYbuoc3JRZ2ly 88b5+NGn/gfP244I3iYTy4X4WdiPXzjcUWfpT49JyJbvO05HCq8rtzPlXFjR4KOnoujY YQYju2BzGStBuS4EYsnIPcrOn8MTf1NEPrA+ogiTMRUm9SHiKh/kDjpByDg8Rf5pxwbA o3vbdNNMQQqPMduWxNx1coanJ5PZo9K/tZWZoK2uUlgFRtVyqBpd8x2ekipCSczAR71V BtVg== X-Gm-Message-State: APjAAAWqArjzNbVMb0aaOjT9YgKQWhcCoyG17JbBbglihUbM5l6n5obI KcH0sWD9PMLqIQcGL7XND3zP8g== X-Google-Smtp-Source: APXvYqz3Tk6+Cw9PNouMQlpWVk3VHeEq+wax/N8KlWO1MqvPx1tt7KUzbGTY6HmB7/AfzGz9g8DQjg== X-Received: by 2002:a05:6000:1c6:: with SMTP id t6mr40208869wrx.236.1560872631011; 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.50 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Tue, 18 Jun 2019 08:43:50 -0700 (PDT) From: Fabien Parent To: lee.jones@linaro.org, matthias.bgg@gmail.com Subject: [PATCH 1/2] mfd: mt6397: Use PLATFORM_DEVID_NONE macro instead of -1 Date: Tue, 18 Jun 2019 17:43:46 +0200 Message-Id: <20190618154347.16991-1-fparent@baylibre.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190618_084353_318556_A2E0CF1F X-CRM114-Status: UNSURE ( 9.08 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@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-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Use the correct macro when adding the MFD devices instead of using directly '-1' value. Signed-off-by: Fabien Parent Reviewed-by: Matthias Brugger --- drivers/mfd/mt6397-core.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/mfd/mt6397-core.c b/drivers/mfd/mt6397-core.c index 337bcccdb914..190ed86ad93e 100644 --- a/drivers/mfd/mt6397-core.c +++ b/drivers/mfd/mt6397-core.c @@ -299,9 +299,9 @@ static int mt6397_probe(struct platform_device *pdev) if (ret) return ret; - ret = devm_mfd_add_devices(&pdev->dev, -1, mt6323_devs, - ARRAY_SIZE(mt6323_devs), NULL, - 0, pmic->irq_domain); + ret = devm_mfd_add_devices(&pdev->dev, PLATFORM_DEVID_NONE, + mt6323_devs, ARRAY_SIZE(mt6323_devs), + NULL, 0, pmic->irq_domain); break; case MT6397_CID_CODE: @@ -314,9 +314,9 @@ static int mt6397_probe(struct platform_device *pdev) if (ret) return ret; - ret = devm_mfd_add_devices(&pdev->dev, -1, mt6397_devs, - ARRAY_SIZE(mt6397_devs), NULL, - 0, pmic->irq_domain); + ret = devm_mfd_add_devices(&pdev->dev, PLATFORM_DEVID_NONE, + mt6397_devs, ARRAY_SIZE(mt6397_devs), + NULL, 0, pmic->irq_domain); break; default: 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: 11002079 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 7B0B51395 for ; Tue, 18 Jun 2019 15:44:10 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6A7E128A89 for ; Tue, 18 Jun 2019 15:44:10 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5EC2428A96; Tue, 18 Jun 2019 15:44:10 +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 EDF9B28A89 for ; Tue, 18 Jun 2019 15:44:09 +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=6hGjADRr5ocIBBQXNhox0C6w+udm0PM9W32T6bCRZmU=; b=p7ReNZ7aOy7/UM XtEcWgNDJzDevQsw/DESwAwj0/QRblHGxfHlotHhLug0yTG5lisr8rJBKLpuVEQ0aJwD5MePkty4f 7gRYgCeypy0cXiaO16dSLW52kQqKbfHJP7pVZub0nJ/78LirK+JTohQGewNARPmcYZzK/VFf5Xlhr 22UxzGt+cRsxlJuk5XB31rnCPGC603BiviqS7IbYUelylgT3qOZ3mgevnLYms74wRTF3724cbZIyG Hy7I3/kF7HDtb3W2o6PJecFI5UV5XwtVy41hS7aV2wDQpFyCM4bNNBTC3OiBzrrmfTamWWcCLZoPB cnOT20XLZxrSu4faHjRw==; 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 1hdGHI-0007IH-GM; Tue, 18 Jun 2019 15:44:08 +0000 Received: from mail-wm1-x341.google.com ([2a00:1450:4864:20::341]) by bombadil.infradead.org with esmtps (Exim 4.92 #3 (Red Hat Linux)) id 1hdGH3-0007Cs-Of for linux-arm-kernel@lists.infradead.org; Tue, 18 Jun 2019 15:43:56 +0000 Received: by mail-wm1-x341.google.com with SMTP id v19so3771406wmj.5 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=CgnHgErKWerYfyvj9dun+wfa51mPk/mVnqL5Rp9hdEUOY6NjmUkc24lh6xz+meoOSH 3z/tNn0u73Ll4KtvhQvbxp71ksoEArx9R+iE+n5ZksI9TNe39lEqFP+kSuy+b2N1zbS2 j/wQVGr+cI7694YBHrtLL+IXFZf0UeM7kwbvW+e5r6234OieSWRZgEhu2bHXpOQFSu3G Vv1MJbInkKoTuiwWjSdpe3SNhuHo6k0I63H1/cFQu/KCrx9jq/CgmSzWngpKZoRtItTU B33pEw82y2E6wqO9SD2BZDd3BG5LXDHetjkmMb1ib0GhHefL97RaVhRo9mvQ0lusP3qE hciA== X-Gm-Message-State: APjAAAW1O+yuKUu58e1aqgxw12VHG8vk7aonKiPkN0oF0Vjph6G6Sl/a FiCyzoaRP2aNPFUN5/DJnTWqYw== 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_819337_7876F23A X-CRM114-Status: GOOD ( 10.60 ) X-BeenThere: linux-arm-kernel@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-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=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[] = {