Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp2669287rwd; Mon, 22 May 2023 02:23:05 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7Vcul6TZml/61gDawhrlGaUPTmFZgMPX+huVH7uLphQTGNyMp3sQpLKfXfv0px/RzL7fzt X-Received: by 2002:a17:903:246:b0:1a9:8d57:6d6c with SMTP id j6-20020a170903024600b001a98d576d6cmr10523661plh.24.1684747384970; Mon, 22 May 2023 02:23:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684747384; cv=none; d=google.com; s=arc-20160816; b=pJYI5aNtBtJoPyXmz81FeDt4c6IsLf8fOErOTsMadiUeNUwCWuAtP+me53qsR/EngA sFNv1lFsLaGsHY2KQcE1InRpknslQhpYQEWtcG2HuhNzm6QFM0wktrzJ0Ti1wnCMcEBF nAP+X+d5YYD8Bntp/xfwzfGwVHzfNtQY28DAnxPIlt0FvMHd8UWwFPn5RHNYCGPZ23Zt HgOSu3IAFMHcz5LGHbS/P24zl3lmEsszDxilMTsnHp8taXAWaIyk8MmBbHj42C+qZKLn 3/fwQI31Jn6OpNeO4X0HtsNJMzQ4kMlMy32JxGbSzTd5EqWat1xhOAZGxBASwRDzBX8o Sl9Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to :organization:from:references:cc:to:content-language:subject :user-agent:mime-version:date:message-id:dkim-signature; bh=jdEKiEqt0Ix9El/u3wapWIX7mxWIhcw6ERMmYTAWZH0=; b=Uhumxg+Jt3uYqmkoYmqqccEmqEANbgGvh61vZI30+BBrZB0T7inA2In7CIZ4A7tP3S n7ONfvtaAtsodOYEoQFgDO5dFLlBXN2c8Fum+24PBYqej6EWNjWU75WVja3dJ4h7oj0T l7GkXYogjea15EPsvr3YI64N+DwWEKu2qotWTu/0YetuaKZSO7bnXAWMZwhq9MhVheDf pA4gFKisZ/v99Ds8VjJKXmZFNMsv1me1I/szA8fhSiDlYh2apo9jpuWXpo2CnbcBXpbZ DEUZIlqwXphUzLrKLAhcMUUMS6QjdC8Anz4A7+OsJ5Sw2R0HOxV5gJ/6x+Fvt45FAs4S eSNA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@microchip.com header.s=mchp header.b=DHv+Klyr; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=microchip.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id a23-20020a17090ad81700b0024e2d70d28asi4379957pjv.140.2023.05.22.02.22.50; Mon, 22 May 2023 02:23:04 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@microchip.com header.s=mchp header.b=DHv+Klyr; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=microchip.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232677AbjEVJSp (ORCPT + 99 others); Mon, 22 May 2023 05:18:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52948 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229673AbjEVJSn (ORCPT ); Mon, 22 May 2023 05:18:43 -0400 Received: from esa.microchip.iphmx.com (esa.microchip.iphmx.com [68.232.154.123]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C8FE995; Mon, 22 May 2023 02:18:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1684747122; x=1716283122; h=message-id:date:mime-version:subject:to:cc:references: from:in-reply-to:content-transfer-encoding; bh=BC/9OS8kOdk7SPv1XjRs1P3rGecz/xIyWEwTr6oiDys=; b=DHv+KlyrNVYd5vCdEURszDYmNfyFZkigdRRk2iA2aCdgwxfKQ5j1eD5n RdEJW/0bPazimwf+MQpqyK2S9sMQwz12zr5o+bjfG13eDH5e/MMGhRFwR ZlxY1XdhsErS37knv8NgW9LsSyd2MX2QsXVff0i41Jy2TRhUyyOV32Q5c Onxhk1v61gWF1xZxH2Dr6aKcXKOuXxyythHAkUGfdhU4053WbgfZuhQEm whSROFU6uARnDk8hGnydNzL58V9SsYjRRv75qwMxieo8x2ZwYktN+dlSv HPATbS5ngFjFYOTBkcNxEsBA/X3lWoEtMth/IfBMkLY3VIW6M72uiIj3K A==; X-IronPort-AV: E=Sophos;i="6.00,184,1681196400"; d="scan'208";a="216609302" X-Amp-Result: SKIPPED(no attachment in message) Received: from unknown (HELO email.microchip.com) ([170.129.1.10]) by esa2.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 22 May 2023 02:18:41 -0700 Received: from chn-vm-ex01.mchp-main.com (10.10.85.143) by chn-vm-ex04.mchp-main.com (10.10.85.152) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.21; Mon, 22 May 2023 02:18:39 -0700 Received: from [10.159.245.112] (10.10.115.15) by chn-vm-ex01.mchp-main.com (10.10.85.143) with Microsoft SMTP Server id 15.1.2507.21 via Frontend Transport; Mon, 22 May 2023 02:18:37 -0700 Message-ID: Date: Mon, 22 May 2023 11:18:33 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.11.0 Subject: Re: [PATCH 1/3] pinctrl: at91-pio4: Enable Push-Pull configuration Content-Language: en-US To: , , , , , , , CC: , , , References: From: Nicolas Ferre Organization: microchip In-Reply-To: Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-4.5 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A, RCVD_IN_DNSWL_MED,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_NONE, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 17/05/2023 at 13:54, Ryan.Wanner@microchip.com wrote: > From: Ryan Wanner > > Enable push-pull configuration. Remove integer value argument from > open-drain configuration as it is discarded when pinconf function is > called from gpiolib. Add push-pull do debug and get functions. > > Signed-off-by: Ryan Wanner Looks good to me: Acked-by: Nicolas Ferre Thanks, Nicolas > --- > drivers/pinctrl/pinctrl-at91-pio4.c | 15 +++++++++++---- > 1 file changed, 11 insertions(+), 4 deletions(-) > > diff --git a/drivers/pinctrl/pinctrl-at91-pio4.c b/drivers/pinctrl/pinctrl-at91-pio4.c > index 2fe40acb6a3e..3c39d62bbc3c 100644 > --- a/drivers/pinctrl/pinctrl-at91-pio4.c > +++ b/drivers/pinctrl/pinctrl-at91-pio4.c > @@ -762,6 +762,11 @@ static int atmel_conf_pin_config_group_get(struct pinctrl_dev *pctldev, > return -EINVAL; > arg = 1; > break; > + case PIN_CONFIG_DRIVE_PUSH_PULL: > + if (res & ATMEL_PIO_OPD_MASK) > + return -EINVAL; > + arg = 1; > + break; > case PIN_CONFIG_INPUT_SCHMITT_ENABLE: > if (!(res & ATMEL_PIO_SCHMITT_MASK)) > return -EINVAL; > @@ -827,10 +832,10 @@ static int atmel_conf_pin_config_group_set(struct pinctrl_dev *pctldev, > conf &= (~ATMEL_PIO_PUEN_MASK); > break; > case PIN_CONFIG_DRIVE_OPEN_DRAIN: > - if (arg == 0) > - conf &= (~ATMEL_PIO_OPD_MASK); > - else > - conf |= ATMEL_PIO_OPD_MASK; > + conf |= ATMEL_PIO_OPD_MASK; > + break; > + case PIN_CONFIG_DRIVE_PUSH_PULL: > + conf &= (~ATMEL_PIO_OPD_MASK); > break; > case PIN_CONFIG_INPUT_SCHMITT_ENABLE: > if (arg == 0) > @@ -948,6 +953,8 @@ static void atmel_conf_pin_config_dbg_show(struct pinctrl_dev *pctldev, > seq_printf(s, "%s ", "debounce"); > if (conf & ATMEL_PIO_OPD_MASK) > seq_printf(s, "%s ", "open-drain"); > + if (!(conf & ATMEL_PIO_OPD_MASK)) > + seq_printf(s, "%s ", "push-pull"); > if (conf & ATMEL_PIO_SCHMITT_MASK) > seq_printf(s, "%s ", "schmitt"); > if (atmel_pioctrl->slew_rate_support && (conf & ATMEL_PIO_SR_MASK)) -- Nicolas Ferre