Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp3955084rdb; Mon, 11 Dec 2023 05:08:24 -0800 (PST) X-Google-Smtp-Source: AGHT+IHwWNJLAdSc4gm/HYoADWbREB3ktSJITk1pdfqM/vhnuYtHTt3/9P78b3JEFFy6yN38nP1u X-Received: by 2002:a05:6a21:1f08:b0:18f:d784:e20e with SMTP id ry8-20020a056a211f0800b0018fd784e20emr1680215pzb.119.1702300104349; Mon, 11 Dec 2023 05:08:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702300104; cv=none; d=google.com; s=arc-20160816; b=fry+mRsfMC5IksGzkxXKbq0pd4j17LJmm8WigYkoTr5GYaVxEztl1yaDs1suond00d SXxFZlVoBv3qbBIAoTHxj+8J7vFN/c5Eeqwf4126XojOppKaSo7bfZNgkssJFvDsDZoL wOBsB28i3sgWxOZz/aFtjdlkpA+0wCCxsXhLHFFIxC2JDzHKQ9vNDCCstlETbpQqoFah gcTU4n4pj/Hkn1/lZyc+VQCQSaTV3p6H2Cxfmtzj0vz97veDuqJlwtus6wEH44kEYeX8 BZUoBWfJ6X2FKvO0zyUiPzmY7NacN73KBnWIia//4YDp0l3lLAtQA5oBiJ+8gp8hd0dq G3eQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:organization:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=KizzQLvFMtlFoyr4oJYJLJOoFnMYNxIFeJvPwtH+uHs=; fh=7XrOiBWoGeKlr/r5RTT1Xk8Jnvs3pwWIU6QbTt61/+E=; b=c3zeJBZZXBuqxNWjkDP0zxFFafFXL+3l4FNWa67KPe+dzNglRw2SXRDLVZXaVlMmfq 6z3fevM99MO8NXdjmsh8BAZ34ZqxVy0mXmPobe4daZUf5PO9tGXp8B7YXLF7t+de53IE 4jG4kMg6DAA+3AARP8vog1nTHTtsN8cz4nIZxOssoiB/djoRIDp8BAPUut7IIHiC2kCb Qzmk7S5+aP5ZR/yB7mPsTYMQIwLVDFmxwkktxLEX04pTprGW/xFWhK5yOiwZYUoYS/GT OZ6GIj95fYzwervRLlFKQOfM1OIZl5OgV3jErD5byn9Gh0QXp29pDSc2bSaEkl6dUaiA IVgA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=f7uMfnvr; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from morse.vger.email (morse.vger.email. [23.128.96.31]) by mx.google.com with ESMTPS id o10-20020a63e34a000000b00565e0624182si6016691pgj.404.2023.12.11.05.08.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 11 Dec 2023 05:08:24 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) client-ip=23.128.96.31; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=f7uMfnvr; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by morse.vger.email (Postfix) with ESMTP id F13258042C10; Mon, 11 Dec 2023 05:08:21 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at morse.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1343604AbjLKNID (ORCPT + 99 others); Mon, 11 Dec 2023 08:08:03 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46116 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1343606AbjLKNIC (ORCPT ); Mon, 11 Dec 2023 08:08:02 -0500 Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.151]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2C3A8C4; Mon, 11 Dec 2023 05:08:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1702300088; x=1733836088; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=in3Ml1ewom3HGY0wz6izynRQKJrC6Dqyh0PwUcWn9Uc=; b=f7uMfnvr53n7jcC2+5ny90xOQkZdJa+M55RCeP/ziqZwTd9YJAd7x8i+ kjqDQGu692rDYdhVhtuKF047hvoA1wglqYEI6fk1inXjU75oK+EKH/ZZp TughlxiF+nqLSPvIKCG1Aqm1mVzHfWUg08KD+DtQmKvuCGj3El4zPqprY 7/RdliaV0jXybz4HwibKTkdIL/wkHXGqwADkERlEQ4R1tFzv4wB6m+Z/V DdcVH3sfqMmas/jFcUjOWmyPkWiSBTk1uZMvy3VxZWMibQOFGogDyMAxz fspyMlK3D7F5NYtBpqE/pNGHSZF0/dyPnku8FKEIQ26Btv4lflyrty/U4 Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10920"; a="374802667" X-IronPort-AV: E=Sophos;i="6.04,267,1695711600"; d="scan'208";a="374802667" Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Dec 2023 05:08:07 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10920"; a="1104469655" X-IronPort-AV: E=Sophos;i="6.04,267,1695711600"; d="scan'208";a="1104469655" Received: from smile.fi.intel.com ([10.237.72.54]) by fmsmga005.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Dec 2023 05:08:03 -0800 Received: from andy by smile.fi.intel.com with local (Exim 4.97) (envelope-from ) id 1rCg0u-00000004mmq-0OoA; Mon, 11 Dec 2023 15:08:00 +0200 Date: Mon, 11 Dec 2023 15:07:59 +0200 From: Andy Shevchenko To: Lino Sanfilippo Cc: Christoph Niedermaier , Lukas Wunner , Rasmus Villemoes , Greg Kroah-Hartman , Jiri Slaby , Rob Herring , Krzysztof Kozlowski , Conor Dooley , "devicetree@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "linux-serial@vger.kernel.org" , Ilpo =?iso-8859-1?Q?J=E4rvinen?= , "brenda.streiff@ni.com" , Crescent CY Hsieh , Tomas Paukrt Subject: Re: [PATCH 1/2] dt-bindings: serial: rs485: add rs485-mux-gpios binding Message-ID: References: <20231120151056.148450-1-linux@rasmusvillemoes.dk> <20231120151056.148450-2-linux@rasmusvillemoes.dk> <20231122145344.GA18949@wunner.de> <3b8548b1-b8a9-0c9e-4040-5cfda06a85c6@gmx.de> <5c140498-69e3-4187-8703-db0c41e7ca89@gmx.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on morse.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (morse.vger.email [0.0.0.0]); Mon, 11 Dec 2023 05:08:22 -0800 (PST) On Sat, Dec 09, 2023 at 12:47:47PM +0100, Lino Sanfilippo wrote: > On 06.12.23 16:42, Lino Sanfilippo wrote: > >>>> Crescent CY Hsieh (+cc) is in parallel trying to add an RS-422 mode bit > >>>> to struct serial_rs485: > >>>> > >>>> https://lore.kernel.org/all/20231121095122.15948-1-crescentcy.hsieh@moxa.com/ > >>>> > >>> > >>> That new flag was suggested by me instead of using SER_RS422_ENABLED, which > >>> would mostly be redundant to SER_RS485_ENABLED. > > A cleaner solution would probably be to not handle RS422 with the RS485 settings at > all, but to introduce another set of ioctls to set and read it. > > An own RS422 structure like > > struct serial_rs422 { > __u32 flags; > #define SER_RS422_ENABLED (1 << 0) > #define SER_RS422_TERMINATE_BUS (1 << 1) > }; > > > could be used as the parameter for these new ioctls. > > Any comments on this? I have (maybe not so constructive) a comment. Please, at all means try to not extend the existing serial data structures, we have too many ones with too many fields already. For user space, though, one may use unions and flags, but for internal ones it might be better ways, I think. -- With Best Regards, Andy Shevchenko