Received: by 2002:ac0:98c7:0:0:0:0:0 with SMTP id g7-v6csp148996imd; Wed, 31 Oct 2018 16:17:49 -0700 (PDT) X-Google-Smtp-Source: AJdET5fT8ZLR0LvbI5LRdc9t8IT817mRH+5ImzyiNY4qE7h2u37Hj6midQON9RmiJNtcTEQqBVgz X-Received: by 2002:a17:902:b718:: with SMTP id d24-v6mr3862625pls.338.1541027869697; Wed, 31 Oct 2018 16:17:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1541027869; cv=none; d=google.com; s=arc-20160816; b=V5E5goUg3zpvO4AzNpzpZenYDi3rG3lYCHuQHI1aHHq+lBa/NftgBNDVVAIg+mH/+1 /4lLNgjmLRe7Vn+A+hbu65/KvmAt6FuJsk9zkz6FIkSTifo3cjJwnW3fFgrglYDA/uxr Qn45l81sqx1iQCb3lteNsPUOwZCk5k/Cy4lmOBw/lbmB67Fj/NZn8RBNqe54a5CRQJE/ LDVqq66DLvfSB1KsrzpvzgQnLMXUWqnah+VPJMSYtmBr9JJHxBqwUcHpIBHQiqvBHsnj b72ODyMXldg2+z/W73zzn9z72Cd0B39+2/7oNP7lsXy9ROfNX3J+bKuAmoAlu4i6q0bF f+1g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature; bh=mrNs/bbsiB+AlGkwaRhyzwbmggIaoPYHDsnxbr5LHhA=; b=vkUnuk0II0kX9j7PsbRUTTRmfRPG+skkZGgzba2RV/gWSiR4MqdvXpuSSQkvl43VbI 1JDtCEXmZ/sJgOILMzGuyby/PXVDZ+V0TgHxNODmYmcd0r9U1JfpjccTy14UmEAjUexp OnvQFbiqDwnPOA2gNmrmMnYz/vCHGt19503FfN7MuHTwG/SWbd9JGpvPflCICcWvqIA8 +64XqohsFSmPksHJ/LXQR9sR1e47mfWVuUaYBMhSyCwfl33hBUmbOwm1+VgPe+Ho1HPg Mvis6t1Av7Hq7iMq2yQP0JTrgUoakVSFir3XEcf052QluFAN59vrGoIVjbeWTZmPpWYV XY+Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=qegaXVJj; 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 m17-v6si30143928pgj.155.2018.10.31.16.17.35; Wed, 31 Oct 2018 16:17:49 -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=qegaXVJj; 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 S1732118AbeKAIQo (ORCPT + 99 others); Thu, 1 Nov 2018 04:16:44 -0400 Received: from mail.kernel.org ([198.145.29.99]:36284 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730815AbeKAIL7 (ORCPT ); Thu, 1 Nov 2018 04:11:59 -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 A63E420866; Wed, 31 Oct 2018 23:11:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1541027507; bh=Cju/D3RxbTH6ZqqwWGQO2KVmVRK5Bbg6zlXLa/iyMQU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=qegaXVJjoUx/Hih1eaKWMq4HmxOHc6wZ0fnXktxnOcGvqQQOLVmbJjB46KhB3j9zt /arFLTESH4ePWD91IRzhFNXf++AK5bs38kEDTUjEtKORoE+y4IeDyG7qRkDd71ejBW w/Um/9CzTkHSDFLakYdo9Yd+yHvXudD9ZDsh91/8= From: Sasha Levin To: stable@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Linus Walleij , Mark Brown , Sasha Levin Subject: [PATCH AUTOSEL 4.4 10/32] regulator: fixed: Default enable high on DT regulators Date: Wed, 31 Oct 2018 19:11:15 -0400 Message-Id: <20181031231137.29429-10-sashal@kernel.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20181031231137.29429-1-sashal@kernel.org> References: <20181031231137.29429-1-sashal@kernel.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Linus Walleij [ Upstream commit 28be5f15df2ee6882b0a122693159c96a28203c7 ] commit efdfeb079cc3 ("regulator: fixed: Convert to use GPIO descriptor only") switched to use gpiod_get() to look up the regulator from the gpiolib core whether that is device tree or boardfile. This meant that we activate the code in a603a2b8d86e ("gpio: of: Add special quirk to parse regulator flags") which means the descriptors coming from the device tree already have the right inversion and open drain semantics set up from the gpiolib core. As the fixed regulator was inspected again we got the inverted inversion and things broke. Fix it by ignoring the config in the device tree for now: the later patches in the series will push all inversion handling over to the gpiolib core and set it up properly in the boardfiles for legacy devices, but I did not finish that for this kernel cycle. Fixes: commit efdfeb079cc3 ("regulator: fixed: Convert to use GPIO descriptor only") Reported-by: Leonard Crestez Reported-by: Fabio Estevam Reported-by: John Stultz Reported-by: Anders Roxell Signed-off-by: Linus Walleij Tested-by: John Stultz Signed-off-by: Mark Brown Signed-off-by: Sasha Levin --- drivers/regulator/fixed.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/drivers/regulator/fixed.c b/drivers/regulator/fixed.c index ff62d69ba0be..24ad5e6832df 100644 --- a/drivers/regulator/fixed.c +++ b/drivers/regulator/fixed.c @@ -94,9 +94,14 @@ of_get_fixed_voltage_config(struct device *dev, of_property_read_u32(np, "startup-delay-us", &config->startup_delay); - config->enable_high = of_property_read_bool(np, "enable-active-high"); - config->gpio_is_open_drain = of_property_read_bool(np, - "gpio-open-drain"); + /* + * FIXME: we pulled active low/high and open drain handling into + * gpiolib so it will be handled there. Delete this in the second + * step when we also remove the custom inversion handling for all + * legacy boardfiles. + */ + config->enable_high = 1; + config->gpio_is_open_drain = 0; if (of_find_property(np, "vin-supply", NULL)) config->input_supply = "vin"; -- 2.17.1