Received: by 2002:ac0:de83:0:0:0:0:0 with SMTP id b3csp894425imk; Sun, 3 Jul 2022 11:30:05 -0700 (PDT) X-Google-Smtp-Source: AGRyM1uVxpRsE0ImZxDXMzczZBicAUK9BfNPKNjxm6MWMddjqo7PheqGKsB39alnIQCwvnPAlAH+ X-Received: by 2002:a17:90b:390c:b0:1ec:ae13:c5aa with SMTP id ob12-20020a17090b390c00b001ecae13c5aamr31601666pjb.64.1656873005589; Sun, 03 Jul 2022 11:30:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1656873005; cv=none; d=google.com; s=arc-20160816; b=0d2AtWyfzk9m7i9kME3RyVaKPJ8zzZs4s9AjrGh0l+gCNX5C446mRTYVPVzYwid/8l GrJdXn15eQKIB553NdQzfxGk+UzHv2wyl1o9FK+iWXtP+qq/B4iJ90Fx1n/ObIxsViVQ 3uaFj5VgTNLLlxZM7bwH7D7mPINgSU1EjM3Oos4ZKSuuo3dac/26CoT5FbMIS5C1Rg8M 9NGSiouBf7B7oxBRS2k93hfdo+ycDTJ2APPMIJGlG/fQgJM7lcZneZkQf2JKED5CHPmj 0quGVcLD6IMtnLOjo4+E/4LAgz6YFs62okmfvDXs8GAv5R3nz9X906rmyXzeriBG90sm DWgg== 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=4T+L3fj2rIaDf0LyMh9vktfUXwU/37+/jmdujXAyxz0=; b=wFpTfzwf0HJ5Xk3WTpngun5FE8lsXAYrfjY+76YgfdxnYrwjzck+4Xv8Emtl4bZhQb agNkyxcOb2twTyBMSvifocP+v/v90XiM5BV+iFndUnoYPa9dPlhN9AedR7dSsM3tPwvf kN6DsaY0WvYJK9HBDTiPs/yu3ZDEuVvAvAb+JEf1BF3p6BvymA9AHcal0mQEYw5EKuL7 FrkbP12gIT8r5zuAcCn5IuJPtjChm6Ebr+NYg2y5GGTLogHPxqn3Q1AP4dooOXRTAG9c GYmFb+1wE7ZfXZkEOew87zezpk07AxKEckWmUXJFkyy4vJhOIHM0HoerMJpuse2S3oer vSYA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmx.net header.s=badeba3b8450 header.b=FEuqHqg0; 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 y187-20020a638ac4000000b003fd917016f9si39094524pgd.164.2022.07.03.11.29.24; Sun, 03 Jul 2022 11:30:05 -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=FEuqHqg0; 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 S232707AbiGCRCH (ORCPT + 99 others); Sun, 3 Jul 2022 13:02:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44830 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232280AbiGCRBz (ORCPT ); Sun, 3 Jul 2022 13:01:55 -0400 Received: from mout.gmx.net (mout.gmx.net [212.227.15.19]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B41776274; Sun, 3 Jul 2022 10:01:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1656867690; bh=4T+L3fj2rIaDf0LyMh9vktfUXwU/37+/jmdujXAyxz0=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:In-Reply-To:References; b=FEuqHqg0WG5nVktHv6xCd3W1Ld6jtB5zAnlm/hfeHGjRN6Yvx+WK7KZ0ix1XOe/KH Xz2o8FO+6xxwOB7ztgX+NX3bVE6WtFKxUf6wsoQHWizke8Wf4wPpYI5FKUGIAYl1RT z0BrGsQRBedJMDB5HbP8B4dl8XpeKYnXsLUIHS2c= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from localhost.localdomain ([46.223.3.210]) by mail.gmx.net (mrgmx004 [212.227.17.190]) with ESMTPSA (Nemesis) id 1N1wq3-1nRnF52VdB-012Kq0; Sun, 03 Jul 2022 19:01:30 +0200 From: Lino Sanfilippo To: gregkh@linuxfoundation.org, jirislaby@kernel.org Cc: ilpo.jarvinen@linux.intel.com, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, andriy.shevchenko@linux.intel.com, vz@mleia.com, linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org, lukas@wunner.de, p.rosenberger@kunbus.com, Lino Sanfilippo Subject: [PATCH v2 2/9] serial: core, 8250: set RS485 termination gpio in serial core Date: Sun, 3 Jul 2022 19:00:32 +0200 Message-Id: <20220703170039.2058202-3-LinoSanfilippo@gmx.de> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220703170039.2058202-1-LinoSanfilippo@gmx.de> References: <20220703170039.2058202-1-LinoSanfilippo@gmx.de> MIME-Version: 1.0 Content-Transfer-Encoding: base64 X-Provags-ID: V03:K1:R+T9lTd5QNKfU/UVz9Zl9hUp72gfyo/5kcqc7ITMzukGKBCRWX+ igQ4FnN+qs1jxL/Sq2SfxXLcA8lc6ToVFJuQMItUdRh04VQQ3nGqPGCdyhnnzDMSq/XxivC rcAB5CHDsNN986vE8DN8LcHJeuOAFeIBGDJw+OzV9XGU1yj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NtBgJtFDE2PEzA+CmVKOUzaXeTsBFrqxTF4BzUyxoyX4iNZ5Yv3k v7jtFg4PdlSIOzm+5S70okhmX/J8BNd2TUPCeO2fL+cU15TaDlG7TDSel0eds6ysiClwqiR7G 9GgOI6ZkBqiabwN3VsqOED5hyBNiPpS8ulfrW1YenrA/d21STfPn1kAgg== 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 RnJvbTogTGlubyBTYW5maWxpcHBvIDxsLnNhbmZpbGlwcG9Aa3VuYnVzLmNvbT4KCkluIHNlcmlh bDgyNTBfZW00ODVfY29uZmlnKCkgdGhlIHRlcm1pbmF0aW9uIEdQSU8gaXMgc2V0IHdpdGggdGhl IHVhcnRfcG9ydApzcGlubG9jayBoZWxkLiBUaGlzIGlzIGFuIGlzc3VlIGlmIHNldHRpbmcgdGhl IEdQSU8gbGluZSBjYW4gc2xlZXAgKGUuZy4Kc2luY2UgdGhlIGNvbmNlcm5pbmcgR1BJTyBleHBh bmRlciBpcyBjb25uZWN0ZWQgdmlhIFNQSSBvciBJMkMpLgoKRml4IHRoaXMgYnkgc2V0dGluZyB0 aGUgdGVybWluYXRpb24gbGluZSBvdXRzaWRlIG9mIHRoZSB1YXJ0X3BvcnQgc3BpbmxvY2sKaW4g dGhlIHNlcmlhbCBjb3JlIGFuZCB1c2luZyBncGlvZF9zZXRfdmFsdWVfY2Fuc2xlZXAoKSB3aGlj aCBpbnN0ZWFkIG9mCmdwaW9kX3NldF92YWx1ZSgpIGFsbG93cyB0byBzbGVlcC4KCkJlc2lkZ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