Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp2991379yba; Mon, 22 Apr 2019 17:20:09 -0700 (PDT) X-Google-Smtp-Source: APXvYqzJ3QNAt/5UmVyUQrNhKscK2S7HyYYY8iONXfLhAnbTvpn78EN4yCHaNi82677cnJnOIIV5 X-Received: by 2002:a65:4302:: with SMTP id j2mr21444650pgq.291.1555978808921; Mon, 22 Apr 2019 17:20:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1555978808; cv=none; d=google.com; s=arc-20160816; b=Yln+i4z8hVZVWnh1xVA22tEEIE7vFNZ8q5wB8Ju4TGpiYGwpM87LokFfLAQQJGM+Iv a+X9yoEbK+uoZYJ1pfNX1StVg8slck22KinFheZgAk9/zWoOqOgDrfZsm8usT+BbrQUo 9207v2QBpOMiCce7os2TV7qslwFCl7lBOzFOl/Ddbx2X3G2AtIO4lslZAoIL3DR6BlQz Wzx25QlFFmRrOjs/DwhTzW9Znb6dL8geX1KmWmb77u8dNTqr3PodOJNA1vy83IkzhXVG iuGrIJXwob0YowxmcTzdxztYaeijubFngyjwCjDHpJka6LJoIA9ZZcsNrTR2CX2rK1Ot 0KEA== 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=lvEygfvM2cEaqneKsUWMBfiVTb7Lbhe5r+sD2Lhc/+Y=; b=aSKwEy4DoVLm6MHbZdYOsdb5ihpImWtFp8v12GZ1PYbK2yCWCduWgAwMD30+pzEZ8Y jXzhz2wxJ8ZDyq7kydi+ttzFflC6cawdckZ1Oduxchrgh+g6CIOTknnyNVYtXMHZQCbv mZuNXUmHRqSoaDCMEgdxE5w3mTKC4H0Js6UGtlRKC5tSuKjIJsgKRYdFz/JPbu8Zmm3o 5KcJ74E98vMS4w/xqd0lp8cWkWMuijJ4wL+7mcHkmqSxUHIituFTQu+yJH+SFB3wAbdk 5i41iN0UDwytMhK/O9oslPX63qHgHUuxtJeij5RPbqP0nEfbVgWS3OQ6FdaWGMJt7KFX chnA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=IFhs0KMt; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h3si6061662pgb.250.2019.04.22.17.19.53; Mon, 22 Apr 2019 17:20:08 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-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=@kernel.org header.s=default header.b=IFhs0KMt; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732304AbfDVUG3 (ORCPT + 99 others); Mon, 22 Apr 2019 16:06:29 -0400 Received: from mail.kernel.org ([198.145.29.99]:45672 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729478AbfDVTob (ORCPT ); Mon, 22 Apr 2019 15:44:31 -0400 Received: from sasha-vm.mshome.net (c-73-47-72-35.hsd1.nh.comcast.net [73.47.72.35]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 49529217D4; Mon, 22 Apr 2019 19:44:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1555962271; bh=odWBMkjyPNnuRw+4KE3xweDXxMT1ig2KF9W94YGphSg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=IFhs0KMtCgAWzzdTTG/G5HR70YcFpaSUsUVpjJmiZ/8q0weuZVDACrn0TM5eMiD/S +kz3xNTtVeVSO6XJIThdWNsRd0s6ez6Im1egqfjo3VtCDMTlhL8BAERuf6oW6YOrzq E9LkRZG1w4GoIZ4o3Aj8b1iowG68DWl6QPrHsc+s= From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Andrey Smirnov , Linus Walleij , Bartosz Golaszewski , Chris Healy , linux-gpio@vger.kernel.org, Sasha Levin Subject: [PATCH AUTOSEL 5.0 78/98] gpio: of: Check for "spi-cs-high" in child instead of parent node Date: Mon, 22 Apr 2019 15:41:45 -0400 Message-Id: <20190422194205.10404-78-sashal@kernel.org> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20190422194205.10404-1-sashal@kernel.org> References: <20190422194205.10404-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Andrey Smirnov [ Upstream commit 7ce40277bf848391705011ba37eac2e377cbd9e6 ] "spi-cs-high" is going to be specified in child node of an SPI controller's representing attached SPI device, so change the code to look for it there, instead of checking parent node. Signed-off-by: Andrey Smirnov Cc: Linus Walleij Cc: Bartosz Golaszewski Cc: Chris Healy Cc: linux-gpio@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Linus Walleij Signed-off-by: Sasha Levin (Microsoft) --- drivers/gpio/gpiolib-of.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/gpio/gpiolib-of.c b/drivers/gpio/gpiolib-of.c index 9470563f2506..f1ae28289a67 100644 --- a/drivers/gpio/gpiolib-of.c +++ b/drivers/gpio/gpiolib-of.c @@ -142,16 +142,16 @@ static void of_gpio_flags_quirks(struct device_node *np, * conflict and the "spi-cs-high" flag will * take precedence. */ - if (of_property_read_bool(np, "spi-cs-high")) { + if (of_property_read_bool(child, "spi-cs-high")) { if (*flags & OF_GPIO_ACTIVE_LOW) { pr_warn("%s GPIO handle specifies active low - ignored\n", - of_node_full_name(np)); + of_node_full_name(child)); *flags &= ~OF_GPIO_ACTIVE_LOW; } } else { if (!(*flags & OF_GPIO_ACTIVE_LOW)) pr_info("%s enforce active low on chipselect handle\n", - of_node_full_name(np)); + of_node_full_name(child)); *flags |= OF_GPIO_ACTIVE_LOW; } break; -- 2.19.1