Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp5383391iog; Wed, 22 Jun 2022 19:01:47 -0700 (PDT) X-Google-Smtp-Source: AGRyM1s3cZioomcxkvtOEM/818Pu5Um3YS/1zA87XB0MLPcOcHgpj2M7OApIR6ca8uT3XgDvq2Pw X-Received: by 2002:a17:907:e93:b0:722:e082:2787 with SMTP id ho19-20020a1709070e9300b00722e0822787mr6224352ejc.618.1655949707186; Wed, 22 Jun 2022 19:01:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1655949707; cv=none; d=google.com; s=arc-20160816; b=Zl3dar+lgPwfDAX/Alr1yRAlHYqTAYGXIa9KD7L7JjscZTgyjn+oAFXj3CC9qVW6E/ AcBCGIcBHPx8T+DdOOVm5VcNiTR4k/ry4rPwfNKyGJBoUeiw4pothJ9hsehNFyfrJQde p7ohoY+dhcJiS+uEsJ7kj09Np3Xd/ik8tUrW3kpNkzk6ndc7vk8ZcoB4OXZa9eSTuPEB w8LDOQ3CXZr47oPM8gwMSlGw/orpAh5Tj8lc3Ml9/jkyuD/qTfTLPLBFpIPLPfkk/8dz gNkZW+JSnHHWygnJt99u/9uflRC/RSEAowv7Sv+fQ2/LvIF37fYN/ItUyYwsuIwdxuNF Famg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:references:cc :to:subject:from:dkim-signature; bh=eHLrXoaVIZ1xfowGuPkrjSutjDijEW9mNY1mSSTy7Hs=; b=lfbzehQqj+cDpFypQx6nyzMQ4Fdw4PaPgjleTOKXlC2qnYxcDkXH9UWsn6ACx92yxs witeTijhdzyehJT18Ew9j0TCRtsj53dWEZ/zshqykDmrlHSGNGj9JRRmIkKzxwpyaiMJ 69HBBoReN3JrtIWbiKEyD65ZKP5Q5XEP31SNGeV+4h5zCHqz6VaH2FGGrALxbfY0ydky RvRrXpBeC+tVRe/biq5MnkHjitHmHy0rlsssFr/fGWf7Fw/R4GYJJnblup9w9DSVZs1j xQbMqlwNWs4M2pq5F2c39AjswkBi+xf9UaeeSn33CgnW4oy0wo2ydXV7IEEyuLWZX1L2 bXSg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmx.net header.s=badeba3b8450 header.b=dVxayAJt; 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=NONE dis=NONE) header.from=gmx.de Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id sd27-20020a1709076e1b00b006fef771604csi22239875ejc.497.2022.06.22.19.01.21; Wed, 22 Jun 2022 19:01:47 -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=@gmx.net header.s=badeba3b8450 header.b=dVxayAJt; 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=NONE dis=NONE) header.from=gmx.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237829AbiFWCAG (ORCPT + 99 others); Wed, 22 Jun 2022 22:00:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48102 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232529AbiFWCAE (ORCPT ); Wed, 22 Jun 2022 22:00:04 -0400 Received: from mout.gmx.net (mout.gmx.net [212.227.15.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9C4841A8; Wed, 22 Jun 2022 19:00:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1655949568; bh=eHLrXoaVIZ1xfowGuPkrjSutjDijEW9mNY1mSSTy7Hs=; h=X-UI-Sender-Class:From:Subject:To:Cc:References:Date:In-Reply-To; b=dVxayAJtkrKhwCe8TAok0nyRmqcUoR/obTtkgJ73SdCpCAfxI1YvayXkd8jAABJLB RhPekNgr0zWGV2msj/svCbaK12vILTcFW3eIrOuT9JcmBLN40QZ/R2E2RJehlrvftT 3/v/3A4rQoe0JRZjUBhqsdiilf1CuQF7cma0tkIM= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from [192.168.0.33] ([46.223.2.181]) by mail.gmx.net (mrgmx005 [212.227.17.190]) with ESMTPSA (Nemesis) id 1N6bk4-1nbzTy32Cc-0180Px; Thu, 23 Jun 2022 03:59:28 +0200 From: Lino Sanfilippo Subject: Re: [PATCH 1/8] serial: core: only get RS485 termination gpio if supported To: Andy Shevchenko Cc: gregkh@linuxfoundation.org, jirislaby@kernel.org, ilpo.jarvinen@linux.intel.com, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, vz@mleia.com, linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org, lukas@wunner.de, p.rosenberger@kunbus.com, Lino Sanfilippo References: <20220622154659.8710-1-LinoSanfilippo@gmx.de> <20220622154659.8710-2-LinoSanfilippo@gmx.de> Message-ID: <2dda5707-6f13-6d33-863d-a88b89e88a88@gmx.de> Date: Thu, 23 Jun 2022 03:59:25 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: quoted-printable X-Provags-ID: V03:K1:1h6TWrYpfJlbjpVfY8XbPGnncDZ0s81dGshYVaZQhCahGxzh20d 2PQcSUMKU/60rn4UawD2s2L9Eovlnw35HjykR4G7onljbtwQ5t8NoZ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Z25YPoSladO0gVFKYGqxCn9GNaJuLYIq3DN6Ou07qPnopYk8OQa 1Kzp61yY4YaHuuNVhUry6EhuQo4KB214QN71jWiOOFgjumIzAunN/dMTm6K5bJOa9P8kmtaHE +JKwvacZuosOjMpFdulHzXmb7WaBrQMNMUl4Uce1aja2UEgKp3FnVh4XlZS8yfYLHjnvv+tpt NVqloygSF75oUPV+ByluyzRoCsyrUfkrschW4m65bmNqTYEHShku62SkA== X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,FREEMAIL_FROM,NICE_REPLY_A,RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS,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 Hi, On 22.06.22 at 19:04, Andy Shevchenko wrote: > On Wed, Jun 22, 2022 at 05:46:52PM +0200, Lino Sanfilippo wrote: >> From: Lino Sanfilippo >> >> In uart_get_rs485_mode() only try to get a termination GPIO if RS485 bu= s >> termination is supported by the driver. > > I'm not sure I got the usefulness of this change. > We request GPIO line as optional, so if one is defined it in the DT/ACPI= , then > they probably want to (opportunistically) have it> > > With your change it's possible to have a DTS where GPIO line defined in = a > broken way and user won't ever know about it, if they are using platform= s > without termination support. > This behavior is not introduced with this patch, also in the current code = the driver wont inform the user if it does not make use erroneous defined termination= GPIO. This patch at least prevents the driver from allocating and holding a GPIO= descriptor across the drivers lifetime that will never be used. Furthermore it simplifies the code in patch 2 when we want to set the GPIO= , since we can skip the check whether or not the termination GPIO is supported by the dri= ver. Regards, Lino