From patchwork Mon May 17 17:33:10 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gene Chen X-Patchwork-Id: 12262659 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.7 required=3.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED,DKIM_SIGNED,DKIM_VALID,FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A310BC433B4 for ; Mon, 17 May 2021 17:35:50 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 2221961263 for ; Mon, 17 May 2021 17:35:50 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 2221961263 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; h=Sender:Content-Transfer-Encoding :Content-Type:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:Cc:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=A4afavw2p7jO2Dr/CKVBXxrtlr4a4/Z7U/5Nv/tzjZ4=; b=A5N+Qcwm1j4liR3ESmb+R+jr+ JPTzbIf3KdqRF9QsUxhC1r64y5L8MfniDlU75/rLvcsEI9YrdJI0WDWsJ29wdJqNNaWW9Um1QA5Ig uLkG6b5eFPxr+PBTp39VFaZqaQLST3kcWuE4sr9a4IKJf1azf0dSEtWGng9lGoDOjwUGR7KZhC+rh UNArdCCjQtvU68GIr7bpf0rPbv9niiTHDBDBYSCxYbT/7l24WmkQByrx6eVkzkvFwcEooDVyrvbNK gIuJ7puO3AiwMGoFw5NBop9pPch4aZtdVFfSoyRvXN0zzWsPZyTEC4sBWkJYa6DnHYGYwuVcvV/En GEArwad5A==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lih9U-00FflN-PV; Mon, 17 May 2021 17:35:38 +0000 Received: from bombadil.infradead.org ([2607:7c80:54:e::133]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lih7f-00FfC3-IW; Mon, 17 May 2021 17:33:44 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender :Reply-To:Content-Type:Content-ID:Content-Description; bh=CB4Au2rqSYHXECUUAhAdaBH6k6u8w52lE27aVDKXkVs=; b=lQG1eYEHAwPzwEPkMy+5sH6d1j N5pYdWf4KXF3Mep6msXkx4iaJH1JMFwER+bu+5p09z4gvwMtGDOFWq6aKHnqBaqZCbNxMcitno4DE haHfb0/Y/VxJKrci/q/hgk+RWEWmSiGFyyiHMreDVGsi4YXBUh9dioVcUT4SNJZmMp+u7we/54FOv bhns25mtWJ6GbRdPZAU/okbBoxiaTu/rI79uxDH7TWWgvyTUHFbJvLR80RZdHKsy8PAsG6OVT4hru UC5YYtP71RmTePi/419rMLuuEhAGJnEPmIm0GkFAtnWSeJ+TN/wk7w9Sf8jlYBvBwWyh5clrGDpUu QjyEIbNQ==; Received: from mail-pl1-x636.google.com ([2607:f8b0:4864:20::636]) by bombadil.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lih7c-00E1LJ-SG; Mon, 17 May 2021 17:33:42 +0000 Received: by mail-pl1-x636.google.com with SMTP id t21so3572507plo.2; Mon, 17 May 2021 10:33:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=CB4Au2rqSYHXECUUAhAdaBH6k6u8w52lE27aVDKXkVs=; b=jGukvu2dZ/zb7kxFUpN9TTZJzR1v/A/DuNlNnzU1GGSpuBD6Wqv9TAYDju1mGkgOwo Kb7sV29UIR4fbYuqsh/8wZD7xf3d6/N6JWvVCTedYbmXDJQO572LCGwh5EidUMxnTU9b hmV1HHV27a54bh9DU90d2hRVSr5iytr+5IPJq1rwYmAX3BgfE2jDHLSTkME0Vq/RbFUO sfAJzHaMlFnb6BKVeEY46ELlEtoo3vSj3eQieI6SeHp6++x5qOsjK0JJZtsGH2wJbYBP JFRsy/b6bbzRc6FFrWuFW/rYlsJlBv37WJ4gLO1KMOc8HNDLt8Pj1PQpHaJgl3TRKZ0M 4xjg== 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=CB4Au2rqSYHXECUUAhAdaBH6k6u8w52lE27aVDKXkVs=; b=bWawX73W2Si80ESiMoAe5W5O8cyfneR0AywmqwrfYjZI5yVcsDUGi01NwT1fOP9fs2 kEfle1EDWAHHTihHSQ+zJggV17dZjr8kBROxjvRr0IOFuUy+srvOuDsjExQQa9h+KKer mwXzxc94bkTlHNx5CqfXOpb6SQEDcz82TO0td+mAxqXQVqenf+fLZCXhcNlEvKSKgJMC fOYyFpbrJ/5/Fl3IO4cwur2OvQCeqVbUb3qp6vtY4+7eS5oLX/DmWi10452BkEboLjBk JR0dz9+Z12QhE0Odyqy9hnjsUsD6SmV+IeQ7M1DAy3n142rYb+vjRJxv6Ki4+Nk5enrq qhwA== X-Gm-Message-State: AOAM532+Y8QNkGm1TkYE0BVUssBujtJsq3WsXnSCDHHo7jwuPak/W1ti t3rUs+/rtQwodrpWp5LcaNo= X-Google-Smtp-Source: ABdhPJzyfwYjyFvqUbx1tP8+gQlY1S9t/qXdn6EliB5T1FBoMnA8SMd4s7Id2z/vA6KCyrKnKXeKSw== X-Received: by 2002:a17:902:d508:b029:ef:b008:f4ad with SMTP id b8-20020a170902d508b02900efb008f4admr1213047plg.8.1621272819913; Mon, 17 May 2021 10:33:39 -0700 (PDT) Received: from localhost.localdomain ([2402:7500:47e:c24d:6c72:a52:2c8:7df1]) by smtp.gmail.com with ESMTPSA id c12sm10358296pfr.154.2021.05.17.10.33.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 May 2021 10:33:39 -0700 (PDT) From: Gene Chen To: lee.jones@linaro.org, matthias.bgg@gmail.com Cc: linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org, gene_chen@richtek.com, Wilma.Wu@mediatek.com, shufan_lee@richtek.com, cy_huang@richtek.com Subject: [PATCH v8 06/10] mfd: mt6360: Rename mt6360_pmu by mt6360 Date: Tue, 18 May 2021 01:33:10 +0800 Message-Id: <20210517173314.140912-7-gene.chen.richtek@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210517173314.140912-1-gene.chen.richtek@gmail.com> References: <20210517173314.140912-1-gene.chen.richtek@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210517_103340_936519_352D4D7F X-CRM114-Status: GOOD ( 13.22 ) X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org From: Gene Chen Rename mt6360_pmu by mt6360, because of including not only PMU part, but also entire MT6360 IC Signed-off-by: Gene Chen Acked-for-MFD-by: Lee Jones --- drivers/mfd/mt6360-core.c | 41 +++++++++++++++++++-------------------- 1 file changed, 20 insertions(+), 21 deletions(-) diff --git a/drivers/mfd/mt6360-core.c b/drivers/mfd/mt6360-core.c index 6428160ef19d..a1d74bb302cd 100644 --- a/drivers/mfd/mt6360-core.c +++ b/drivers/mfd/mt6360-core.c @@ -120,7 +120,7 @@ #define MT6360_LDO6_PGB_EVT 126 #define MT6360_LDO7_PGB_EVT 127 -static const struct regmap_irq mt6360_pmu_irqs[] = { +static const struct regmap_irq mt6360_irqs[] = { REGMAP_IRQ_REG_LINE(MT6360_CHG_TREG_EVT, 8), REGMAP_IRQ_REG_LINE(MT6360_CHG_AICR_EVT, 8), REGMAP_IRQ_REG_LINE(MT6360_CHG_MIVR_EVT, 8), @@ -217,9 +217,9 @@ static int mt6360_pmu_handle_post_irq(void *irq_drv_data) MT6360_PMU_IRQ_SET, MT6360_IRQ_RETRIG, MT6360_IRQ_RETRIG); } -static struct regmap_irq_chip mt6360_pmu_irq_chip = { - .irqs = mt6360_pmu_irqs, - .num_irqs = ARRAY_SIZE(mt6360_pmu_irqs), +static struct regmap_irq_chip mt6360_irq_chip = { + .irqs = mt6360_irqs, + .num_irqs = ARRAY_SIZE(mt6360_irqs), .num_regs = MT6360_PMU_IRQ_REGNUM, .mask_base = MT6360_PMU_CHG_MASK1, .status_base = MT6360_PMU_CHG_IRQ1, @@ -308,7 +308,7 @@ static const unsigned short mt6360_slave_addr[MT6360_SLAVE_MAX] = { MT6360_TCPC_SLAVEID, }; -static int mt6360_pmu_probe(struct i2c_client *client) +static int mt6360_probe(struct i2c_client *client) { struct mt6360_ddata *ddata; unsigned int reg_data; @@ -339,10 +339,10 @@ static int mt6360_pmu_probe(struct i2c_client *client) return -ENODEV; } - mt6360_pmu_irq_chip.irq_drv_data = ddata; + mt6360_irq_chip.irq_drv_data = ddata; ret = devm_regmap_add_irq_chip(&client->dev, ddata->regmap, client->irq, IRQF_TRIGGER_FALLING, 0, - &mt6360_pmu_irq_chip, &ddata->irq_data); + &mt6360_irq_chip, &ddata->irq_data); if (ret) { dev_err(&client->dev, "Failed to add Regmap IRQ Chip\n"); return ret; @@ -374,7 +374,7 @@ static int mt6360_pmu_probe(struct i2c_client *client) return 0; } -static int __maybe_unused mt6360_pmu_suspend(struct device *dev) +static int __maybe_unused mt6360_suspend(struct device *dev) { struct i2c_client *i2c = to_i2c_client(dev); @@ -384,7 +384,7 @@ static int __maybe_unused mt6360_pmu_suspend(struct device *dev) return 0; } -static int __maybe_unused mt6360_pmu_resume(struct device *dev) +static int __maybe_unused mt6360_resume(struct device *dev) { struct i2c_client *i2c = to_i2c_client(dev); @@ -395,25 +395,24 @@ static int __maybe_unused mt6360_pmu_resume(struct device *dev) return 0; } -static SIMPLE_DEV_PM_OPS(mt6360_pmu_pm_ops, - mt6360_pmu_suspend, mt6360_pmu_resume); +static SIMPLE_DEV_PM_OPS(mt6360_pm_ops, mt6360_suspend, mt6360_resume); -static const struct of_device_id __maybe_unused mt6360_pmu_of_id[] = { - { .compatible = "mediatek,mt6360_pmu", }, +static const struct of_device_id __maybe_unused mt6360_of_id[] = { + { .compatible = "mediatek,mt6360", }, {}, }; -MODULE_DEVICE_TABLE(of, mt6360_pmu_of_id); +MODULE_DEVICE_TABLE(of, mt6360_of_id); -static struct i2c_driver mt6360_pmu_driver = { +static struct i2c_driver mt6360_driver = { .driver = { - .name = "mt6360_pmu", - .pm = &mt6360_pmu_pm_ops, - .of_match_table = of_match_ptr(mt6360_pmu_of_id), + .name = "mt6360", + .pm = &mt6360_pm_ops, + .of_match_table = of_match_ptr(mt6360_of_id), }, - .probe_new = mt6360_pmu_probe, + .probe_new = mt6360_probe, }; -module_i2c_driver(mt6360_pmu_driver); +module_i2c_driver(mt6360_driver); MODULE_AUTHOR("Gene Chen "); -MODULE_DESCRIPTION("MT6360 PMU I2C Driver"); +MODULE_DESCRIPTION("MT6360 I2C Driver"); MODULE_LICENSE("GPL v2");