Received: by 2002:ac0:98c7:0:0:0:0:0 with SMTP id g7-v6csp174925imd; Wed, 31 Oct 2018 16:49:53 -0700 (PDT) X-Google-Smtp-Source: AJdET5ffV8hhFtEVIcHVR6njfupNzHxRaTucmEE707YgO6bfy9QVcZxL5+CZpqUvsDrCeXjsg9JG X-Received: by 2002:a17:902:15a8:: with SMTP id m37-v6mr5385212pla.256.1541029793271; Wed, 31 Oct 2018 16:49:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1541029793; cv=none; d=google.com; s=arc-20160816; b=rgAjTPDHW/Rwi1XGM1OlodchvhEYV0jeyU4JbSMf/de5cgiAvxpnY4UffmzsipMfPv Mtqdc6usFol3ihkyJuqKGtsC8VX8IKRg+iohYBkggARtGLAf67wFuNu8ficbZU8S/WZN SREfQS8DWvDIS/KPpXLICUubZtzlku8sdqIP5CKO2H9/romS8galVwVO0q095LHpHmyb dVrYYwyrHagqr4UKKEMWYBpHJJZ2XNfrJLQs8fCtLIr14sZmYvbOeaVW6TjUxcjETFdC EsyvxotLUg+hnl+l0PPAnCqDKbWFSHlU0xzsXBfUKyrKNkLNLjX5TrBgGTl1nrBtQzxZ VgAQ== 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=R5ZakApJte5zf2SYuvX9wA8LM4S3LHlHEky8V7d+cm4=; b=PcEByQ93UBCgaPYz9Nm2sJqvfkm/JT/tFCuQQA0cDw6O0Svw5N9nujF3hp86lSdF6E L3mHTxTAzTiAnjRhYkT8stgYL81wK5zAfmXlqi5ENoRjZjbiN8uiI4jZ0YX/oYvTksG+ 2kDwmuJQ064WTzTnvHDea3xChjqD1gcsh9C3LHuZS2y4A55DGj14E3EoRQPW7bHNuvce 78KsWC3aK51GYxjTZKIp5dO2iw3oqJEveaxMB080n3DMSMigEzSmu2HCeg1hewvwWfLi NUqtGFmUGV5eVVDpIFkIWUleQGXSPhQmqRzqNPSRUSGetKefIHFIqiIEjvnhQqPV2pz/ wsMQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=S3OpNXGN; 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 43-v6si12828643plc.415.2018.10.31.16.49.38; Wed, 31 Oct 2018 16:49:53 -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=S3OpNXGN; 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 S1728414AbeKAIGv (ORCPT + 99 others); Thu, 1 Nov 2018 04:06:51 -0400 Received: from mail.kernel.org ([198.145.29.99]:54064 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728327AbeKAIGu (ORCPT ); Thu, 1 Nov 2018 04:06:50 -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 26D0320848; Wed, 31 Oct 2018 23:06:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1541027199; bh=iX8kmCH5qygupNzuPtqfHHUmFgw35uPXn0A23dRrCVU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=S3OpNXGN4cYettfI/zXFJCMTLavr3Zj/4G0gnMBPenxsQG7tQ080k9+LD44u7RSZn 9Zad8Or7utihr1Jl4JxlSWVupd+053ZO4trwOM+3NJOIaMlkkVsUuE3xHPnLECjdL9 FrwhGjHbort88zcltvRnuNk2yIwd33PgrZew4Q1M= From: Sasha Levin To: stable@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Stephen Boyd , Doug Anderson , Linus Walleij , Sasha Levin Subject: [PATCH AUTOSEL 4.19 063/146] pinctrl: qcom: spmi-mpp: Fix drive strength setting Date: Wed, 31 Oct 2018 19:04:18 -0400 Message-Id: <20181031230541.28822-63-sashal@kernel.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20181031230541.28822-1-sashal@kernel.org> References: <20181031230541.28822-1-sashal@kernel.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Stephen Boyd [ Upstream commit 89c68b102f13f123aaef22b292526d6b92501334 ] It looks like we parse the drive strength setting here, but never actually write it into the hardware to update it. Parse the setting and then write it at the end of the pinconf setting function so that it actually sticks in the hardware. Fixes: 0e948042c420 ("pinctrl: qcom: spmi-mpp: Implement support for sink mode") Cc: Doug Anderson Signed-off-by: Stephen Boyd Reviewed-by: Bjorn Andersson Signed-off-by: Linus Walleij Signed-off-by: Sasha Levin --- drivers/pinctrl/qcom/pinctrl-spmi-mpp.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/pinctrl/qcom/pinctrl-spmi-mpp.c b/drivers/pinctrl/qcom/pinctrl-spmi-mpp.c index 418bc40df7ca..7577f133d326 100644 --- a/drivers/pinctrl/qcom/pinctrl-spmi-mpp.c +++ b/drivers/pinctrl/qcom/pinctrl-spmi-mpp.c @@ -457,7 +457,7 @@ static int pmic_mpp_config_set(struct pinctrl_dev *pctldev, unsigned int pin, pad->dtest = arg; break; case PIN_CONFIG_DRIVE_STRENGTH: - arg = pad->drive_strength; + pad->drive_strength = arg; break; case PMIC_MPP_CONF_AMUX_ROUTE: if (arg >= PMIC_MPP_AMUX_ROUTE_ABUS4) @@ -504,6 +504,10 @@ static int pmic_mpp_config_set(struct pinctrl_dev *pctldev, unsigned int pin, if (ret < 0) return ret; + ret = pmic_mpp_write(state, pad, PMIC_MPP_REG_SINK_CTL, pad->drive_strength); + if (ret < 0) + return ret; + val = pad->is_enabled << PMIC_MPP_REG_MASTER_EN_SHIFT; return pmic_mpp_write(state, pad, PMIC_MPP_REG_EN_CTL, val); -- 2.17.1