From patchwork Wed Jan 16 08:21:10 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 10765491 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id F168C1580 for ; Wed, 16 Jan 2019 08:21:43 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E06492D3B9 for ; Wed, 16 Jan 2019 08:21:43 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D47B12D3BC; Wed, 16 Jan 2019 08:21:43 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5D1B12D3BA for ; Wed, 16 Jan 2019 08:21:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388587AbfAPIV1 (ORCPT ); Wed, 16 Jan 2019 03:21:27 -0500 Received: from mail-lf1-f68.google.com ([209.85.167.68]:32956 "EHLO mail-lf1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730345AbfAPIV0 (ORCPT ); Wed, 16 Jan 2019 03:21:26 -0500 Received: by mail-lf1-f68.google.com with SMTP id i26so4212493lfc.0 for ; Wed, 16 Jan 2019 00:21:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=6k8cr/CmrKNAb1C1hzUSi8bPXmLFBSBSAM8T1laVsvk=; b=hTmI0RIBL1+bi7xFbqd2a/maAZmsceWp5kp15PRy2KaJZQA9I2H2duIf1GN75Bik/G 7QniA6L/OURrwPC22RydGW7Q2t47JpORx24wwUE2JAaux3rxMGzKoVW49UH1QKmJY7ZR j5wwXvAQm90DmkxDM/FBeKWbWyoON3mZN/WLk= 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=6k8cr/CmrKNAb1C1hzUSi8bPXmLFBSBSAM8T1laVsvk=; b=WPWGnH5bzqh+T8wrPU8onkO2pv4QIaTFFwcS0K6EfGF5GUpwMuGJndyuRDWqwcm1XO tRyZkYOuUgAsr2n28V4d5NPjFOVeK9g7oPbqK3LWgSJ0V7BsS6xRP7XO78v9H3uYAYR1 euZTAEdj4oUxd3EiEnkgN+38Cbh/ZM1NqvkeYF+xvMMQL3L1GugHGbY49xVxgOPXMbUx dX5he9CANShFCGmGxF+TpwLY8gl6JlycSTt2EpCKRnduCRKF2ao6l0L7o+4BUZhp9l5l YVIFrTejA1QeNMctyxLJmfU0h4GcxPzmCKTidAGohJkyzcy6SPcpdHK4OJ6A4IzmOwKd 4TWA== X-Gm-Message-State: AJcUukeixdHhHIfCeb+X8ZfCdYBdx5rgnsw4ZK8sRNOZW4ImUHYkTOpG 8V5wPosKymD6UvwmtC+iRSgv7g== X-Google-Smtp-Source: ALg8bN4/zdwPNnT4jEeSLazSOYVYFWusA0RrEG3KQGBqgz4gFh5ViVMJSt03qAh6L9vDpNPyanOGCg== X-Received: by 2002:a19:ef15:: with SMTP id n21mr6133854lfh.21.1547626885096; Wed, 16 Jan 2019 00:21:25 -0800 (PST) Received: from genomnajs.ideon.se ([85.235.10.227]) by smtp.gmail.com with ESMTPSA id z9sm1035095lfj.79.2019.01.16.00.21.23 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 16 Jan 2019 00:21:24 -0800 (PST) From: Linus Walleij To: Mark Brown , linux-spi@vger.kernel.org Cc: linux-gpio@vger.kernel.org, Bartosz Golaszewski , linuxarm@huawei.com, Linus Walleij , Jan Kotas Subject: [PATCH 4/4 v3] gpio: of: Fix logic inversion Date: Wed, 16 Jan 2019 09:21:10 +0100 Message-Id: <20190116082110.5604-4-linus.walleij@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190116082110.5604-1-linus.walleij@linaro.org> References: <20190116082110.5604-1-linus.walleij@linaro.org> MIME-Version: 1.0 Sender: linux-spi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-spi@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The SPI chip selects were not properly inspected due to a logic inversion. This made SPI GPIOs not work. Cc: Jan Kotas Reported-by: Jan Kotas Tested-by: Jan Kotas Fixes: f3186dd87669 ("spi: Optionally use GPIO descriptors for CS GPIOs") Signed-off-by: Linus Walleij --- ChangeLog v1->v3: - New patch - Collected Jan's Tested-by This was rootcaused by Jan, Mark please apply this to the SPI tree with the rest of the fixes! --- drivers/gpio/gpiolib-of.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpio/gpiolib-of.c b/drivers/gpio/gpiolib-of.c index a6e1891217e2..c34eb9d9c59a 100644 --- a/drivers/gpio/gpiolib-of.c +++ b/drivers/gpio/gpiolib-of.c @@ -125,7 +125,7 @@ static void of_gpio_flags_quirks(struct device_node *np, for_each_child_of_node(np, child) { ret = of_property_read_u32(child, "reg", &cs); - if (!ret) + if (ret) continue; if (cs == index) { /*