From patchwork Fri Nov 20 18:45:41 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Syed Nayyar Waris X-Patchwork-Id: 11921915 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=-14.2 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,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_SANE_1 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 0EACCC56201 for ; Fri, 20 Nov 2020 18:46:03 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id BB2842245F for ; Fri, 20 Nov 2020 18:46:02 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="U9H+SThK" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729245AbgKTSqC (ORCPT ); Fri, 20 Nov 2020 13:46:02 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43714 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727862AbgKTSqB (ORCPT ); Fri, 20 Nov 2020 13:46:01 -0500 Received: from mail-pg1-x541.google.com (mail-pg1-x541.google.com [IPv6:2607:f8b0:4864:20::541]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BFDF5C0613CF; Fri, 20 Nov 2020 10:46:01 -0800 (PST) Received: by mail-pg1-x541.google.com with SMTP id t21so8051326pgl.3; Fri, 20 Nov 2020 10:46:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=uRfbcvxICboodQKlXinezNDbNPHvNn9T8ybYNIuKq0c=; b=U9H+SThKzcEXd9tLGPr811jW2dYlCQuUZfL61AUO7ajIgdPvGvKGXBWcN7Ra8DTx9j 0IJbTG2lt8H/Y4tot+GSwwCHrSeXYDJaZ77HbBh4iTv0Z7PzuCPMANeH1TiRTxNi9j6I g8JhYvlJPpERfX/sZtajXIakUE/v8dZ5xrGUI/wyEO3BqYogh98HU+VvSYVZ6UKnt+XX Qx1nKnHDgCT/c/uorufeMkl3ppRNTP8mSvhB5MLNO9p/nOtvRe0UbZg4XOaGp0yhzRSy xK9ohdt74h/xzeY1bp9d9A7AK1F9u2v2uM4SGKlqiE2dP2FWsQOQ0aaLO3MOsvvltgYD chGg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=uRfbcvxICboodQKlXinezNDbNPHvNn9T8ybYNIuKq0c=; b=DKwNJeIF2/JeaWnIHJUcQuQCBAOeOSGytW9d5Y6NV8V7yqkK5dhsauvHuVL9O7CZHv RKfBQ+INVjYWc3oYAp9hNdDbxpttZXYq8rSrQn8oEnOsVgNW+aS77cixDq4iQnH/mkXl HCDFHxBLAcZKd6Fd9kFeCyHiQexyYFxksE3LnsLR91JPe5lGf2BI+fRakJz7VqQ1FAWN ZfLxUQs6aZQjZOMZYRKFMCzS0E8aZjMsicTAnnYEGMuj/ocejvkvzKzWH7CePtVzKjvJ xULVj0LmFL1krgCu2RAUz05Li5LMjhH3Vc+EAxR41lK/6cLkYnJLTGvOSaVLEsA0aOog /Ozg== X-Gm-Message-State: AOAM530mdU/1uFQh1JJ/CBuiuQ2XqG9Zue1xI+UqYKhjoARcjgvEj9WC +yAy6VzA+CwCo6P3D/oPClg= X-Google-Smtp-Source: ABdhPJyWXZsEhH6jt/PDfBCjCATNuUdMTae2dGTKO861W53YNzTXD212XNGggD+wyA3731udHYZC4A== X-Received: by 2002:a17:90a:4816:: with SMTP id a22mr12202439pjh.228.1605897961351; Fri, 20 Nov 2020 10:46:01 -0800 (PST) Received: from syed ([223.225.2.215]) by smtp.gmail.com with ESMTPSA id h16sm4397847pfo.185.2020.11.20.10.45.53 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 20 Nov 2020 10:46:00 -0800 (PST) Date: Sat, 21 Nov 2020 00:15:41 +0530 From: Syed Nayyar Waris To: akpm@linux-foundation.org Cc: andriy.shevchenko@linux.intel.com, vilhelm.gray@gmail.com, michal.simek@xilinx.com, arnd@arndb.de, rrichter@marvell.com, linus.walleij@linaro.org, bgolaszewski@baylibre.com, yamada.masahiro@socionext.com, rui.zhang@intel.com, daniel.lezcano@linaro.org, amit.kucheria@verdurent.com, linux-arch@vger.kernel.org, linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-pm@vger.kernel.org Subject: [RESEND PATCH 3/4] gpio: xilinx: Modify bitmap_set_value() calls Message-ID: References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.24 (2015-08-30) Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org Modify the bitmap_set_value() calls. bitmap_set_value() now takes an extra bitmap width as second argument and the width of value is now present as the fourth argument. Cc: Michal Simek Signed-off-by: Syed Nayyar Waris --- drivers/gpio/gpio-xilinx.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/gpio/gpio-xilinx.c b/drivers/gpio/gpio-xilinx.c index ad4ee4145db4..05dae086c4d0 100644 --- a/drivers/gpio/gpio-xilinx.c +++ b/drivers/gpio/gpio-xilinx.c @@ -151,16 +151,16 @@ static void xgpio_set_multiple(struct gpio_chip *gc, unsigned long *mask, spin_lock_irqsave(&chip->gpio_lock[0], flags); spin_lock(&chip->gpio_lock[1]); - bitmap_set_value(old, state[0], 0, width[0]); - bitmap_set_value(old, state[1], width[0], width[1]); + bitmap_set_value(old, 64, state[0], width[0], 0); + bitmap_set_value(old, 64, state[1], width[1], width[0]); bitmap_replace(new, old, bits, mask, gc->ngpio); - bitmap_set_value(old, state[0], 0, 32); - bitmap_set_value(old, state[1], 32, 32); + bitmap_set_value(old, 64, state[0], 32, 0); + bitmap_set_value(old, 64, state[1], 32, 32); state[0] = bitmap_get_value(new, 0, width[0]); state[1] = bitmap_get_value(new, width[0], width[1]); - bitmap_set_value(new, state[0], 0, 32); - bitmap_set_value(new, state[1], 32, 32); + bitmap_set_value(new, 64, state[0], 32, 0); + bitmap_set_value(new, 64, state[1], 32, 32); bitmap_xor(changed, old, new, 64); if (((u32 *)changed)[0])