From patchwork Tue Jun 12 07:36:54 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 138299 Delivered-To: patch@linaro.org Received: by 2002:a2e:970d:0:0:0:0:0 with SMTP id r13-v6csp5018129lji; Tue, 12 Jun 2018 00:37:00 -0700 (PDT) X-Google-Smtp-Source: ADUXVKIXkll8m1TFlM5bmwVEByxc+3YY6w3ADlmbVsMCncYYwA0N0z1+nEtN6twhvkLVv/dDvPzS X-Received: by 2002:a17:902:8b85:: with SMTP id ay5-v6mr2865066plb.30.1528789020869; Tue, 12 Jun 2018 00:37:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528789020; cv=none; d=google.com; s=arc-20160816; b=rwPEVEtQNuHAwDtCaOFxHpUTP7caiMsw2wAPQIYy4Ebk6IBBhom1+uy3EkHOgX7ynD jncS4AvTkzZQnSYH1xgOolFVdQ0qWyOlCehKsdqJQWuIi67JFGjTOZL61HdSm28rmCqa YtcQQWnEbarqgIs4vttFbjpkGFL0S1RGcAIPTj6sQjTvIjKFKtjl0sOnd5+CZQEvAv+j LQ9q8XktqwJi3PKuZCrgF5a0OZ4cjayTvwL/pSwuhakHFmeQ9PxjTg1RgNy1L28+Dc5p hk3K/EceCoMUpzb4iwk6veasRBrbdYXYIpTURReXJNfmyPUgxE0K6JXSdJKHwneW/e95 qIQQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature:arc-authentication-results; bh=3UrMZyuW0C2zedhl49dGFRjR8+TxC908pIek2Mcfv3g=; b=ukoA/Px7/fkTTysUJ/7xnQC8+2qEitkx9FJZwvlQ9hnrpAF8/93nTfN4MqTQ3wzCpk kxNYe4IEKHp6WCXVRuJRVkEw0G+2ueOfIKl/5pELKEEomDsDsn4uIYXI76LHkfGdvLqM Rds2rK5XZUKKRi8CSWPxV+ctJrKzfOrFCO1pUv69kHun8qiVY5hY+m/w0Z2ytUmOukq5 hl9B6U+GzaA98s02JOn/JLCnTItgkDxJyoPWCYF2Q+tNfwar2S5br/g3m0rqCkS4/mn7 zfGrNqSRSJjmJkKBVzI/+UptSleMe/7m0G+sTAmlYFzI+JoqsegrvEq68xQd9EEW2hBu 1jkw== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=OpEwj9ua; spf=pass (google.com: best guess record for domain of linux-gpio-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-gpio-owner@vger.kernel.org; dmarc=fail (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 x1-v6si295064plb.8.2018.06.12.00.37.00; Tue, 12 Jun 2018 00:37:00 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-gpio-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=OpEwj9ua; spf=pass (google.com: best guess record for domain of linux-gpio-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-gpio-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754113AbeFLHhA (ORCPT + 5 others); Tue, 12 Jun 2018 03:37:00 -0400 Received: from mail-lf0-f66.google.com ([209.85.215.66]:34492 "EHLO mail-lf0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754154AbeFLHg7 (ORCPT ); Tue, 12 Jun 2018 03:36:59 -0400 Received: by mail-lf0-f66.google.com with SMTP id o9-v6so34458136lfk.1 for ; Tue, 12 Jun 2018 00:36:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=pJJCodoaHs6F7MqvCJhZjCbCrfldev/XGoFsd6/17IE=; b=OpEwj9ua5qjnEFccGBnihJTBZPQBh3Gn7KRafd9ja89mvMffTmD9+jd3jb5ZQNAesy Um99E15DjZru1JI3XaX9HEvw5Mfc5SdGI0vBpo14Avi1GTHhLyYe4M+Xp4qzMnWoSbfN /Tii9IP5rO5PQqlRh1g/lqD9MF8Ji1NLcOIw4= 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; bh=pJJCodoaHs6F7MqvCJhZjCbCrfldev/XGoFsd6/17IE=; b=DQNfOuY8dtFYLA5kxEnFb/bJhtk9XT4bFVJJi6m46V/6/SUsNg5B7SnDMH6KWIp+Wq Hvk7IMwI7Gt02HAG+7QA16l3JLIezLQe5pnkig3Y7UmYPbbc+RV47A26uhN5vmqMtZPU eFtbgTl1m+aEVuXQsQroJhEmNmcqSQzo/w1ARW9fGnGhAEOy6Eghhz0Mh2jKvdC5x1L8 Ye1sCKeDC3+5j9CwBVmT4xhA71n/QhMqjh4HTu6SZ9PfgeRYizfI+B1IO+ZtWArE8E6B v3XtnVwZj80uV4B8F03G30YtpzMPvOjuaeXRiRwEUmta+wlwuI1UpYndC5jaHdVWsDg3 kJxQ== X-Gm-Message-State: APt69E3FHxLklROLNfN7Ekx24SP0Wua4F/KZXcYzXnsH1jnRclTCxYUu A0V2KD0/yTYhvRos/GBtnqfYLU+7tKs= X-Received: by 2002:a2e:6548:: with SMTP id z69-v6mr1623942ljb.116.1528789017914; Tue, 12 Jun 2018 00:36:57 -0700 (PDT) Received: from genomnajs.ideon.se ([85.235.10.227]) by smtp.gmail.com with ESMTPSA id s14-v6sm58105lfg.88.2018.06.12.00.36.56 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 12 Jun 2018 00:36:56 -0700 (PDT) From: Linus Walleij To: linux-gpio@vger.kernel.org Cc: Linus Walleij , Mark Brown , Thierry Reding Subject: [PATCH] gpio: of: Handle fixed regulator flags properly Date: Tue, 12 Jun 2018 09:36:54 +0200 Message-Id: <20180612073654.18314-1-linus.walleij@linaro.org> X-Mailer: git-send-email 2.17.0 Sender: linux-gpio-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.org This fixes up the handling of fixed regulator polarity inversion flags: while I remembered to fix it for the undocumented "reg-fixed-voltage" I forgot about the official "regulator-fixed" binding, there are two ways to do a fixed regulator. The error was noticed and fixed. Fixes: a603a2b8d86e ("gpio: of: Add special quirk to parse regulator flags") Cc: Mark Brown Cc: Thierry Reding Reported-by: Thierry Reding Signed-off-by: Linus Walleij --- drivers/gpio/gpiolib-of.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) -- 2.17.0 -- To unsubscribe from this list: send the line "unsubscribe linux-gpio" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/gpio/gpiolib-of.c b/drivers/gpio/gpiolib-of.c index 28d968088131..53a14ee8ad6d 100644 --- a/drivers/gpio/gpiolib-of.c +++ b/drivers/gpio/gpiolib-of.c @@ -64,7 +64,8 @@ static void of_gpio_flags_quirks(struct device_node *np, * Note that active low is the default. */ if (IS_ENABLED(CONFIG_REGULATOR) && - (of_device_is_compatible(np, "reg-fixed-voltage") || + (of_device_is_compatible(np, "regulator-fixed") || + of_device_is_compatible(np, "reg-fixed-voltage") || of_device_is_compatible(np, "regulator-gpio"))) { /* * The regulator GPIO handles are specified such that the