Received: by 2002:a05:6a10:7420:0:0:0:0 with SMTP id hk32csp4368260pxb; Mon, 21 Feb 2022 19:17:55 -0800 (PST) X-Google-Smtp-Source: ABdhPJzwVg8h+lDT8VSBc0XXOTL89zJ4DgE+D1FFgnyk2nUrj1x+Kft2GFlKz5WzIPCGRBsD1xz4 X-Received: by 2002:a17:902:e742:b0:14f:252d:7a65 with SMTP id p2-20020a170902e74200b0014f252d7a65mr21433447plf.62.1645499875012; Mon, 21 Feb 2022 19:17:55 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1645499875; cv=none; d=google.com; s=arc-20160816; b=oNdKCHK9q/F4MLsU8zKaa7He122fkM+nZJ2DhTiH0Yb77pnPT3Ul2H3y7X4SMRdltG 3vJi8NDSQiYVED78k7XHAXA8WbR38cRseKRyfA+gbXS3Xw77Z43goypLqm9/bYMrVsaC SpP6C9KYqoxlspZ/RXwOFt/shw0mFxgup0POGyzLXZeVdG//Z1Km+1GvLsfwdgrKB3GM wRF51drPX86/T7KxsmnkAPLkoIP4OcTQunEwXBboE1TRcxqX9bTwtfGjQdHUgcBIPb31 sglvDRg5xvS98aHdZJHfCeVb0yhhC1QsS0E02tocVdaMOaoasxXpUKH84A2CACZ8fJ3j H8Rw== 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=VqDtjCu1On8E90PP+zcmUBiCFF/DRJ7DnsmAzRfKwqs=; b=neP/uO1ZlI1ljXN7jJKu3iHW9QrNEjxAGzlNYXzmZ2prIZBxTzRMK1glSu70/ZlLrt 1v0+he7/kGM8/qsYIONY84ZXhXTOCEUIBWPT5mFqArter8+MEcufgW/Q1LcSuN6NRoTl lIJ3r/4udD73gl0YnO0v48GpXoevWXmmpp5luppp2EuuMlBw7pKy5pZz5v/yfLS0MOAo Tj990oRP1tT2l2pAhcmYaHlKXWuFIl7zuDUlOLJdnj1yOkNqmgUYKkbu2friEJUz//BC Og7Rdn6L0l3Ordd8OJ7YHkAVfRoHEO0W3AETFZKSJhp+bh/1ADxwUmdBnTYaMnpSC7Cz HB1g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmx.net header.s=badeba3b8450 header.b=RNrqn3EG; 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 s17si3381102pls.203.2022.02.21.19.17.40; Mon, 21 Feb 2022 19:17:54 -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=RNrqn3EG; 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 S238275AbiBVBQZ (ORCPT + 99 others); Mon, 21 Feb 2022 20:16:25 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:52268 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238061AbiBVBQD (ORCPT ); Mon, 21 Feb 2022 20:16:03 -0500 Received: from mout.gmx.net (mout.gmx.net [212.227.15.15]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C01D925589; Mon, 21 Feb 2022 17:15:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1645492506; bh=VqDtjCu1On8E90PP+zcmUBiCFF/DRJ7DnsmAzRfKwqs=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:In-Reply-To:References; b=RNrqn3EGfsrYU7qAwyec8yYuxacsBA3JJj2OSnWGScS2QimbzXLMIK7d2XTnPvzz1 e/EoyrF7kRS915ouO1baNbEwCZptCjFGttoiweCVHkqTyEwUZT/YSHjb8071UQUelS 4sUmoFj15lAavtgtD+p2fNSomniGai4/LanotcWo= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from Venus.fritz.box ([149.172.237.68]) by mail.gmx.net (mrgmx004 [212.227.17.190]) with ESMTPSA (Nemesis) id 1MiacH-1nqy1F0fOZ-00fkCh; Tue, 22 Feb 2022 02:15:06 +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 v3 1/9] serial: core: move RS485 configuration tasks from drivers into core Date: Tue, 22 Feb 2022 02:14:25 +0100 Message-Id: <20220222011433.8761-2-LinoSanfilippo@gmx.de> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220222011433.8761-1-LinoSanfilippo@gmx.de> References: <20220222011433.8761-1-LinoSanfilippo@gmx.de> MIME-Version: 1.0 Content-Transfer-Encoding: base64 X-Provags-ID: V03:K1:SSsn/0UwWR3j7W6KX8VHiJO40uYcDYbhSEf6Uj+6iT5yAPMPiY2 DRtOInCigEKQmPnoKe2o/eI4N3ft3SFBN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 pA8z4hLuPwUHa9esLbPDmkATaP54BMiBwS0FEgDcSIBM5r7N9MeZmPOqofOM1/PqDRctCru6K 3weNt2ojBUjN69/ruP/olavuzCwM6rTHIP2Cxs18Y0sez3pJ2Y8C/WjHfoEv1X137lqqYtU/y lDX9d5l2FF5JPbcoxhCfR2ZAE/0HFr/Ybu0r69Uy9S/sqKX+r6JHmbifbguik2kMjy6jlHDna aAaAUmlkxhxbYM= 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_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 U2V2ZXJhbCBkcml2ZXJzIHRoYXQgc3VwcG9ydCBzZXR0aW5nIHRoZSBSUzQ4NSBjb25maWd1cmF0 aW9uIHZpYSB1c2Vyc3BhY2UKaW1wbGVtZW50IG9uZSBvciBtb3JlIG9mIHRoZSBmb2xsb3dpbmcg dGFza3M6CgotIGluIGNhc2Ugb2YgYW4gaW52YWxpZCBSVFMgY29uZmlndXJhdGlvbiAoYm90aCBS VFMgYWZ0ZXIgc2VuZCBhbmQgUlRTIG9uCiAgc2VuZCBzZXQgb3IgYm90aCB1bnNldCkgZmFsbCBi YWNrIHRvIGVuYWJsZSBSVFMgb24gc2VuZCBhbmQgZGlzYWJsZSBSVFMKICBhZnRlciBzZW5kCgot IG51bGxpZnkgdGhlIHBhZGRpbmcgZmllbGQgb2YgdGhlIHJldHVybmVkIHNlcmlhbF9yczQ4NSBz dHJ1Y3QKCi0gY29weSB0aGUgY29uZmlndXJhdGlvbiBpbnRvIHRoZSB1YXJ0IHBvcnQgc3RydWN0 CgotIGxpbWl0IFJUUyBk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