Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp282555pxf; Thu, 1 Apr 2021 00:38:36 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzs7evWBlArLS7l1atRKDRJJu982823V2lqT307+k71yDyHNOakNBL56Mn8DewkgWy71jvj X-Received: by 2002:a17:906:2b0a:: with SMTP id a10mr7707301ejg.513.1617262716515; Thu, 01 Apr 2021 00:38:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1617262716; cv=none; d=google.com; s=arc-20160816; b=wuCz5/FgtJFXMjsR6YlUsbq947I4uiFhubmiOKxotm4YQdZpCzIMPOiHvyJCydINe5 tWb4VwOofcKAn2RFrlGqWniXpa+pqBsmNMGU+ahsDeuwMez00nhSH1XnyHvWb6VnBMZl xqlO1Iwiy49+hNIrFNQAFf/8RbOuMGAW2ANjtEXPJcOqUQgL3U0XrAdVKXNXoGG6CIY3 +RGvy4PoSsE50btc+JSUWEqXX24M17DpcpjuNetISODfEgnVh7uZho0SFnBNooP8FJfT FYaV0mBq74F1eqQZAmjotZdaj4hzb4XlZwR51S0FnaQjj9Ou6yY8UZkELwhGzpDo+JNi aDHA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=B3O9cEE/x7yQOH3OCzBfuz/r90ljyAx9qgSdSAUBQeg=; b=cI2STKrNu2twf+STUoPMCV07H0r8MYxrRea25gK87g/A3B+DKig8wEjnVrbveKTxdX 7hfQze8z83PtjoDETi0EzwK4OxMbBjvGqMGbAmGs7lkORuX8RHQJARUbihxhf0B8VsUz sQi+fl8kP38sA94W4hLqv4K33/4Z8l3mo0FS3vNWLpx62thFEmbFK8dB3ls+VxxZQtqg hbEdgc+jqBydsBW4dMBgCXUfhcIqA/1ZBm/xHZbwpIIdghnVnM6P54LfIfw9/FOAFWiw 9aNTg17sH5lnW6ZVAg2BlGjAhie6ZTu9jKuYCxasNjNc5V9NoyFY9A/nURsVy8ZnYWBv PeVg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bewilderbeest.net header.s=thorn header.b=C6N3FcwA; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=bewilderbeest.net Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id mj17si3705508ejb.28.2021.04.01.00.38.14; Thu, 01 Apr 2021 00:38:36 -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=@bewilderbeest.net header.s=thorn header.b=C6N3FcwA; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=bewilderbeest.net Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233327AbhDAHgg (ORCPT + 99 others); Thu, 1 Apr 2021 03:36:36 -0400 Received: from thorn.bewilderbeest.net ([71.19.156.171]:39095 "EHLO thorn.bewilderbeest.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233379AbhDAHgX (ORCPT ); Thu, 1 Apr 2021 03:36:23 -0400 Received: from hatter.bewilderbeest.net (unknown [IPv6:2600:6c44:7f:ba20::7c6]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: zev) by thorn.bewilderbeest.net (Postfix) with ESMTPSA id 52C8C8C; Thu, 1 Apr 2021 00:36:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bewilderbeest.net; s=thorn; t=1617262574; bh=B3O9cEE/x7yQOH3OCzBfuz/r90ljyAx9qgSdSAUBQeg=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=C6N3FcwA7Id76ASk9cp4pGQ/ND/WQGbdAlIE2LuJdb68naJSLZ7qYJ/XbnoQstgtt xTa2QgbpBg4DvpayDCbLB54CIq3bTjSQQ6zcFkFUKeSHHTO+CIwNuFQdsKvqj/BUK7 yr22HupdBi6ZVCWCAO6kxXZftOwKlcz0EeoIf9NM= Date: Thu, 1 Apr 2021 02:36:11 -0500 From: Zev Weiss To: Andrew Jeffery Cc: Joel Stanley , Jeremy Kerr , OpenBMC Maillist , Linux ARM , linux-aspeed , Linux Kernel Mailing List , Greg Kroah-Hartman , Jiri Slaby , linux-serial@vger.kernel.org Subject: Re: [PATCH v2 2/3] drivers/tty/serial/8250: add DT property for aspeed vuart sirq polarity Message-ID: References: <20210401005702.28271-1-zev@bewilderbeest.net> <20210401005702.28271-3-zev@bewilderbeest.net> <06aee58f-819b-4486-a5ea-22e6d45e2be5@beta.fastmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: <06aee58f-819b-4486-a5ea-22e6d45e2be5@beta.fastmail.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Apr 01, 2021 at 12:34:04AM CDT, Andrew Jeffery wrote: > > >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 Ah -- yes, that does sound like a sensible approach. I'll send a v3 with that worked in. Zev