Received: by 2002:a05:6a10:6d10:0:0:0:0 with SMTP id gq16csp233842pxb; Tue, 12 Apr 2022 00:07:26 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxrCFo2Yq7ehKI7tf5XchWe3P5TdFFSFGbCkerCYC55hplF3tHaJH0kYbZgEa0OwcnILXMz X-Received: by 2002:a17:90b:4d89:b0:1cb:b402:fadf with SMTP id oj9-20020a17090b4d8900b001cbb402fadfmr3360703pjb.29.1649747230004; Tue, 12 Apr 2022 00:07:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649747229; cv=none; d=google.com; s=arc-20160816; b=znxAH90tx8dHjVI3F6VYp2sEZMqLvk5eu2P/yoEyJHnsJoHmg50cdOCwvzDS+iq8jU 61aCwpZm/WEJhIy/f4Z7ryfehF57GCS5LbC/hw5PPbWiuhsuvI0Kz9rmIbYfMD1nJpec ZGtGQjGJbIS54kgde+0QGiBw6uUGlN2J9QpGJzZyIn0Z14uUuP51B9D7ntfhufV2JhGa 7c27HCFhHOy8kcI9Erqcota3DdCGPapFP/AevbzVj/JcbAqMl3Y4zxG0LuuzGvtpSeRw FvfweX5NUSjZKY8Brb5h/NP8wZd9sE7ksyvoZn2hUTgizRruU7tUjxzQfWic7oRhYcXl q7PA== 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=bcuHE5LYV9+TYYYh0ydrJw7GifQW+gzYXpAJjFrVMQk=; b=dY4k6SBsJYxI7g3EPN6dwisqbHjGxosmlO93oUciJNgADTNnNKAlCK9+cSllrbkR+e Ogh90M2dPpoypvTDzqmsNPJ8cWaoNEhDIF0x8CJ6FnSYG5tM4XTwBhLpW+YSUw8eMwPb d1ay4KVAJmFcYrwPQyNZbaJ2FPaHWNliktaJy/cxy7WixDlUBzChBgfY6uwC1eNCnaLV icbnUuZjrqEMZmv41BTmlRLg2MRAebL1LCjA/i4hjDK6Ra1lpKxgcvn/84kaqBVAY1Bl Buq4ACIvnUiJdzEMEmnUbqwH+GztQ5LPMF0qKKWij1RzCQyq1N5Vkth5PsIqJfIMqdpl xmMw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmx.net header.s=badeba3b8450 header.b=lMxvV4i1; 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 d12-20020a056a0010cc00b005058961217asi11532862pfu.216.2022.04.12.00.06.48; Tue, 12 Apr 2022 00:07:09 -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=lMxvV4i1; 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 S237876AbiDJKuw (ORCPT + 99 others); Sun, 10 Apr 2022 06:50:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42104 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237190AbiDJKty (ORCPT ); Sun, 10 Apr 2022 06:49:54 -0400 Received: from mout.gmx.net (mout.gmx.net [212.227.15.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AC2FE53718; Sun, 10 Apr 2022 03:47:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1649587635; bh=bcuHE5LYV9+TYYYh0ydrJw7GifQW+gzYXpAJjFrVMQk=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:In-Reply-To:References; b=lMxvV4i1Ks1xzYR/VWUoE2+ZOsd6jl0EDnc6VmK6Y8SGiscZalFKsnaKaeUwa4NOZ CtaP1VasZJFVM1r9u8kdYAK97CboQr5vQhSnHAt54MfkgmgqE4xGeh/PyW0/GIGHng Re6o7NEhpJiEnUjuj4kX85JcpB+dIyfWSWHjN2w0= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from Venus.fritz.box ([46.223.3.230]) by mail.gmx.net (mrgmx005 [212.227.17.190]) with ESMTPSA (Nemesis) id 1N7QxL-1o2xMU2AST-017q8t; Sun, 10 Apr 2022 12:47:15 +0200 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 RESEND 1/9] serial: core: move RS485 configuration tasks from drivers into core Date: Sun, 10 Apr 2022 12:46:34 +0200 Message-Id: <20220410104642.32195-2-LinoSanfilippo@gmx.de> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220410104642.32195-1-LinoSanfilippo@gmx.de> References: <20220410104642.32195-1-LinoSanfilippo@gmx.de> MIME-Version: 1.0 Content-Transfer-Encoding: base64 X-Provags-ID: V03:K1:Cbf0m5TvH0ivlHwoDqjuX1YEpNeDKfr+7WrIDoXnH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pLAZ9uDemz4Af87rKe6J5zagzLkinfq9Rm1GFdXaj3qBMudR3QlK LC4vXQBsrXrklC0j6j2JGtGHekNmL64eWdAi3jqtoJqJKN+LcG3ayi9GJzLNCPEWW1yrtkUkP 9NMm85Xr1uMQvIYGRO2otn6PQfEaBT/5szjjfS5ZzAEMpaQMc8aH3tDgVj+DR5ghhEQW0YkFa YVHkVFeq5axL29QilBQRMFo0YII5dPxgyqoHWWLPjMYi0uvXezu/AdrT4GKEwfsXKmpBh7R2u dlX7syztAov0lU= 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 dHJ1Y3QKCi0gY29weSB0aGUgY29uZmlndXJhdGlvbiBpbnRv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