Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp513311imm; Mon, 1 Oct 2018 13:44:14 -0700 (PDT) X-Google-Smtp-Source: ACcGV60/mBIiaQ6pfOSXAxWOwOWKZkBDUYM8oqyxvr6jXaNF/3MLyW+R6nnh2iM/K4ctOmPVC1HQ X-Received: by 2002:a17:902:710e:: with SMTP id a14-v6mr13677507pll.179.1538426654395; Mon, 01 Oct 2018 13:44:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1538426654; cv=none; d=google.com; s=arc-20160816; b=0w5ZSQgQdEXYR+wpzWRoEyvQivg163eIuZbDxG3TkLaWIHbqDO2PD/qC1DOubUKc51 dB2d8eBk4Vl82Bnw/a11N/jLzXjYeMZ0rTkRAvAq1F8S2FGQru+Xd6l++z+CeQkGE4Sy qZIa8J8TlnmuR3WqojZFuWcpn88xATSAwxSYGcomP4FB7epd/yX4LJCF4mDqTuKXHfA/ rsDYkM4jRR8KnGvoZ0o9K+x9ajr1TgVz0Zl2ItGYAxQABsBnzJBtOIkkKtkqrD7UlVVf KK67twr17Wq6Cgb63vm+qQwNworwQhvWWsxcJ9TPcBT6+JwxooWmjZtSxin0dA8uZCD+ 8kdw== 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; bh=EHFETooOOGtFpaMIHZraXZ0xb8qb6oEsreigPOIAUlo=; b=cP60V89CmNydy/l3OgAVtsy20wMLA23y72bc151DbwK5Nl8sj3n19OHhCBQAWPJZaq 6hrpQVhDWsc1O2fG2dk/5qCYCUjv4Z+tHE1RLikW26wNqsHxTA4xlK7W6Kxp0bGrQ+a2 fd+maeur5E7cGz7YiUAqL5oj8N++FPEsCMNTckF/OoCCXHBakPKhstRNgRsPORIIacNx 1v7ej4WTjzRHMqfvskbuKX9eUkq7CY83JdfkCDEdTFngTucY9CR03HvY95QxA2unW3gk nPtbBSayek4qjhVYVsMTVzT5KeFPKuMegMAMdosPMafGBGpYMgAlH3s5s+JSNQ6Z3PCG pTsw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=A1zHBEPU; 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=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y2-v6si13676776pli.330.2018.10.01.13.43.59; Mon, 01 Oct 2018 13:44:14 -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=@linaro.org header.s=google header.b=A1zHBEPU; 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=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726264AbeJBDX3 (ORCPT + 99 others); Mon, 1 Oct 2018 23:23:29 -0400 Received: from mail-lf1-f65.google.com ([209.85.167.65]:42561 "EHLO mail-lf1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725936AbeJBDX3 (ORCPT ); Mon, 1 Oct 2018 23:23:29 -0400 Received: by mail-lf1-f65.google.com with SMTP id s10-v6so3464930lfc.9 for ; Mon, 01 Oct 2018 13:43:52 -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=EHFETooOOGtFpaMIHZraXZ0xb8qb6oEsreigPOIAUlo=; b=A1zHBEPUigJbpoAVLzyYohO3KMymc+YuNjwwPeD1uDcrbYjwaqqsNVDzPj8FjyDC/Y 9tMrY/PDnOGKoYFOofAC1F37CcQj09MupEuR8U2CM5CGPD/AkajyWnntRoCgB3foZxAa kGlsTPhZR2iqhLFjEO7ldi+jXUg+d/lmu8PcA= 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=EHFETooOOGtFpaMIHZraXZ0xb8qb6oEsreigPOIAUlo=; b=d/Qmex0l3voLHb+hsZx4R2vMsZyaJfs9INZKL89zlofFgbrMESaoM4xqiINhXUQmcQ 7ZvLQykprBQxFhdYAA67XhJrSecND893oYcl2TrZbgXOHBd6P3Q7Lt8a2HHtuLwXeOjb zQEmPBUqu8c2c5gwOHrP18Agslrh84hO6Y2MeHGKmyj8DEKRm2VL5KPPDW3JnE07AUMr Ien57hDkPg6tzC7p7q6nbhiKi1QmPNu19MpygMCB9s5CQGdbIzXgnSRtxtaB998wL5ub Bev+mp+bb6CFynQ3b5k2ahxd0pKuoQmurGJV5eFwWXIiov/Mgot5VyQqhaMLijwOsQfd 1pNA== X-Gm-Message-State: ABuFfogyI11QHdGPVDui7V8eAMCesf4/8/ftMlJ8yJHYHXlEhvAa2voo Ad/L2DOU+maOjX2VNPormFt15A== X-Received: by 2002:a19:2a8c:: with SMTP id q12-v6mr6314314lfq.95.1538426631965; Mon, 01 Oct 2018 13:43:51 -0700 (PDT) Received: from localhost.bredbandsbolaget (c-ae7b71d5.014-348-6c756e10.bbcust.telenor.se. [213.113.123.174]) by smtp.gmail.com with ESMTPSA id b132-v6sm2777655lfe.56.2018.10.01.13.43.49 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 01 Oct 2018 13:43:49 -0700 (PDT) From: Linus Walleij To: Liam Girdwood , Mark Brown Cc: linux-kernel@vger.kernel.org, Leonard Crestez , Fabio Estevam , John Stultz , Anders Roxell , Linus Walleij Subject: [PATCH] regulator: fixed: Default enable high on DT regulators Date: Mon, 1 Oct 2018 22:43:46 +0200 Message-Id: <20181001204346.4655-1-linus.walleij@linaro.org> X-Mailer: git-send-email 2.17.1 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- 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 1142f195529b..7d639ad953b6 100644 --- a/drivers/regulator/fixed.c +++ b/drivers/regulator/fixed.c @@ -79,9 +79,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