Received: by 2002:a05:6a10:9afc:0:0:0:0 with SMTP id t28csp2357268pxm; Sun, 27 Feb 2022 19:15:19 -0800 (PST) X-Google-Smtp-Source: ABdhPJzu8qA4bO3YkfzDMZMRw5RVGi3mCrXIH+UWze5b10As39mqLfg9If8yPuq6jZtZ83G1GZiB X-Received: by 2002:a63:2204:0:b0:378:9f08:206d with SMTP id i4-20020a632204000000b003789f08206dmr2820957pgi.3.1646018119717; Sun, 27 Feb 2022 19:15:19 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1646018119; cv=none; d=google.com; s=arc-20160816; b=cX9H+5mSM7Zz2Xc30Vo+6g697c7HA9BW3l3duC38+gqZSSVGpjnruKzyjZD+iaLTyM VLXRInJlp3Opp4B09m77q6fd+K15rqLl+T/1TtkC5nFVQXmzlCQqRi8mDtVc/kaXD56/ NcOP8WmthDE6ZXEp9/40Zi9/1c1dknK4K14G8qG0ePt2gOeHU0fG+Yd2t6HpVbug4i7y H7d7F3WprQTT24IEhSg60FJdVQRa7VjpWsq6wWhpAxlNJ20IB8/XghE/llWmqT2YNgW7 fgnmwHpTD9D+T/NZ/8gF2L50BkPD2HJ+4RVfDoMb9pE2JhkqLM6OW+YsHVL3MnN82Urm 760g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=s7PQLkyF7lgwD3XBQiSaqNoJa0DuoiTYpx9LJQP/Mls=; b=THZ23y808Whoasdlbv3l5RLJG3+3zuh62NNIrTzEO8uub4FPE45wIGptqAAalSpJ3m fm15W57CAc3nKIKjeP6t2jwA3ogfb56P6psOHNOkK5185XsCSyna2yVuRqS6Vstk/vdu CvYx4u93RDSK4EI95Icic2BXMCDlFLWOpmIDunphVp2zyh6H/P/N8TropifZ0Q/QAp34 uCWWi8pdP67OiZbJ/fwX/z+9RdDp6PfvN5DNKe8eXOc2UAvys81y6XrSFYvDv4mILig7 R3r+DZJqsf7OGPftWDMtipNQrq3L5uaVCBnJHLrkwPgoeEy69x5yi5jFTxa+sEBNysPF LXew== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmx.net header.s=badeba3b8450 header.b=cxpUscFL; 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 z7-20020a17090abd8700b001bc72f11773si13407719pjr.170.2022.02.27.19.15.03; Sun, 27 Feb 2022 19:15:19 -0800 (PST) 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=cxpUscFL; 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 S232757AbiB1ClY (ORCPT + 99 others); Sun, 27 Feb 2022 21:41:24 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52068 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229569AbiB1Ck6 (ORCPT ); Sun, 27 Feb 2022 21:40:58 -0500 Received: from mout.gmx.net (mout.gmx.net [212.227.17.22]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 094B96D4F2; Sun, 27 Feb 2022 18:40:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1646015991; bh=s7PQLkyF7lgwD3XBQiSaqNoJa0DuoiTYpx9LJQP/Mls=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:In-Reply-To:References; b=cxpUscFLGUZJNcWt88FoOwBRPkoIN93GG0po2YwCVFNCRwfHt2GBaOum3BkF2QZYW ldIyQx9k8nFEALMlOWGIv631902+dQR4M46lVwG/+52ltRkBiS9LsEFMoWmJSYlJt2 eQgVFw1ngAqm2Sp03hXt4Trb1XrPfm5Ton43sq+M= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from Venus.fritz.box ([149.172.237.68]) by mail.gmx.net (mrgmx104 [212.227.17.168]) with ESMTPSA (Nemesis) id 1MpUUm-1nytxL1gXU-00ptLI; Mon, 28 Feb 2022 03:39:51 +0100 From: Lino Sanfilippo To: gregkh@linuxfoundation.org, jirislaby@kernel.org, u.kleine-koenig@pengutronix.de Cc: linux@armlinux.org.uk, richard.genoud@gmail.com, nicolas.ferre@microchip.com, alexandre.belloni@bootlin.com, ludovic.desroches@microchip.com, shawnguo@kernel.org, s.hauer@pengutronix.de, kernel@pengutronix.de, festevam@gmail.com, linux-imx@nxp.com, mcoquelin.stm32@gmail.com, alexandre.torgue@foss.st.com, linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-stm32@st-md-mailman.stormreply.com, lukas@wunner.de, p.rosenberger@kunbus.com, Lino Sanfilippo Subject: [PATCH v4 1/9] serial: core: move RS485 configuration tasks from drivers into core Date: Mon, 28 Feb 2022 03:39:20 +0100 Message-Id: <20220228023928.1067-2-LinoSanfilippo@gmx.de> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220228023928.1067-1-LinoSanfilippo@gmx.de> References: <20220228023928.1067-1-LinoSanfilippo@gmx.de> MIME-Version: 1.0 Content-Transfer-Encoding: base64 X-Provags-ID: V03:K1:YyRUGiMq45KbcRKKJ3U/JHT8I4NesVil7nhtV13/29TW+GJXRoX Pf/8SR9YukbA1QMs8UGUiOzhxfyOA+kAAwI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zDLak2GtYw0Ec5ag78G fd9oXevkBRI7B16+Jvgv5bSVTvqVPiU15C32e49NdiuXS0jL9dMiZgweh7VeJZnrANFFEZ6WS W2eM8wXk2Xpgbp3vz+4H3fUdmMR9pF+/7PNlzZrMnFlaZ4F2mUhDIuQE8k6+Ke1NWGCp1d80J i3igUQBF9hn8tv1wMOHQNezy0avDyrMlTnK5ymElvjPcaseOQyAWf1+q6jXeOM+yi+v7NI0nl w+ur/ENLj9LS9k= X-Spam-Status: No, score=-0.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,FREEMAIL_FROM,MIME_BASE64_TEXT,RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,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 U2V2ZXJhbCBkcml2ZXJzIHRoYXQgc3VwcG9ydCBzZXR0aW5nIHRoZSBSUzQ4NSBjb25maWd1cmF0 aW9uIHZpYSB1c2Vyc3BhY2UKaW1wbGVtZW50IG9uZSBvciBtb3JlIG9mIHRoZSBmb2xsb3dpbmcg dGFza3M6CgotIGluIGNhc2Ugb2YgYW4gaW52YWxpZCBSVFMgY29uZmlndXJhdGlvbiAoYm90aCBS VFMgYWZ0ZXIgc2VuZCBhbmQgUlRTIG9uCiAgc2VuZCBzZXQgb3IgYm90aCB1bnNldCkgZmFsbCBi YWNrIHRvIGVuYWJsZSBSVFMgb24gc2VuZCBhbmQgZGlzYWJsZSBSVFMKICBhZnRlciBzZW5kCgot IG51bGxpZnkgdGhlIHBhZGRpbmcgZmllbGQgb2YgdGhlIHJldHVybmVkIHNlcmlhbF9yczQ4NSBz dHJ1Y3QKCi0gY29weSB0aGUgY29uZmlndXJhdGlvbiBpbnRvIHRoZSB1YX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