From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 6366EC77B75 for ; Mon, 22 May 2023 09:19:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:Content-Type: Content-Transfer-Encoding:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:From:References:CC:To:Subject: MIME-Version:Date:Message-ID:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=467Ruqk8+/ZJZ65Fgf1ygkVGdHpUVbLIcunsf2GY/vA=; b=Al3pxmd2BDSXT0 5ElrzXYYMXk4RbPrifwvQO5cP5sjZxIhboFh6uLXoGzdoa+KgPdb0DPzosEOpn6IRgQIKCK25Jkiw T1lyaNK2/ukHBm1YQadaxs48W3+kmAsyEcSmgNpiY2ON8k/TOVbc9K+xpmXpKOImlJ8//l/bIyHnD hhiig3usohF0uedhGQhkzstNd0d3N6ERSbAtUPV570YHtrnJsWWaglxf158w6Od/s35mJo9Sq0MoI /fiQNliNpHnIAURs5gChhzEYVuQx07piUl02tAfuQy9KlupGQsyOfORZ2UcI1oAlGeOPBkoNzpDvF 21mCLYGqiv+zYCRJDLSw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1q11gk-005quY-0w; Mon, 22 May 2023 09:18:46 +0000 Received: from esa.microchip.iphmx.com ([68.232.154.123]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1q11gh-005quD-0D for linux-arm-kernel@lists.infradead.org; Mon, 22 May 2023 09:18:44 +0000 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: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230522_021843_184503_FE1393AA X-CRM114-Status: GOOD ( 16.85 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.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 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel