Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp1157709pxb; Fri, 6 Nov 2020 02:28:10 -0800 (PST) X-Google-Smtp-Source: ABdhPJxwAEfr3MN4CF/X1Y4TI0zlsCgHLjT/MisYxdAdkgqlE91Vqo0fPbmhvwJe7B62bJNifWiV X-Received: by 2002:a05:6402:1158:: with SMTP id g24mr1200067edw.323.1604658489858; Fri, 06 Nov 2020 02:28:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1604658489; cv=none; d=google.com; s=arc-20160816; b=mPLmSKv8gdc+lh8OPKZgLmguC4aJ6k3zP1pk0QNyfSByY2c9ejbBTl5U4TuB79mWgq bsCTAt5t/t7/mKQpjiG/MtOUOQtsg6VIKy3njjt4GUGvOFbE6/XJ7dzsXjzrtCFH1kuM 8FMzfnAqk49Pbr64FNlyP9Awzthy29bKDWpWYPlOkC2RSW3PZPrrEp6LwyXzQ1ZsCEU+ InISkZaCx1i4xTIfWb1DoJbqCeu3WKUiIHQqXZzOWXqwXqaRfnjUAyncsb4thetI2NkW aWY9DPikIWpRzirDW07X+s/Et9eRZ+qHEGucUZCP+VNYzSQEHNgo5mhCTm0CqyQWeMLq 91lQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:references:in-reply-to:message-id:date:subject :cc:to:from:dkim-signature; bh=0+hwdde/9osqDF4pD01phKptpQ7KgGy01PbwrfMbdCM=; b=dwbxWjIcKNcPP93SPaS+su21DqGr1hjSbiGr0MLsLcpUjOKQltBYXSQwTEapz51DY/ habd4UC9E2TdW4oCJ4jVUi3WoQZ1xGXbgfjbDNLDHa4rEZ9v1SkeDXxopqn9Pi2H64g5 Xd40weXUAqy0wEw6p5HGM4mVItaMeQkRkKgXNtTcvHHMmI9f9uIA69ouLogF9uzZ3HPv B+5oEXGhazoELHiiteap8yuPiOeALVFqiLA70K+JHE1Umm+fGCOKjb6MquxBvB5vo5S0 nwEj0+yRdoF5FfvfHI/+OPeW+JZswWIYgbnlihUD5/wWPKv0MaRiYfGG29h3AgB+aADN EnRw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="NjYXv/C0"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id v14si455006edb.336.2020.11.06.02.27.47; Fri, 06 Nov 2020 02:28:09 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="NjYXv/C0"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727117AbgKFK0G (ORCPT + 99 others); Fri, 6 Nov 2020 05:26:06 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33806 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727100AbgKFK0E (ORCPT ); Fri, 6 Nov 2020 05:26:04 -0500 Received: from mail-pf1-x441.google.com (mail-pf1-x441.google.com [IPv6:2607:f8b0:4864:20::441]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 32E71C0613CF; Fri, 6 Nov 2020 02:26:04 -0800 (PST) Received: by mail-pf1-x441.google.com with SMTP id z3so895021pfb.10; Fri, 06 Nov 2020 02:26:04 -0800 (PST) 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; bh=0+hwdde/9osqDF4pD01phKptpQ7KgGy01PbwrfMbdCM=; b=NjYXv/C0HRerNGBwOZWOLTV8zHvOAsU7BGKV1aOnjVXydCW1Bam7ZdptMj5e1L+R/z 9+dwK9e1N5/Qp+AAMlg16LOZWAjT17nNbVZ72nEpau1Hj73VNVDnI5Hu1xUjby4ZRrN5 U/Ja5PfPCmT+3hhTqM+9OrlCwR/NzsTEzzD/y3IqgOSMS9QOKZLHDi5+fCPpn/pLMN1m v+lu72nWmHO92wFeFO2J7m1/XN8dptiDI2rmpAAAJVK3DNwDbSHXkZ4lKukKGYmJcrc4 2+b/eOmMCR7WNCmROhMBZ/ffJDQUWk6SJ+NtLxwhPBjdRyU0oyH/QLljaRJV7KfmMYzh YCOA== 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; bh=0+hwdde/9osqDF4pD01phKptpQ7KgGy01PbwrfMbdCM=; b=rZx47nXABmzkJ5J5tByHja97pcHmBUJGPnQRDigKifKMVEoyJ3vYqH84pM775RFLc3 jXYup1905yRgZMBoVvvh4fy8R1MWgZ4dFRKS3JFy1V7lXshvm45uyCahTwDYHa/mcBnT pL2UJwMQg0kfer6hxk8IOH2Sl8RC7gjtDRwQjwXetSdmM2S6oxQGaWsiXHV8UGSyfDaT 2EiYeVyg0SnEphhzgKoYfn7MlqV8y+Lhyo+qvkRarHldq1PXQO/wh457Uthedx0eTbjl y3SHftfD+t7sfDrrcKKp1p3Y+wVyHgeTpA8gQcHH9jqCvFONsrkc2dfbsQiPJ6V2K4Yi z02g== X-Gm-Message-State: AOAM531TZeB/zv5FwIXvJyTbiPXPAoyghd7qVUHyugdY+hCIGFv6z9dM tY5uNDGRGcgA6YaMqAMnDvc= X-Received: by 2002:a65:6283:: with SMTP id f3mr1184440pgv.254.1604658363727; Fri, 06 Nov 2020 02:26:03 -0800 (PST) Received: from localhost.localdomain ([2402:7500:57a:6823:8ab3:4b5d:4c53:f39b]) by smtp.gmail.com with ESMTPSA id g3sm1260633pgl.55.2020.11.06.02.26.00 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 06 Nov 2020 02:26:03 -0800 (PST) From: Gene Chen To: sre@kernel.org, matthias.bgg@gmail.com, robh+dt@kernel.org Cc: linux-pm@vger.kernel.org, devicetree@vger.kernel.org, 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, benjamin.chao@mediatek.com Subject: [PATCH v6 05/11] mfd: mt6360: Rename mt6360_pmu_data by mt6360_ddata Date: Fri, 6 Nov 2020 17:53:46 +0800 Message-Id: <1604656432-10215-6-git-send-email-gene.chen.richtek@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1604656432-10215-1-git-send-email-gene.chen.richtek@gmail.com> References: <1604656432-10215-1-git-send-email-gene.chen.richtek@gmail.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Gene Chen Rename mt6360_pmu_data by mt6360_ddata 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 | 44 ++++++++++++++++++++++---------------------- include/linux/mfd/mt6360.h | 2 +- 2 files changed, 23 insertions(+), 23 deletions(-) diff --git a/drivers/mfd/mt6360-core.c b/drivers/mfd/mt6360-core.c index 5119e51..332eb5d 100644 --- a/drivers/mfd/mt6360-core.c +++ b/drivers/mfd/mt6360-core.c @@ -210,9 +210,9 @@ static const struct regmap_irq mt6360_pmu_irqs[] = { static int mt6360_pmu_handle_post_irq(void *irq_drv_data) { - struct mt6360_pmu_data *mpd = irq_drv_data; + struct mt6360_ddata *ddata = irq_drv_data; - return regmap_update_bits(mpd->regmap, + return regmap_update_bits(ddata->regmap, MT6360_PMU_IRQ_SET, MT6360_IRQ_RETRIG, MT6360_IRQ_RETRIG); } @@ -310,61 +310,61 @@ static const unsigned short mt6360_slave_addr[MT6360_SLAVE_MAX] = { static int mt6360_pmu_probe(struct i2c_client *client) { - struct mt6360_pmu_data *mpd; + struct mt6360_ddata *ddata; unsigned int reg_data; int i, ret; - mpd = devm_kzalloc(&client->dev, sizeof(*mpd), GFP_KERNEL); - if (!mpd) + ddata = devm_kzalloc(&client->dev, sizeof(*ddata), GFP_KERNEL); + if (!ddata) return -ENOMEM; - mpd->dev = &client->dev; - i2c_set_clientdata(client, mpd); + ddata->dev = &client->dev; + i2c_set_clientdata(client, ddata); - mpd->regmap = devm_regmap_init_i2c(client, &mt6360_pmu_regmap_config); - if (IS_ERR(mpd->regmap)) { + ddata->regmap = devm_regmap_init_i2c(client, &mt6360_pmu_regmap_config); + if (IS_ERR(ddata->regmap)) { dev_err(&client->dev, "Failed to register regmap\n"); - return PTR_ERR(mpd->regmap); + return PTR_ERR(ddata->regmap); } - ret = regmap_read(mpd->regmap, MT6360_PMU_DEV_INFO, ®_data); + ret = regmap_read(ddata->regmap, MT6360_PMU_DEV_INFO, ®_data); if (ret) { dev_err(&client->dev, "Device not found\n"); return ret; } - mpd->chip_rev = reg_data & CHIP_REV_MASK; - if (mpd->chip_rev != CHIP_VEN_MT6360) { + ddata->chip_rev = reg_data & CHIP_REV_MASK; + if (ddata->chip_rev != CHIP_VEN_MT6360) { dev_err(&client->dev, "Device not supported\n"); return -ENODEV; } - mt6360_pmu_irq_chip.irq_drv_data = mpd; - ret = devm_regmap_add_irq_chip(&client->dev, mpd->regmap, client->irq, + mt6360_pmu_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, &mpd->irq_data); + &mt6360_pmu_irq_chip, &ddata->irq_data); if (ret) { dev_err(&client->dev, "Failed to add Regmap IRQ Chip\n"); return ret; } - mpd->i2c[0] = client; + ddata->i2c[0] = client; for (i = 1; i < MT6360_SLAVE_MAX; i++) { - mpd->i2c[i] = devm_i2c_new_dummy_device(&client->dev, + ddata->i2c[i] = devm_i2c_new_dummy_device(&client->dev, client->adapter, mt6360_slave_addr[i]); - if (IS_ERR(mpd->i2c[i])) { + if (IS_ERR(ddata->i2c[i])) { dev_err(&client->dev, "Failed to get new dummy I2C device for address 0x%x", mt6360_slave_addr[i]); - return PTR_ERR(mpd->i2c[i]); + return PTR_ERR(ddata->i2c[i]); } - i2c_set_clientdata(mpd->i2c[i], mpd); + i2c_set_clientdata(ddata->i2c[i], ddata); } ret = devm_mfd_add_devices(&client->dev, PLATFORM_DEVID_AUTO, mt6360_devs, ARRAY_SIZE(mt6360_devs), NULL, - 0, regmap_irq_get_domain(mpd->irq_data)); + 0, regmap_irq_get_domain(ddata->irq_data)); if (ret) { dev_err(&client->dev, "Failed to register subordinate devices\n"); diff --git a/include/linux/mfd/mt6360.h b/include/linux/mfd/mt6360.h index 72edf13..81bca7c 100644 --- a/include/linux/mfd/mt6360.h +++ b/include/linux/mfd/mt6360.h @@ -21,7 +21,7 @@ enum { #define MT6360_LDO_SLAVEID 0x64 #define MT6360_TCPC_SLAVEID 0x4E -struct mt6360_pmu_data { +struct mt6360_ddata { struct i2c_client *i2c[MT6360_SLAVE_MAX]; struct device *dev; struct regmap *regmap; -- 2.7.4