Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp1277999imm; Wed, 6 Jun 2018 13:21:01 -0700 (PDT) X-Google-Smtp-Source: ADUXVKKMEW8u4Azd/ItKTxajioj7i6XF/5NtWC4WoUQ+CWLx0eAaFNoGqu08F5Avt/PTA9BAoLM0 X-Received: by 2002:a63:648:: with SMTP id 69-v6mr3740738pgg.205.1528316461074; Wed, 06 Jun 2018 13:21:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528316461; cv=none; d=google.com; s=arc-20160816; b=DP1/A/GGoh/g5s/eY1OiVTBxgKThgUEjji2IcAhpU0MiKNr9G5kITRlogLnWd/0dUY BQRvSBawWefXSq/d2kzcog68t/ecABolhj3UyVncUKvi4nbjXK5ZJeiG5E8FwcSCi/hB b2FHmJcQWuY78GLWK0LafuAvInWEGUJ7qDL7pkLXd7r9cmVPTpbdWakH60Ib6prFzkaQ hqk4J9FNUL+BkpCcvBDcFSU6oQQQWwrWSObm+Ve/79PxB+3ELyLhJRHlj+INqUMgrKnO u2xvyUUkB4yN7vBFEO3UGLiNU0hCbpQenEUTUXgWQ98WO2Uq0zUzuTiGGBpnKvvRwNxy Fp2w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature :arc-authentication-results; bh=pcQIKBq0x9t7M5qQMEpEfvcNASnTvLziiTCorA2Kd2I=; b=Tl6J3CF4FN6T9UBHoox+VOjoZ83RRbm/2xDn/Zvd2BsJR17L2IeGMWvrz1e5OosvzH AtH3u0OJ96tUnPcLX2J4aDelFcLSNCIrvD4Cb8piSixOaXdIbjoJxEMc8YHLdR11OYLB szQutxkmwsgZywUfXbinxrx2lWs15JMYxdaAmPKcFFyMYQRAlCAws0e14DUrRXIbixXe vNA56TioWWj+5lfpr6NKFTJkF8j5YIW0wwab1H6vWsL2k0D7gx6IQCADUY9YVsq8P6cb Z/fwjTDBiHTQ83HeD3A7opw3ffGrLvoke85qLKMGwpzcnve9BsV1s3xmWFqtRua7HlpJ YABQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=d5peXlm0; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u6-v6si49142126pfm.183.2018.06.06.13.20.43; Wed, 06 Jun 2018 13:21:01 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=d5peXlm0; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932492AbeFFSzp (ORCPT + 99 others); Wed, 6 Jun 2018 14:55:45 -0400 Received: from mail-oi0-f66.google.com ([209.85.218.66]:46705 "EHLO mail-oi0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932473AbeFFSzn (ORCPT ); Wed, 6 Jun 2018 14:55:43 -0400 Received: by mail-oi0-f66.google.com with SMTP id h79-v6so6221129oig.13; Wed, 06 Jun 2018 11:55:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=pcQIKBq0x9t7M5qQMEpEfvcNASnTvLziiTCorA2Kd2I=; b=d5peXlm0iJCOz8mW1W3OEdnpprp4LiqWX9r1PlEZHtmlKm4zxgEPQzt9nHewt9UfD9 Kbv4yId+anNkowa0YxbZ8SfidKyexz0DwVok1DtE8EBKKs/MRLq+5JHujkVKLKcqoVsY 69zPDfRchJm5VFkKkzS5ZxoEXQp2aGhBzm7HMUKuwypjKm9ziSn/5VcMn+CIi2SYlx+s ygWPtCl0sk3ZVtPQrLKClpvr1sR//YbWL7IiNzDcUsU1/tTFNGYV5bTRJWfu6/PjzVgK ZrcIHRm9lO+L83BuUgLgAsWGAzkITvzheYUzP7SfDVW/pY0ORP9nNGkm1LwJppMi3Swy styw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=pcQIKBq0x9t7M5qQMEpEfvcNASnTvLziiTCorA2Kd2I=; b=YPzhtX/DPfccUtfj4NG8BQfAej8AuuAYNfz83o404D2nUbUmvs/sdncNQLXMBA//ol JgZR1F2Z9KI/75a+ghhrq6l9Eep5ASvedJW7HUHmB3MiZ2mRjdh69vOKa2jWy9aKaWxY ExT2gQX8yYnaaSDab74DU7VbMoRx4bxQJ9dWuUtneedIP2+5TjJ8NRkChXhTuc6ZiwLO +AlLS9RgEJQDV2ghKYu6vblu0wj7On7X0/zWIH+eiaEDmPkxavc58vbawytFtK7KEVbR dmmTLvi3ryPUPbpdo1pKApoFPEr0fMXwHEnmKIprzBpeVfPifhtfgx4OeoqDozWDB6y0 nS8w== X-Gm-Message-State: APt69E0VpqsReaQLwOYFBSgywhLQuQXnQ6PPA54H4Jdw27vpMHD2Xnog 4GEd3uk4d74dm1d6ZTCbAaaERLE1mgUv+myUupY= X-Received: by 2002:a54:4f0c:: with SMTP id e12-v6mr2450277oiy.98.1528311342544; Wed, 06 Jun 2018 11:55:42 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a9d:743:0:0:0:0:0 with HTTP; Wed, 6 Jun 2018 11:55:22 -0700 (PDT) In-Reply-To: <2abe2137e699e5ae3100b97316da469f6d1c9bb9.camel@linux.intel.com> References: <20180606094942.71190-1-giulio.benetti@micronovasrl.com> <20180606094942.71190-4-giulio.benetti@micronovasrl.com> <069f5cd3309e83d13c74929f240720b232ea7251.camel@linux.intel.com> <0bc400b1-6178-2021-c9a3-3190d1a1de32@micronovasrl.com> <2abe2137e699e5ae3100b97316da469f6d1c9bb9.camel@linux.intel.com> From: "Matwey V. Kornilov" Date: Wed, 6 Jun 2018 21:55:22 +0300 Message-ID: Subject: Re: [PATCH 1/4] serial: 8250: Copy em485 from port to real port. To: Andy Shevchenko Cc: Giulio Benetti , Greg Kroah-Hartman , Jiri Slaby , Matthias Brugger , Kees Cook , Allen Pais , Sean Young , "open list:SERIAL DRIVERS" , open list Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 2018-06-06 16:11 GMT+03:00 Andy Shevchenko : > On Wed, 2018-06-06 at 14:15 +0200, Giulio Benetti wrote: >> Il 06/06/2018 13:56, Andy Shevchenko ha scritto: >> > On Wed, 2018-06-06 at 11:49 +0200, Giulio Benetti wrote: >> > > em485 gets lost during >> > > >> > > Copy em485 to final uart port. >> > > >> > >> > Is it needed at all? >> > >> > The individual driver decides either to use software emulation (and >> > calls explicitly serial8250_em485_init() for that) or do HW assisted >> > stuff. >> >> In 8250_dw.c, during probe(), I need to call dw8250_rs485_config() >> against local struct uart_8250_port uart = {}; >> Inside serial8250_register_8250_port() not all uart fields are >> copied(em485 too). >> So after probe, em485 is NULL. >> >> Another way could be to call dw8250_rs485_config() against real uart >> port, after calling serial8250_register_8250_port(), >> would it make sense? > > Look at OMAP case closely. They have a callback to configure RS485 which > is called in uart_set_rs485_config() which is called whenever user > space does TIOCGRS485 IOCTL. > > So, it's completely driven by user space which makes sense by my > opinion. AFAIU, Giulio wants to add support for rs485-enabled-at-boot-time device tree option (see bindings/serial/rs485.txt for reference). I suppose it is only important for use-case when rs485 used as slave (peripheral role). > > -- > Andy Shevchenko > Intel Finland Oy -- With best regards, Matwey V. Kornilov