Received: by 2002:a9d:718f:0:b0:616:ae3a:c5b5 with SMTP id o15csp2113950otj; Sat, 2 Jul 2022 10:06:08 -0700 (PDT) X-Google-Smtp-Source: AGRyM1uORyYCc56RIFIBEhiUx0nNdt295Aic2DjgVAl3lcnY3QAghH7FFcKur3Q6ZDWoCfj0paL7 X-Received: by 2002:a17:90a:598f:b0:1ef:32d9:1fa2 with SMTP id l15-20020a17090a598f00b001ef32d91fa2mr18582475pji.182.1656781568068; Sat, 02 Jul 2022 10:06:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1656781568; cv=none; d=google.com; s=arc-20160816; b=WN90IIBDUGFsK5vpul8ihyvdbTJ59TbAKWD75mJ4PZewE3TkrIsiKVRsrZ2B++OZv6 Fi/hcW6ImNeQnPP1fcNSZrGi1lK8/g+f4WWZkg9crlUa6jzWT4NYfrsz3C6395Po6Dgz v869nRkDhwG06NDFkw/zt6tHBKVRKhvg+dZCG4ruwEWXmRG6ZK9JOdigmXT9SoVMU0D4 Q56+0HGDx/uA5FV5RCLPQboqlU70rNJU1gvzv63pni2fiUzCS7SECUwJrKw5DSAowuNm m7ifFr0a9d8b4DjEIhoh56r18uXIYdSn/6z/GzR/cPcQSYj5KQdqQ4sUkjqCntIuskBs PKAQ== 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:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=9K4t3NzO4knRH25xLJmy+wPuzCr/qKWhasH44FPaStQ=; b=dxImGxBQubMgSmjpnJX2eoZAqMaD0wCHtTXI17PUXjT91MRsQfRU2XQJ9iz1FbNVoG B0qsX65QGiT3NYXcNbTAqu/J7ZfCZuRBl0wOhiItjYZjFgiWeGhn6/wMJLQEX6W4ZT8d HmqKViMYRaD4MvX3Glbz+HRdULsVVFyjc7+aspyveF5xswELKMJkbULmU4kQn6l/B/OJ HIwJSVvqOyZua/pgIJnYmQd2uYY9Z1q8FKp7vBTkYtXwCVfLSV0fwVf4Bx4UCBKuZ0xx bAq5NXCjNiuYXUXqxOjFhN0CfHzpSqxa2RQ+ZMg3Zb8ROhATLvdu94jeCj9r2oFhlIE3 Shvw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmx.net header.s=badeba3b8450 header.b=IAv5TECA; 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 o12-20020a170902d4cc00b0016646a4d661si10509195plg.377.2022.07.02.10.05.34; Sat, 02 Jul 2022 10:06:08 -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=IAv5TECA; 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 S232331AbiGBQvc (ORCPT + 99 others); Sat, 2 Jul 2022 12:51:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50166 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232079AbiGBQvc (ORCPT ); Sat, 2 Jul 2022 12:51:32 -0400 Received: from mout.gmx.net (mout.gmx.net [212.227.15.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1274BDE93; Sat, 2 Jul 2022 09:51:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1656780663; bh=mUyhruXIhmuUViMeDFbRQp4XSTkRwYDiNt+WsCvGuuM=; h=X-UI-Sender-Class:Date:Subject:To:Cc:References:From:In-Reply-To; b=IAv5TECA6DaGDanu4F2UESXF9U4moCqIxQji5xOqiyBEcqkHYY6nfGeJy9vMUCEeH CEo2AWjmKthmW2XDuFNd+PGaGDVhDJnJ9Ewwb8ZthEs4qEX3YEQb28EWUBVY3Reh6I /Y8bOrvSyWmXh7j1b7mgqHSSYAPko34986YQpylI= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from [192.168.0.69] ([46.223.3.210]) by mail.gmx.net (mrgmx005 [212.227.17.190]) with ESMTPSA (Nemesis) id 1MMofW-1nr6qx0112-00Ik4J; Sat, 02 Jul 2022 18:51:03 +0200 Message-ID: Date: Sat, 2 Jul 2022 18:50:59 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.9.1 Subject: Re: [PATCH 1/8] serial: core: only get RS485 termination gpio if supported Content-Language: en-US To: =?UTF-8?Q?Ilpo_J=c3=a4rvinen?= , Lukas Wunner Cc: Greg Kroah-Hartman , Jiri Slaby , robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, Andy Shevchenko , vz@mleia.com, linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, linux-serial , LKML , p.rosenberger@kunbus.com, Lino Sanfilippo References: <20220622154659.8710-1-LinoSanfilippo@gmx.de> <20220622154659.8710-2-LinoSanfilippo@gmx.de> <20220625194951.GA2879@wunner.de> From: Lino Sanfilippo In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Provags-ID: V03:K1:KV+4xPvzh0c7cByKeFFk/pLcKFJ1ZO2uSNEEgxRyg3FJs6W66M9 49CwH2GFa49hMrEpMPhGlXwgvKHiWeWkhZCbzE+fUo+oFH8iEd8Zl2HWpS2wXZ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EgoosBHvLV9aZFb1PIhKMKkYNEEEGd0fVZyP hbNRyrtFv9lKEjI88QHKD8xhY2qbGcb/2N784nwVDKof4Krg7fSOcXOTzfx/jOYsOzh5pqp3q RkfRe5xMAXArhsO3S3oAJGlbnxP3OM3cD4LDpbh0Meg5KEVsHtG82Y11d5cjq3JZSKPQb9qvf 6JbgCcch4pAhMuMX8wIWlOdRFqEy1rBZ/dvlbQB2B2foNy27TUdKMQWDg== 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 27.06.22 11:05, Ilpo J=C3=A4rvinen wrote: > On Sat, 25 Jun 2022, Lukas Wunner wrote: >> >> I think what you want to do is amend uart_get_rs485_mode() to set >> SER_RS485_TERMINATE_BUS in port->rs485_supported_flags if a GPIO >> was found in the DT. Instead of the change proposed above. Agreed. > > That seems appropriate (and is a fix). > > What makes it a bit complicated though is that it's a pointer currently > and what it points to is shared per driver (besides being const): > const struct serial_rs485 *rs485_supported; > While it could be embedded into uart_port, there's the .padding which we > might not want to bloat uart_port with. Perhaps create non-uapi struct > kserial_rs485 w/o .padding and add static_assert()s to ensure the > layout is identical to serial_rs485? > > This seems to be indeed the cleanest solution. Regards, Lino