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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id EB7F0C7EE26 for ; Tue, 23 May 2023 16:27:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235034AbjEWQ1k (ORCPT ); Tue, 23 May 2023 12:27:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42448 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231878AbjEWQ1h (ORCPT ); Tue, 23 May 2023 12:27:37 -0400 Received: from fgw22-7.mail.saunalahti.fi (fgw22-7.mail.saunalahti.fi [62.142.5.83]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2D594E5 for ; Tue, 23 May 2023 09:27:32 -0700 (PDT) Received: from localhost (88-113-26-95.elisa-laajakaista.fi [88.113.26.95]) by fgw22.mail.saunalahti.fi (Halon) with ESMTP id b2c8a84a-f986-11ed-a9de-005056bdf889; Tue, 23 May 2023 19:27:24 +0300 (EEST) From: andy.shevchenko@gmail.com Date: Tue, 23 May 2023 19:27:23 +0300 To: Ryan.Wanner@microchip.com Cc: robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org, nicolas.ferre@microchip.com, alexandre.belloni@bootlin.com, claudiu.beznea@microchip.com, linus.walleij@linaro.org, ludovic.desroches@microchip.com, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-gpio@vger.kernel.org Subject: Re: [PATCH 1/3] pinctrl: at91-pio4: Enable Push-Pull configuration Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Wed, May 17, 2023 at 01:54:04PM +0200, Ryan.Wanner@microchip.com kirjoitti: > 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. Right, thank you for fixing this! Other comments below. ... > + case PIN_CONFIG_DRIVE_PUSH_PULL: > + conf &= (~ATMEL_PIO_OPD_MASK); Parentheses are redundant. > break; ... > if (conf & ATMEL_PIO_OPD_MASK) > seq_printf(s, "%s ", "open-drain"); > + if (!(conf & ATMEL_PIO_OPD_MASK)) > + seq_printf(s, "%s ", "push-pull"); As commented already by others, the else would be better. -- With Best Regards, Andy Shevchenko