Re: [PATCH v2 2/3] drivers/tty/serial/8250: add DT property for aspeed vuart sirq polarity

From
Joel Stanley <joel@jms.id.au>
Date
2021-04-01 04:20:28
Also in
linux-aspeed, linux-serial, lkml, openbmc
Reply to
Zev Weiss, 2021-04-01
On Thu, 1 Apr 2021 at 00:57, Zev Weiss [off-list ref] wrote:
quoted hunk ↗ jump to hunk
This provides a simple boolean to use instead of the deprecated
aspeed,sirq-polarity-sense property.

Signed-off-by: Zev Weiss <zev@bewilderbeest.net>
---
 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
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Thread (27 messages) 27 messages, 4 authors, last reply 2021-04-01
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help