Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp1158628pxb; Fri, 6 Nov 2020 02:30:14 -0800 (PST) X-Google-Smtp-Source: ABdhPJzn2FXzDo+bkeJWhtMHWIsMdfnJQX8mu9vJldUC16v6jRHX+u0aVSHuc0lyWNIeY4d5pETn X-Received: by 2002:aa7:cb4a:: with SMTP id w10mr1270971edt.343.1604658614470; Fri, 06 Nov 2020 02:30:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1604658614; cv=none; d=google.com; s=arc-20160816; b=YUJnyDKyCPj6XFDNrN1acxTbIrDG7vxUpxUVYKRCkwExkDvIezXkX2fz3iKiSqOVfn EzYMHgIZD+0n6eYDIHx3kMzyOTPzDpsWMFtkJsN6H54mgjYeFp+jmNnro0Q081NxpvYc MHfdWAte5WRhLkIikfIt8ik80g3O/K8ROyT4MAqSpaR4ZRA/ifs2tlZaUqhiDvrCFL7u Rjo0Sz1/+EhvNOd7RjfxVyt9mfrG5+Z3BnNgsA4MunEdpMExe1uJ525CoQYfPVMMTp1W zWH5mis71kB+n0hMa8Ir2g6PbxRFWP3U+IhDKJqyKoDwO1e3E3VHxIRRJyML1hB2xYhV cKHg== 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=sie6Ok4mlr9HWDpV1MC03OrgT3qnjwcXYjtFoY6fZME=; b=NKDwOX2WQSUrJVUEXSdGa+h68fwfAXV6O7YPAEdfpcFnH0ujUpw9WJfO4dLIEkw4ca QuiaVXPQ6rCWGqLul3ECbo3I/4pf6owBxTlPAHsiACC12jXpHfxRgMrl76pB2ZtnUAPU sJMd9Ei1fYEUVO5L7v8TqioptWsQyP5VUQUcSecTHpCui2LVgB+tYljVXO+amlSuPXxs 3ASjy9sMlC352Y2T0HP6IgAEgfiTboAm/D2HI+ywQ588xBD4wEdT+qo9QsN9Jnb1EjH1 5Hs+HI3+Stl+gxqkndr5R296zltDxFi5Y6p0GNhVG+mUA+EGpmzI3VwDknx+ak/PlKTI 44Aw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=BicWgc2s; 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 z1si665644edp.20.2020.11.06.02.29.52; Fri, 06 Nov 2020 02:30:14 -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=BicWgc2s; 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 S1727160AbgKFK0N (ORCPT + 99 others); Fri, 6 Nov 2020 05:26:13 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33830 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727148AbgKFK0L (ORCPT ); Fri, 6 Nov 2020 05:26:11 -0500 Received: from mail-pg1-x52a.google.com (mail-pg1-x52a.google.com [IPv6:2607:f8b0:4864:20::52a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DEF60C0613CF; Fri, 6 Nov 2020 02:26:10 -0800 (PST) Received: by mail-pg1-x52a.google.com with SMTP id h6so606745pgk.4; Fri, 06 Nov 2020 02:26:10 -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=sie6Ok4mlr9HWDpV1MC03OrgT3qnjwcXYjtFoY6fZME=; b=BicWgc2skITP6pCnRp+XYsBk/xqMSnzp7eK/v1Lu8Ftv82GrJTw3f8yEN0u/AdQw3C M37EzjjnJL425kb1Qhdmh5+ToMRA+C6EeOzRUd1hBN3JwJptJMyWHkYzE9Ushr50TLPB i41g7xbhZBlOFKiUFoqTmkdydxxHJ7+1+R+4SbBtR5boQnr00JdwCMulxASZC2xjdxGH wSMhJdWgQnEBJeJuAjrRDQH0faPd+NiOUMNSWIEeK0t0GKiLINpdvxGgXGLa/ZB3RxO5 lnyMHgp+9uR8YT4LWCbXkpyexMezOm+VbbqiQjtllMNvkDXhbHClP7Pd53K2gS2zJzSM wPRg== 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=sie6Ok4mlr9HWDpV1MC03OrgT3qnjwcXYjtFoY6fZME=; b=bEM+YnMtTIoCA1k9sdI211pdrTi3htsW0XPktyzzQxWpyuoDBm0XXSfGtYNsA/HGbG 5HOOXbqsVrdghA2NMqLpv/pLIRU83RIvPZkIb3UdL4bPgbJ9BVwxWq3Pm70x7+SNp7cC z6vlFgNg5rHDVyHYZMwWfokOptM6WtKUOGSmV0wFkbcOifbPjhA2wXs2VPPKStnjPZGB FRnvdYu1Z9SBHAfKqKzvEO/Lr1abA9SY/dbZA9SAPjKlqRo7vT1HTAuJezYtb+QLgIyo AaGEyVhJA4otALJxtxZZSAY8b6VUcQakWUkefQCD/Y+/XVKwjwbZqRdsZuNXVkCqnx/B t2WA== X-Gm-Message-State: AOAM533BqeYxam5aaoNzoHMG+tgOAfbilyb35xx/xaTMu6Arhc0qmhsf NAE4flofvBKNEFt1U1GUddA= X-Received: by 2002:a17:90a:fa93:: with SMTP id cu19mr1854974pjb.117.1604658370559; Fri, 06 Nov 2020 02:26:10 -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.07 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 06 Nov 2020 02:26:10 -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 07/11] mfd: mt6360: Remove handle_post_irq callback function Date: Fri, 6 Nov 2020 17:53:48 +0800 Message-Id: <1604656432-10215-8-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 Remove handle_post_irq which is used to retrigger IRQ. Set IRQ level low trigger in dtsi to keep IRQ always be handled. Signed-off-by: Gene Chen Acked-for-MFD-by: Lee Jones --- drivers/mfd/mt6360-core.c | 17 ++++------------- include/linux/mfd/mt6360.h | 2 +- 2 files changed, 5 insertions(+), 14 deletions(-) diff --git a/drivers/mfd/mt6360-core.c b/drivers/mfd/mt6360-core.c index f75122b..2356d99 100644 --- a/drivers/mfd/mt6360-core.c +++ b/drivers/mfd/mt6360-core.c @@ -208,15 +208,8 @@ static const struct regmap_irq mt6360_irqs[] = { REGMAP_IRQ_REG_LINE(MT6360_LDO7_PGB_EVT, 8), }; -static int mt6360_pmu_handle_post_irq(void *irq_drv_data) -{ - struct mt6360_ddata *ddata = irq_drv_data; - - return regmap_update_bits(ddata->regmap, - MT6360_PMU_IRQ_SET, MT6360_IRQ_RETRIG, MT6360_IRQ_RETRIG); -} - -static struct regmap_irq_chip mt6360_irq_chip = { +static const struct regmap_irq_chip mt6360_irq_chip = { + .name = "mt6360_irqs", .irqs = mt6360_irqs, .num_irqs = ARRAY_SIZE(mt6360_irqs), .num_regs = MT6360_PMU_IRQ_REGNUM, @@ -225,7 +218,6 @@ static struct regmap_irq_chip mt6360_irq_chip = { .ack_base = MT6360_PMU_CHG_IRQ1, .init_ack_masked = true, .use_ack = true, - .handle_post_irq = mt6360_pmu_handle_post_irq, }; static const struct regmap_config mt6360_pmu_regmap_config = { @@ -339,10 +331,9 @@ static int mt6360_probe(struct i2c_client *client) return -ENODEV; } - mt6360_irq_chip.irq_drv_data = ddata; ret = devm_regmap_add_irq_chip(&client->dev, ddata->regmap, client->irq, - IRQF_TRIGGER_FALLING, 0, - &mt6360_irq_chip, &ddata->irq_data); + 0, 0, &mt6360_irq_chip, + &ddata->irq_data); if (ret) { dev_err(&client->dev, "Failed to add Regmap IRQ Chip\n"); return ret; diff --git a/include/linux/mfd/mt6360.h b/include/linux/mfd/mt6360.h index 81bca7c..ef8257d 100644 --- a/include/linux/mfd/mt6360.h +++ b/include/linux/mfd/mt6360.h @@ -230,7 +230,7 @@ struct mt6360_ddata { #define MT6360_PMU_MAXREG MT6360_PMU_LDO_MASK2 /* MT6360_PMU_IRQ_SET */ -#define MT6360_PMU_IRQ_REGNUM (MT6360_PMU_LDO_IRQ2 - MT6360_PMU_CHG_IRQ1 + 1) +#define MT6360_PMU_IRQ_REGNUM 16 #define MT6360_IRQ_RETRIG BIT(2) #define CHIP_VEN_MASK 0xF0 -- 2.7.4