Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753631AbdHKQ1a (ORCPT ); Fri, 11 Aug 2017 12:27:30 -0400 Received: from mail-pf0-f179.google.com ([209.85.192.179]:33829 "EHLO mail-pf0-f179.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753238AbdHKQ10 (ORCPT ); Fri, 11 Aug 2017 12:27:26 -0400 Date: Fri, 11 Aug 2017 09:27:22 -0700 From: Bjorn Andersson To: fenglinw@codeaurora.org Cc: linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, Linus Walleij , Rob Herring , Mark Rutland , linux-gpio@vger.kernel.org, devicetree@vger.kernel.org, collinsd@codeaurora.org, aghayal@codeaurora.org, wruan@codeaurora.org, kgunda@codeaurora.org Subject: Re: [PATCH V2 2/2] pinctrl: qcom: spmi-gpio: Add dtest route for digital input Message-ID: <20170811162722.GF2016@tuxbook> References: <20170719063136.5300-1-fenglinw@codeaurora.org> <20170719063136.5300-3-fenglinw@codeaurora.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170719063136.5300-3-fenglinw@codeaurora.org> User-Agent: Mutt/1.8.3 (2017-05-23) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 540 Lines: 22 On Tue 18 Jul 23:30 PDT 2017, fenglinw@codeaurora.org wrote: [..] > @@ -528,6 +547,20 @@ static int pmic_gpio_config_set(struct pinctrl_dev *pctldev, unsigned int pin, > if (ret < 0) > return ret; > > + if (pad->dtest_buffer == 0) { > + val = 0; > + } else { > + if (pad->lv_mv_type) { > + val = pad->dtest_buffer - 1; > + val |= PMIC_GPIO_LV_MV_DIG_IN_DTEST_EN; > + } else { > + val = 1 << (pad->dtest_buffer - 1); val = BIT(pad->dtest_buffer - 1); Acked-by: Bjorn Andersson Regards, Bjorn