Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp225602pxf; Wed, 31 Mar 2021 22:38:46 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyg4u/ac4/i24woNhyqLD2cTwXLN3eDfBFDTb7qRTq8GF5H2e6GvzKcIkS9ixUo5Dc5HIxU X-Received: by 2002:aa7:c441:: with SMTP id n1mr7721491edr.203.1617255526740; Wed, 31 Mar 2021 22:38:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1617255526; cv=none; d=google.com; s=arc-20160816; b=NLiAGo4XK69K0GViCBT/AnA/G/NLoGy55BJmheEbn3oelCrVsk0aVaaVkPGlBW5f7z +zYQEyAIm7tb6j6Ijeh4aTIaFh7zvDSkV6GN/yNdmFtPuMdRsB/ZMqifkOzkP7yBDZWo fJ6x5ak0HgILv43zKqMt9hVeIlLOM52bloqVQAxoRBcP6LVypOLT3o/c1rdW8UAA8wXq ItxaGjpVuU45TTHewTqeG7vif+NriMcXnMgmPHKrWJWUfhHOzSpKO7GL+C/FXjXCOce0 UmRig2po7QnOaN2M9ef24RYrNMxBbrcSIWUAVhkH6201n9jMFURKhWPhen5Pt0gtVMii mTrQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:subject:cc:to:from:date:references:in-reply-to :message-id:mime-version:user-agent:dkim-signature:dkim-signature; bh=9vKqXNuVW2sNfrpwmB91XPRLRceRc4rOnwIZoL9sNT8=; b=Odztzb2HWcvHHENt0Te2TdPYeR5cP2BCi1Pi4JHQibM0YMsZn9+GIoSagnPYIiAD6g Q8vcIyGjOL7/t52ZCrYjeScP+Th65XY6Vr+pPfmoJtksW/JfKQtBtM2w7spIoXxnkrR9 uKSkqIf0lQsLjn79U4LusRLsMOO8n46JFw2x2C8C8OjRskr0prZhOvIafYrjIXfEk85E SqOD5VciEHGtaoHixPbPZ3mgdzKdJBLGSkNzT9YO2R/D4P7Rtr+LvmMHR9QP94tvO1S/ gJn6h9f88YWDbhp1bpLk7M+jTpRFoSC2E4DA2ZHtOPo0K9mfqzgIt1ljGhT/bh059W/x 1Q+w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@aj.id.au header.s=fm2 header.b=KHgCmq7r; dkim=pass header.i=@messagingengine.com header.s=fm2 header.b=VSfHcHZh; 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 k22si3788217edv.400.2021.03.31.22.38.22; Wed, 31 Mar 2021 22:38:46 -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=@aj.id.au header.s=fm2 header.b=KHgCmq7r; dkim=pass header.i=@messagingengine.com header.s=fm2 header.b=VSfHcHZh; 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 S232661AbhDAFfB (ORCPT + 99 others); Thu, 1 Apr 2021 01:35:01 -0400 Received: from out2-smtp.messagingengine.com ([66.111.4.26]:60919 "EHLO out2-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229514AbhDAFe0 (ORCPT ); Thu, 1 Apr 2021 01:34:26 -0400 Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.nyi.internal (Postfix) with ESMTP id 018CD5C00D9; Thu, 1 Apr 2021 01:34:26 -0400 (EDT) Received: from imap2 ([10.202.2.52]) by compute3.internal (MEProxy); Thu, 01 Apr 2021 01:34:26 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aj.id.au; h= mime-version:message-id:in-reply-to:references:date:from:to:cc :subject:content-type; s=fm2; bh=9vKqXNuVW2sNfrpwmB91XPRLRceRc4r OnwIZoL9sNT8=; b=KHgCmq7rWjtgBmiKrElfYzSjdJ2o2GFxZc5YxAwPY7qeXcp 8nI6Sz/fYyNcLb+Rq5TxmNTvG9/EeQgOoefSiPP9CQ0568q2xEZnnfWJ0P3n0V/1 ru2PpVE2j/wsReoDc4xQUC043i8P2AxrEhPuZ4nhGV5st3knF0/OmNuHlVMXwVks 33twoi0v08MJEYLICbA6j3U2tbpAYtsgIFbZYjikNycGNgn4yWV9n8Q8ka87RGJE BNchfVzFc4rEp3tG5I8h6d85Ac9TvSto3CVwCZ4mMRhGgJlfu3JZ0dPbPaCunVih riBxLul5XBiV9dB5F/EnAeFG4wozjz0VmD/l6Jg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; bh=9vKqXN uVW2sNfrpwmB91XPRLRceRc4rOnwIZoL9sNT8=; b=VSfHcHZh77AjwkSnRixOBR QX0ws7PNYr4T4YCqSM0MaOsOb/PwhCvX9houD1bqYqKDAJ43dh1OAHcc7Ni3tG8p Dr1B49TKYpCcDUJpRYSyhSvg/WT8Y7PfilQN/5zXl2rLOLCVVlQ9MyDfGdltotBa 6pcrmjro8mQpdccxaOu+MlKPswZFAS55Fcsppp/6x79Kr+Q4bqGpBiFYJ1/byInB D7ISqtbv3avPYrJxr1FwTYZx0E338eSXbImxFuJp5iRgr9VGG6aayfJvlF8pYTfV o20aFG7FGh5F5/StNX6een34G/yrmKNS1nzt5E+TACT4oZtspHKWcRCWyx76bO9Q == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduledrudeifedgleehucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepofgfggfkjghffffhvffutgesthdtredtreerjeenucfhrhhomhepfdetnhgu rhgvficulfgvfhhfvghrhidfuceorghnughrvgifsegrjhdrihgurdgruheqnecuggftrf grthhtvghrnhepudehtddtleektedvfeeitdeljeekveelkeegvdfhtdejhefgfedtfedv jeejledtnecuffhomhgrihhnpehkvghrnhgvlhdrohhrghenucevlhhushhtvghrufhiii gvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpegrnhgurhgvfiesrghjrdhiugdrrghu X-ME-Proxy: Received: by mailuser.nyi.internal (Postfix, from userid 501) id 73257A00073; Thu, 1 Apr 2021 01:34:24 -0400 (EDT) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.5.0-alpha0-273-g8500d2492d-fm-20210323.002-g8500d249 Mime-Version: 1.0 Message-Id: <06aee58f-819b-4486-a5ea-22e6d45e2be5@beta.fastmail.com> In-Reply-To: References: <20210401005702.28271-1-zev@bewilderbeest.net> <20210401005702.28271-3-zev@bewilderbeest.net> Date: Thu, 01 Apr 2021 16:04:04 +1030 From: "Andrew Jeffery" To: "Zev Weiss" , "Joel Stanley" Cc: "Jeremy Kerr" , "OpenBMC Maillist" , "Linux ARM" , linux-aspeed , "Linux Kernel Mailing List" , "Greg Kroah-Hartman" , "Jiri Slaby" , linux-serial@vger.kernel.org Subject: =?UTF-8?Q?Re:_[PATCH_v2_2/3]_drivers/tty/serial/8250:_add_DT_property_fo?= =?UTF-8?Q?r_aspeed_vuart_sirq_polarity?= Content-Type: text/plain Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 1 Apr 2021, at 15:48, Zev Weiss wrote: > On Wed, Mar 31, 2021 at 11:15:44PM CDT, Joel Stanley wrote: > >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). > > > > Yeah, that sounds like better way to approach it -- I think I'll > rearrange as Andrew suggested in > https://lore.kernel.org/openbmc/d66753ee-7db2-41e5-9fe5-762b1ab678bc@www.fastmail.com/ > > >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? > > > > I guess I might lean slightly toward keeping the DT description so that > if for whatever reason obmc-console-server flakes out and doesn't start > you're better positioned to try banging on /dev/ttyS* manually if you're > desperate. Though I suppose that in turn might imply that I'm arguing > for adding DT properties for lpc_address and sirq too, Why not just adopt exactly what I've done with KCS, where we have aspeed,lpc-io-reg and aspeed,lpc-interrupts? Andrew