Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp4616400rwd; Tue, 23 May 2023 09:59:02 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7p96m1reG2vuK2+uCHbQYEDfjLKDqb+FLWyP7XaAxFcqJtq99grzeIW2XpMKEyGiNMZEZ+ X-Received: by 2002:a17:90a:eb8a:b0:246:af1f:62ef with SMTP id o10-20020a17090aeb8a00b00246af1f62efmr13984527pjy.5.1684861142585; Tue, 23 May 2023 09:59:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684861142; cv=none; d=google.com; s=arc-20160816; b=Fw2IXe2vx7moI7U3JatOsiPc0vmVljeC01IaXglMgJTNRRUBabooORjN2pbVJ5HtKo UVNsn9LwV3QKzuXHcHnzayR6YmmpKYoI/aLS/dwiwk+J6/6iNxhSKB1Tv4V4IAS4Zc10 kI2vDy3zTO1sfEhI8LVnvV4Q/SzCQvl+70BtrTw3GqZkFyBHH91apzLYTbnJ5Nsv0CmV 3720/ZeEFi0jxzH8LOGZQanxaAnhEJMjCHme8vWh+XUE78/WG0R0qz98k3Ii/U7DLCpx yCzPOJwHFi4XR/qazABbflmJb055ZTLfQl75MooYJPPCnpf1P1HWIVZ4tyYWqW2VTJ5b 331g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:date:from; bh=lx/zE31qgaeomaRhhWeqYc2JlqitijgEgz/BBGp65uA=; b=qF85XwbhD46oAuJOsThAb/CsQVp6hszZgO9/nLwz0grmMEZaLt9CT4fHV8Hr2dOfgv ftDGKmNboE/9/NcHrG5eG+ihQnP4yLanAiUqs+Av+JohYrmHc/4bR3WgAkYltm3LVhi8 l+eOBzrBpnmR/ZQUwRPrt37uE+oIPxuzi8tqFtTHoOGH36BltM0TGvEEu7HTnJB8bEP0 6fALoFPDxNA6U108vK26DOOOq6IOfl8Em5fLFGv5NQz1+Y/otILBqjn+QbImKoHB+PTK 4fuUjGnEji1j4Bg5I+llljj7ABU73a0GQ/zS6Y+Njy7ctM/JQLRTSsEiXPa7sQlowkca 5wFA== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id d11-20020a17090ad3cb00b0024e13530c0dsi6666504pjw.38.2023.05.23.09.58.48; Tue, 23 May 2023 09:59:02 -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; 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=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234997AbjEWQ1j (ORCPT + 99 others); Tue, 23 May 2023 12:27:39 -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: X-Spam-Status: No, score=0.7 required=5.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, FORGED_GMAIL_RCVD,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED,SPF_HELO_NONE, SPF_SOFTFAIL,T_SCC_BODY_TEXT_LINE autolearn=no 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 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