Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3483620imu; Sun, 11 Nov 2018 16:08:09 -0800 (PST) X-Google-Smtp-Source: AJdET5ehVuHHVyS+I0T6xk2dQBLrj2FcrbIVZYz9Z/cqfi/roLZhP3NZgcm+Wu9E23Yh4VA+kvrc X-Received: by 2002:a63:6cc:: with SMTP id 195mr15725255pgg.52.1541981289406; Sun, 11 Nov 2018 16:08:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1541981289; cv=none; d=google.com; s=arc-20160816; b=JImpsUALwViyjoA1vtmRHXeCArNnGZUCAzCugDIoL3+k0gjQ87vTk6VjNegesaUOIE Yr28bRoIL7WlNDI1H5GH/4NEmzlU0aw1jmdj6WDK3mm3atdMUxpfvWSirFlE0rG8mH42 s6/l4nL69F+kxtq1RF3ExxACP4U5K5wMcj5NOcWJ/oIzI2RxLZWCKTV/Rf0RBFs8IvJo gWzM3P5Y8I0nIS3EUG6Knvh5SvPTGEDmfjGe4dbDqGDmL/fcU92nCAyZDH6CdM5gHtJr QeeHDiQK2zkJTaue2F4OteXxG+rfreYXA4nu6OLPNXet0kPddAqM/SYvVNHY9ZPQtFTN 2Eqw== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=YKzNYjWlGMqq0AzzSiWoImDUtDTTO4TSIWpHPXcL9P4=; b=mvQi42UXrcScFCTN1KTJBnsXAXYFLMMZHI5dodOyjooqmdOB9KnafcjGwunkoY6yl2 eyfL9puMxGoBp3hdiNUBu99ri8WzPeuntChXj22a5k2jTcJZbqFDn1Q9CRj0LlUHcQpx 8a3GO7HJWr80n04zRdq6QN1rVOLIIZQw0aXkbEbunoh6ZUEYuyn4UMko+i6PV6izUXyj DvjWbiWNW4ijhKPjb67M7tVjhz9FbAQrYyuhGY0/4NpK4WJRo5IeTmlRDffxQ75P41xv EnLAbPAVZSD+m1jU1uUSJKXpbRPCXKEcf1M7hHzO4v4WOCwNPmnx/4SQ7QQrKFkoa4HQ +Vtw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=bYhuIqK7; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l11-v6si15828115plt.5.2018.11.11.16.07.54; Sun, 11 Nov 2018 16:08:09 -0800 (PST) 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=bYhuIqK7; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731712AbeKLIRg (ORCPT + 99 others); Mon, 12 Nov 2018 03:17:36 -0500 Received: from mail.kernel.org ([198.145.29.99]:60706 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731664AbeKLIRf (ORCPT ); Mon, 12 Nov 2018 03:17:35 -0500 Received: from localhost (unknown [206.108.79.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 3766C223CA; Sun, 11 Nov 2018 22:27:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1541975260; bh=d5wDYx3KGTwazceVHcPUobCsF2EbcqOeNS6N+qM5f54=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=bYhuIqK7c4lhE0sCOlOZWfHjIdjs5qk1nFRG1LMD8Fd/PVYl1RXHxLBBCLcwEb/cd RL/l625oTvv9FOSSJLD4iLK2g/zD5bf7SLEyymbEJVcI2xHuTlyqTKt0KJIiuOHhxK S2xjr0BtE6vv2efzcTyEcHlwciGY19H/lGwSyuwE= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Doug Anderson , Stephen Boyd , Bjorn Andersson , Linus Walleij , Sasha Levin Subject: [PATCH 4.19 108/361] pinctrl: qcom: spmi-mpp: Fix drive strength setting Date: Sun, 11 Nov 2018 14:17:35 -0800 Message-Id: <20181111221634.785958449@linuxfoundation.org> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181111221619.915519183@linuxfoundation.org> References: <20181111221619.915519183@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.19-stable review patch. If anyone has any objections, please let me know. ------------------ 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 Signed-off-by: Greg Kroah-Hartman --- drivers/pinctrl/qcom/pinctrl-spmi-mpp.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) --- 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 pi 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 pi 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);