Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3435402imu; Sun, 11 Nov 2018 15:03:12 -0800 (PST) X-Google-Smtp-Source: AJdET5czk3tkZrbzDvMLCzwn8zwnPapWyV+Smt9Izgaes05+iihYUAfdGcXN4hAPrt0qeMeuwjtG X-Received: by 2002:a63:89c2:: with SMTP id v185mr14373065pgd.97.1541977392242; Sun, 11 Nov 2018 15:03:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1541977392; cv=none; d=google.com; s=arc-20160816; b=cgTOupgGePXkbpBQQ30IroVlfpmYyaa/xbxw+n0cA4RV0Frx+50iC0rjDhqxP7X8Rx jFfg1OQTEbJogFk6M3EDptG2HvGPCdf2JOEUQm6UlSIgL9uekkAJs61/lhXKVXuE+pcp gq0mLDV2XB6uLWfkGqUrcFNQFemYK7DK5mjA8WSGNcBDFKir3Y8zyg7FmNLSqtzuTsMh /CdIQq/RHwn1w9PDIy0ei48YraJ635JAaD0D6/KsPs0H9MsmPTKGNpl2jFl/Y20gCPkw xPQv3Baj5BDXKxk0yzdmyVrEDw4aWV1fn/YHC1CR07XnTEu7qd6iUOqH4vCNI+onHTVh U58Q== 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=kIqa0dTR0tXlnQaokDxzb6vXZgQW/kEqEkjxkL8zbu4=; b=lUD7VJHJMCczVBW0kBc1eIYdohJ81fKcfRO113lpXCnOeEO+mIcVJptz6KX1WvXbaj wR3Ra4KhBYvFtcAb/2gHVF79Lk+uZnpne9fg2KdNRdGyXN/SW54SEbm6xMYQ1IO9s0qB rVJZLG17L7gyMvAEXmDD7zZLJRyIqjyBaxsHu3sCmZZjC5O8df3xesyG2G1xYHUosmM5 5zAQqJ1T52aRRoIKjeW58z3UBt0D2SEebjT8NVj28xVs0rTiF1MvvTgGfhssJCZwVReG vNwzBIUs9S/SJx2ulxVtaxJO5Nur8Hpr3tGaCltfPUXvYOtHeOXLzfegU1PxXvlUthZt oxng== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=IBTZPaoc; 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 c7si1431656plz.118.2018.11.11.15.02.57; Sun, 11 Nov 2018 15:03:12 -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=IBTZPaoc; 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 S2390827AbeKLIvX (ORCPT + 99 others); Mon, 12 Nov 2018 03:51:23 -0500 Received: from mail.kernel.org ([198.145.29.99]:51200 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2390602AbeKLIWb (ORCPT ); Mon, 12 Nov 2018 03:22:31 -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 4547C2154B; Sun, 11 Nov 2018 22:32:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1541975554; bh=5LMTPP4kCbF6SqUbIZPkUDi6hiEt2czGK4gglQzVzgc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=IBTZPaocX0o29nFBghPdMnzoHuA31PnXO3OlIArRs1QqSxfWQxC1/g8WbllkdzHqz 4izdCwjqwUJFk9mtxRSU13qV1BEGTst92b12wi5NtJ15rTcnUwyS7db3JZBE25+qV+ cNrUkdUux3plH6JYxEcN2Z6TCwRvKdocZSzSR4Nk= 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.14 068/222] pinctrl: qcom: spmi-mpp: Fix drive strength setting Date: Sun, 11 Nov 2018 14:22:45 -0800 Message-Id: <20181111221654.015079416@linuxfoundation.org> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181111221647.665769131@linuxfoundation.org> References: <20181111221647.665769131@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.14-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);