Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp189563pxf; Wed, 31 Mar 2021 21:17:59 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzDy/l5ALJFr+9g5cXJvIBpVOCElZUBEnIM9fAgVasMtIOF4fOCziB/bChx3Tg0Ye/de7Xy X-Received: by 2002:a17:907:720a:: with SMTP id dr10mr6997198ejc.375.1617250679059; Wed, 31 Mar 2021 21:17:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1617250679; cv=none; d=google.com; s=arc-20160816; b=d39hf+YvpJNmcz00G80XW3ZZyAxKrJ5soX66MpkCOHv3ZyP5IfgL5cm4u4b9AeAmyG M9sn7sheXBeqyi3MHXOpKZZvxAVGVHIFEU+QEvyzrT26Zm/aJchXPD6xsVfXL169ykC+ wJlSMnBfd33prMUQPQJU/n6zZeR0djov/gheBvDP+uJab/GP7qrGTeqrMxlMP+QH64GJ VUAAltuR4C+s5zy8YHY+pe9Sh4EMq5aU3wqfesfRk1YhOm3VlhPmZ9zc7kob1Sw0X6oc CqSq9mW16c1INfWmSDSxcCE1W908vF1Vg9Zunw6/OnaVCtaBinb4k8u0GmLVoKar8MqT t5Uw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=DnLOo/zKFvvfvZUcx+JWPM+sG45h5ZMlE6pfJth5bZA=; b=Jpw+QTHDuVymUjzkMlh7Mr9cuGzfFwiJoUmVTTPib065RNUia4kUVOXExU/0l2xOOu 1S1EY5JBzbE56el/RrcASh36gjIz6P2mt1dmm403kygs6RI3dZ787pzDxf2gH9xMT1c2 f4pQFWHcTHCh48Aj8XLYYqeOQ8HT6oQDVgzv0knAxGu/ep/byVTO2cufWr2Wmlc4PF/X vBc1najMw2W7FW5Nmt9JwWAzEbqutFq75tgYMCPPL3XduC7X4G+KgN72HmkmB4bDmbqD jhEQVcmQk+qI2m2AY//G9M/vQ3xHgUlxXvpFJ0o0z3d25aQgNHI/HLySMbMWEIP79wVr ylTA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@jms.id.au header.s=google header.b=FSY9bK6E; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id wn9si3158728ejb.491.2021.03.31.21.17.36; Wed, 31 Mar 2021 21:17:59 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@jms.id.au header.s=google header.b=FSY9bK6E; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229515AbhDAEQb (ORCPT + 99 others); Thu, 1 Apr 2021 00:16:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54884 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229473AbhDAEP7 (ORCPT ); Thu, 1 Apr 2021 00:15:59 -0400 Received: from mail-qt1-x833.google.com (mail-qt1-x833.google.com [IPv6:2607:f8b0:4864:20::833]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6DEDAC0613E6; Wed, 31 Mar 2021 21:15:58 -0700 (PDT) Received: by mail-qt1-x833.google.com with SMTP id c6so643506qtc.1; Wed, 31 Mar 2021 21:15:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=jms.id.au; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=DnLOo/zKFvvfvZUcx+JWPM+sG45h5ZMlE6pfJth5bZA=; b=FSY9bK6EqVMbAvbJjmaAGvWT2YTq6+22I+ohI8uL+Jxqutw0a+tqk250xv6oUWfebr iFDBj2m6RXqdKKIZUF/n11GKeruzHnFE3MO6xrVts8a6ok9yoI1b4nQhrQDqOLBkXTsT tCrCGmieznBTNltFiXw3Tg+lgg7a57GYS1SkE= 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=DnLOo/zKFvvfvZUcx+JWPM+sG45h5ZMlE6pfJth5bZA=; b=rhr5TFtpJKBt+YCMGlCmPFwc2yiev7EdluRVxe/tieZGsOn37X671/anFQGt2Wsrl/ Em5b4sHlJwY+TXSMwSrftNUwkbIIdW7MZ3D27y8BwCukJpkdAvBrByhpph1TsS6pizbk gMZ2Ta/8sena+1SR7MDJGx8VVAaWEbPrqKSoyc1oYPS3tvXoQBRbtINWeih6qii/Xc/o uBS2hkYu0fRe5CMNd8I/TSzLLrIlc6xWcAxoR8YJ2yZGtWgf6p6VAAIIICq1ilg1NgeW SOV4IE3TVdin7Md3e3v5nKMK4GPJLBi8hk5ywpAmXHtNlnSJOOOXI9m+YTIZ0X4jgPew ql5Q== X-Gm-Message-State: AOAM533UEHX6QrSE6G4J3hnwxOOIsX8TFaAFjqDoLCYG4R+fTIpXb7mk j+PjXtsaNxYnTF7xjOctJG+wxe9ws89bRV0ZS4Q= X-Received: by 2002:ac8:7547:: with SMTP id b7mr5684873qtr.176.1617250557473; Wed, 31 Mar 2021 21:15:57 -0700 (PDT) MIME-Version: 1.0 References: <20210401005702.28271-1-zev@bewilderbeest.net> <20210401005702.28271-3-zev@bewilderbeest.net> In-Reply-To: <20210401005702.28271-3-zev@bewilderbeest.net> From: Joel Stanley Date: Thu, 1 Apr 2021 04:15:44 +0000 Message-ID: Subject: Re: [PATCH v2 2/3] drivers/tty/serial/8250: add DT property for aspeed vuart sirq polarity To: Zev Weiss , Jeremy Kerr Cc: OpenBMC Maillist , Linux ARM , linux-aspeed , Linux Kernel Mailing List , Andrew Jeffery , Greg Kroah-Hartman , Jiri Slaby , linux-serial@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 1 Apr 2021 at 00:57, Zev Weiss wrote: > > This provides a simple boolean to use instead of the deprecated > aspeed,sirq-polarity-sense property. > > Signed-off-by: Zev Weiss > --- > drivers/tty/serial/8250/8250_aspeed_vuart.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/drivers/tty/serial/8250/8250_aspeed_vuart.c b/drivers/tty/serial/8250/8250_aspeed_vuart.c > index c33e02cbde93..e5ef9f957f9a 100644 > --- a/drivers/tty/serial/8250/8250_aspeed_vuart.c > +++ b/drivers/tty/serial/8250/8250_aspeed_vuart.c > @@ -482,6 +482,9 @@ static int aspeed_vuart_probe(struct platform_device *pdev) > of_node_put(sirq_polarity_sense_args.np); > } > > + if (of_property_read_bool(np, "aspeed,sirq-active-high")) > + aspeed_vuart_set_sirq_polarity(vuart, 1); This assumes the default is always low, so we don't need a property to set it to that state? Would it make more sense to have the property describe if it's high or low? (I'm happy for the answer to be "no", as we've gotten by for the past few years without it). This brings up another point. We already have the sysfs file for setting the lpc address, from userspace. In OpenBMC land this can be set with obmc-console-client (/etc/obmc-console.conf). Should we add support to that application for setting the irq polarity too, and do away with device tree descriptions? > + > aspeed_vuart_set_enabled(vuart, true); > aspeed_vuart_set_host_tx_discard(vuart, true); > platform_set_drvdata(pdev, vuart); > -- > 2.31.1 >