Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp275540imm; Tue, 12 Jun 2018 23:37:40 -0700 (PDT) X-Google-Smtp-Source: ADUXVKLEokSoic6KEV+LsFdaEWlJWJqJ/bZxsdBeDDPxNLH5XjnexoEvfVPUf1AG/0bZVF0dVHxY X-Received: by 2002:a62:6a46:: with SMTP id f67-v6mr3571370pfc.105.1528871860111; Tue, 12 Jun 2018 23:37:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528871860; cv=none; d=google.com; s=arc-20160816; b=iGnzlcAaXqlHLvV8Q8qKNzACiAP59tNx2bQdMGdedFByhJ/dmWokBs3+Azn3wenFSO Rj7mdGWOebDvSxy/dr+6DPq9xd69R5057Frp8d/eIVoGgdxs9jetv9QxsogUuvNLli7L dryK2LrTzcYFNyq6SxQIf6x31drvQWkpaEmO0U0zMN3BgtiDyviDJfFFwSrwq3iUex/K 3pHmWA5/36bRZF0Y1OrNimCbFIBr4s+1UTm17n1R0ZBs1/qX3bBvFkMFiiOG2dw/583x hXrTMcr3132qdHJydBmePcwh2qc8HCOGyoF+JksnexWR40YtWv3BAKY3qoowR348tetv X9JA== 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 :in-reply-to:references:mime-version:dkim-signature :arc-authentication-results; bh=jp7lbYeqgzIXVyF4ygVXt6FsKAHdtkzKeyQD1np/joY=; b=wBEXPL0GQv7CuW6upBpG51GinEC4yTOCVeIl1r1/ORFJzSjBglgHdmPG1nrqhRHB0d 0GBltZNmB2ullSXuCllPZXp6PudRq0EHEaKF5eLDbCPQfTF3hjQyux4B/Zx567E9j+6Z mOwLkxSK/RhCpgWcnG6myeI2ZQEg2JPp9Ax2h1FBYrl0SXZ6ELdOLfSihvSUhFYvseCD EZmWY+KG0LCsWaBNqDLISIPJTvSM8/1zAPxfgFI1kRLg/a95d8/pIMNWfgmg1K68g/hD UYxd5v4bmoF23wOxSQgDzaZ4n5oa9Rgcz9xgx2y+UdZqGq7Z4RBZovjlCjunKqfiyPhC lu8w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=nfVCnjza; 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 h2-v6si2237806pls.245.2018.06.12.23.37.25; Tue, 12 Jun 2018 23:37:40 -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=nfVCnjza; 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 S1754568AbeFMGgn (ORCPT + 99 others); Wed, 13 Jun 2018 02:36:43 -0400 Received: from mail-lf0-f67.google.com ([209.85.215.67]:35498 "EHLO mail-lf0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754530AbeFMGgL (ORCPT ); Wed, 13 Jun 2018 02:36:11 -0400 Received: by mail-lf0-f67.google.com with SMTP id i15-v6so2132909lfc.2; Tue, 12 Jun 2018 23:36:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=jp7lbYeqgzIXVyF4ygVXt6FsKAHdtkzKeyQD1np/joY=; b=nfVCnjza2m0sWSrwQPX65pyn+dt8qBiayPl+cAnf0EJgCTlDIRT5i1ltbQXwfBcxUu hpc2LjAy5k/N43mGCwI3apBurqG1Y1FeVxhhb55JHv6V3Up9fI3dvCDwYBaGW6Qq85hD W0in0DjMFRCDKXUCCyyfVDZm5ZcfwWoXp94KPoIK92hGZHUM7iegVFQpPYm4m7JGKTFt rWflKCBWEvaVhkH5sxHpo5DpXJhyONF/3AEKGYY9UJ++KJ6oTlBIejVv3KT1ic51Qr23 wvY8XRVumLTqn6+8QR0JvXX5ZZNfBUR0dyVglmUrkeSR/O7BBRqYvd+tPcKD9pJMp/hQ LOBA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=jp7lbYeqgzIXVyF4ygVXt6FsKAHdtkzKeyQD1np/joY=; b=AUGqVgKANIdVXt2CTz/bZx/dXzKHSQ4V19tgOLh6rnXeDKkHffKm4sD18L+JFr7tXu 1GpS/Dln4ESg3XLVcDVYGkZKpfhzeaEtL+2kthW2vvttSBOnOU9TT9bKWNjtpDlYmOWW zPkIoD1t6DTuf+kGa2DlJn46nRCHkl7zoqVWSubzE9aLEYIwf+7IL2V9HRQtkp1AhO9z zGXN6hBIT2vBO2HlJjhr45WOWtjb/VavbP3VvVC1f0SfqaZWzh9PzL+edHtQgVq/WmMa 2Lk+eWh1PFs74RfiO5IgZp7YCB565L/Ff7OL5+0ubQ/te/ZIQx4Vic/E0E+faFcRXlbO OXog== X-Gm-Message-State: APt69E2kAGFUGJvvZfJPBWOhX3n9RuGABmbapMhV/WHuApoR5h762y0T bPlmrM8G4oky6I53a5nqW7Bm3yaDrDWTGPBWtt4= X-Received: by 2002:a19:b203:: with SMTP id b3-v6mr1976660lff.84.1528871770261; Tue, 12 Jun 2018 23:36:10 -0700 (PDT) MIME-Version: 1.0 References: <20180611115240.32606-1-ricardo.ribalda@gmail.com> <20180611115240.32606-19-ricardo.ribalda@gmail.com> In-Reply-To: From: Ricardo Ribalda Delgado Date: Wed, 13 Jun 2018 08:35:53 +0200 Message-ID: Subject: Re: [PATCH v2 18/24] serdev: ttydev: Serdev driver that creates an standard TTY port To: Rob Herring Cc: LKML , "open list:SERIAL DRIVERS" , Johan Hovold , Greg Kroah-Hartman , Jiri Slaby , Andy Shevchenko 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 Hi Rob, On Wed, Jun 13, 2018 at 3:20 AM Rob Herring wrote: > > On Mon, Jun 11, 2018 at 5:52 AM, Ricardo Ribalda Delgado > wrote: > > Standard TTY port that can be loaded/unloaded via serdev sysfs. This > > serdev driver can only be used by serdev controllers that are compatible > > with ttyport. > > I'm hesitant to expose a tty device on top of serdev to userspace that > we then have to support forever unless that's the only way tty devices > (for serial ports) are created. My concern is that, with the current implementation, serdev does have a tiny collection of usecases: -It cannot be used for board bring up -It cannot be used as a replacement of hciattach and friends It can only be used on embedded devices or platforms where the developer has control of the ACPI table. This hack, allows its use in almost any scenario and I have been happily using it for two weeks with no issue. It is also a very simple solution that does not have the issues of cdev/serdev coexistence that you mention. I am not very convinced about all the ttydev being serdevs. Adding 1K lines of code to people that do not plan to use serdev seems like a high expense. If in the future we can get rid of all the hciattach programs then we can redesign the port probing. > > I did a similar patch which just registered both serdev and a tty > allowing them to coexist. It suffered from warnings about open counts > though and felt hacky. > > Rob -- Ricardo Ribalda