From patchwork Thu Feb 16 22:31:59 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aidan MacDonald X-Patchwork-Id: 58272 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp564427wrn; Thu, 16 Feb 2023 14:36:35 -0800 (PST) X-Google-Smtp-Source: AK7set+eiDAV3XsOSkDz9q0TlKMIlACV7ColzlIhKocL3DoPXbjzKm8UABw3T+9khM4eksv6o0rG X-Received: by 2002:a05:6a20:1e62:b0:c7:6c6f:7722 with SMTP id cy34-20020a056a201e6200b000c76c6f7722mr605604pzb.7.1676586995652; Thu, 16 Feb 2023 14:36:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1676586995; cv=none; d=google.com; s=arc-20160816; b=IqMcxVDj/B8smBVOSzJf0OWF2LjP0Y3oEB0YGYIgixwgfkM3glg2VcvV8gDhDBLV7h mFXYdEnmC3rIEogMJ9/ylqe5MudoyY6O8v6P2KNdUGAB6HCUqTp/rinMJG3D2fVzvU7e WkoiX2sGKFk8K8h1jOZudv1Q9X0dMIl2ZbWY+8G4sjTHdjim4H04RzHGtgr6Lmr9f+o8 WKe9yHij9RRPnieccfowvhUzDIbM9rs53r34Q82ceQyRS52ZM8GGQ/nSL3WhVFUCkWIj 6X1ZZ3MwooSE+pvyYaq1DEmE/q9pn5F7GAFGB7jt14XlsT7x8UIsXL2hQYobw3Q74Jpy MhRw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=f5vXNR+H0c80bTIPdRkMX1RbvYvrD4ce9/JGf1xe3NU=; b=at2JVlDM7Vm9HqBR7acNN6M9c8aFcRWZa9N/42nt1CitaJujhAMgDhhiy5hTNt4tQU 4zXTmJp3Aa16lsgdU+nep0DIn9P0h44T7L4EMEeJjkQ6WlRi9SPBK+ipRRD//MpyNqvq JSZaa5oFrOF8VPOEECt6dsbPrkjGZNA6dLMOuukZFOLHMyGnT8cP3HMt8F4UHyZX5y7s cntE8ql8BbZTTrVlQlPMXQAiaaD/NTVzezbEYdQk1Acp92DVGiI9vNOVlUyUlnLvV2b7 3Xos6CMh42LjSUUzOj1nCUStF6la+pZzqBs3XSxl+nz83nlr54kUMJUORs1xCLgip1gL YBKw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=k61SMX1K; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id v185-20020a6389c2000000b0049b37046fbcsi2872559pgd.391.2023.02.16.14.36.22; Thu, 16 Feb 2023 14:36:35 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=k61SMX1K; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 S229854AbjBPWcZ (ORCPT + 99 others); Thu, 16 Feb 2023 17:32:25 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38932 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229475AbjBPWcX (ORCPT ); Thu, 16 Feb 2023 17:32:23 -0500 Received: from mail-wm1-x334.google.com (mail-wm1-x334.google.com [IPv6:2a00:1450:4864:20::334]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 651AA4C3FA for ; Thu, 16 Feb 2023 14:32:12 -0800 (PST) Received: by mail-wm1-x334.google.com with SMTP id m20-20020a05600c3b1400b003e1e754657aso5417202wms.2 for ; Thu, 16 Feb 2023 14:32:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=f5vXNR+H0c80bTIPdRkMX1RbvYvrD4ce9/JGf1xe3NU=; b=k61SMX1KONa9iIwehIQCaziylg3pU9/0NrlOH9Hn+OQjDN6wbgXkM9RHYX+r7+lAuu jzbuPTNK3M1N0Mfo+tF9uRANQzUn0/Xrg/ZLfBvQSxV8+UYN8Gp00TGUCcohgzIF0vSC K0c790y0PII1LJ+rOuYrg5NSkGlyCJ0I9lhbnkKV1dYzsNi2T11orf7ZW9Wjkgh0+axh QMTI99YrfV/oYznnM1UnHvo6ERVyd088YMzgY6DMRxt5dKbz+m4feKuOjcsNMRM08GBN ys0kI7EP/NtksrCM1J/xa8vzp7W8qdToxAKrqfm41cFFbQO2tSpnksTHYIX7OFuaFSyB qzSw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=f5vXNR+H0c80bTIPdRkMX1RbvYvrD4ce9/JGf1xe3NU=; b=vNkG3Ei7PLCyyU+YEGMcLuzTaYTgqEl0lbA8y1khj72/x38lZdzvMAtoo/me+s85k2 NDuP/WzbnTFMDrbt7hQYCVn60UthGybbKTZHaNqEA0/YPoMCH1zoCJ4xguY0Vk7D4E3M YVB/dHonMJT59bHVlpPlj4EXvVt6ZjBsnlZOvSgUu35giM9Mi47pnKkBfOj/s2HWCxrl YbtSU5b1XqrORezI1nyQb4sIIrJdVdi54L/HjbmBz86vCseFbPiKRWrM2xm/sQwwJOGo AEeIawNSZ849VYRp7fcbCNkALFSBLmpsspxlRfql61nrQqSfivmnsSPEGC2nLfrSi/F2 nv5A== X-Gm-Message-State: AO0yUKXa4xlXbRcpC4AHpRhDAJiZqBJQI+lJCHbCJMfJ6LSSN2ex6VDz 0VRPs4QpQ2uQXZV8PvAYk/JHXh78mnE= X-Received: by 2002:a05:600c:816:b0:3dc:5390:6499 with SMTP id k22-20020a05600c081600b003dc53906499mr6517227wmp.1.1676586730839; Thu, 16 Feb 2023 14:32:10 -0800 (PST) Received: from localhost (94.197.187.145.threembb.co.uk. [94.197.187.145]) by smtp.gmail.com with ESMTPSA id bg30-20020a05600c3c9e00b003db012d49b7sm14516056wmb.2.2023.02.16.14.32.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 16 Feb 2023 14:32:10 -0800 (PST) From: Aidan MacDonald To: broonie@kernel.org Cc: gregkh@linuxfoundation.org, rafael@kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v1 1/2] regmap-irq: Remove unused type_invert flag Date: Thu, 16 Feb 2023 22:31:59 +0000 Message-Id: <20230216223200.150679-1-aidanmacdonald.0x0@gmail.com> MIME-Version: 1.0 X-Spam-Status: No, score=-1.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1758028885125989426?= X-GMAIL-MSGID: =?utf-8?q?1758028885125989426?= type_invert is deprecated and no longer used; it can now be removed. Signed-off-by: Aidan MacDonald --- drivers/base/regmap/regmap-irq.c | 11 ++--------- include/linux/regmap.h | 3 --- 2 files changed, 2 insertions(+), 12 deletions(-) diff --git a/drivers/base/regmap/regmap-irq.c b/drivers/base/regmap/regmap-irq.c index a8f185430a07..e3092f522107 100644 --- a/drivers/base/regmap/regmap-irq.c +++ b/drivers/base/regmap/regmap-irq.c @@ -189,12 +189,8 @@ static void regmap_irq_sync_unlock(struct irq_data *data) if (!d->type_buf_def[i]) continue; reg = d->get_irq_reg(d, d->chip->type_base, i); - if (d->chip->type_invert) - ret = regmap_update_bits(d->map, reg, - d->type_buf_def[i], ~d->type_buf[i]); - else - ret = regmap_update_bits(d->map, reg, - d->type_buf_def[i], d->type_buf[i]); + ret = regmap_update_bits(d->map, reg, + d->type_buf_def[i], d->type_buf[i]); if (ret != 0) dev_err(d->map->dev, "Failed to sync type in %x\n", reg); @@ -1028,9 +1024,6 @@ int regmap_add_irq_chip_fwnode(struct fwnode_handle *fwnode, ret = regmap_read(map, reg, &d->type_buf_def[i]); - if (d->chip->type_invert) - d->type_buf_def[i] = ~d->type_buf_def[i]; - if (ret) { dev_err(map->dev, "Failed to get type defaults at 0x%x: %d\n", reg, ret); diff --git a/include/linux/regmap.h b/include/linux/regmap.h index a3bc695bcca0..2114679729ce 100644 --- a/include/linux/regmap.h +++ b/include/linux/regmap.h @@ -1547,8 +1547,6 @@ struct regmap_irq_chip_data; * @ack_invert: Inverted ack register: cleared bits for ack. * @clear_ack: Use this to set 1 and 0 or vice-versa to clear interrupts. * @wake_invert: Inverted wake register: cleared bits are wake enabled. - * @type_invert: Invert the type flags. Deprecated, use config registers - * instead. * @type_in_mask: Use the mask registers for controlling irq type. Use this if * the hardware provides separate bits for rising/falling edge * or low/high level interrupts and they should be combined into @@ -1625,7 +1623,6 @@ struct regmap_irq_chip { unsigned int clear_ack:1; unsigned int wake_invert:1; unsigned int runtime_pm:1; - unsigned int type_invert:1; unsigned int type_in_mask:1; unsigned int clear_on_unmask:1; unsigned int not_fixed_stride:1;