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: 155701 Delivered-To: patch@linaro.org Received: by 2002:a02:48:0:0:0:0:0 with SMTP id 69csp377790jaa; Wed, 16 Jan 2019 00:21:44 -0800 (PST) X-Google-Smtp-Source: ALg8bN5L8ZFPO+yto5aP1W0Ik42f04qqTMAqIr/54uUqt56x3Te9nTeC8dVrWSOTG475P2g4RAAh X-Received: by 2002:a62:e201:: with SMTP id a1mr8379798pfi.75.1547626904309; Wed, 16 Jan 2019 00:21:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1547626904; cv=none; d=google.com; s=arc-20160816; b=L0DY5Ft4PYrB+xiH6oBKEja1pfhZ/b24aXWFTjLOxzpD1eSt5MFb4lLe1rLssOkQDp ay3a/9NI8hDqDZYa6drMr2bZ2jPzOHw3Tu218QcN8MkShlK1bTSpFgbCOD8jQI4wfoyz sxW/lhI96E1gBYDsN7a20cZsW4FU9/X7/+83Kx8Rum0LoXW0Poz84UwpX8Ti+atK+0t6 Qpmb9XaVIfkocRysihBr9ArtkC1OHqBoqEVzV+B7KXYhpn92wE+yD4saUXodnFVnilRQ aUYjlcUtiaMVXRsXkGtWlsxX2Ugnhen9i+CGucDBfVYjoCxHZryEYEDl6HWLUECiGW6S dyzA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=6k8cr/CmrKNAb1C1hzUSi8bPXmLFBSBSAM8T1laVsvk=; b=myKXcUqU5pAhorNOgCyVjrukJmJRA7YA1ialbMrT4wAAIV8D24ySKd2ku61+JjQqDi 8ueg8OYiSy4J4mkVGhzBP8PJASANUfKpKQL0WbVy6Mg8yCXuC8vrhZP5mEeVWd4TYNI8 5lRk2aEKm/YyEOq6vzf4NOUznJHvS5nENR8zTgZix3n77xleyfQUAmAJQz869TZbzwru Vtzt+OUVb6wkfnrk7gQvYAsrHBCSsNtKynbaYrQt71NN5a6O4T34rMYNx+QwePZpdNAJ IUgkbF9DeKjYHPNMrneV6KaAlmmq7a/r6xk0jhosh3+5p5PLKULl+V+Xpdaffmw/wPqw CURQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=hTmI0RIB; spf=pass (google.com: best guess record for domain of linux-spi-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-spi-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a5si5585033pgg.120.2019.01.16.00.21.44; Wed, 16 Jan 2019 00:21:44 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-spi-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=hTmI0RIB; spf=pass (google.com: best guess record for domain of linux-spi-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-spi-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388587AbfAPIV1 (ORCPT + 1 other); 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-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 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(-) -- 2.20.1 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) { /*