From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 05786C41604 for ; Tue, 6 Oct 2020 07:07:22 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 9EA1220760 for ; Tue, 6 Oct 2020 07:07:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726897AbgJFHHV (ORCPT ); Tue, 6 Oct 2020 03:07:21 -0400 Received: from mail-ot1-f66.google.com ([209.85.210.66]:37045 "EHLO mail-ot1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726761AbgJFHHU (ORCPT ); Tue, 6 Oct 2020 03:07:20 -0400 Received: by mail-ot1-f66.google.com with SMTP id o8so11343407otl.4; Tue, 06 Oct 2020 00:07:18 -0700 (PDT) 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=IEjOVbc5CBTebJ+NkL7ECpC20QOFPXAJ42Fc/c1O0SY=; b=NsBMiJCHkO5KL+Nxjj+1B5zTTlxsW5jiVmzATKmuU3jPCBH/9CiTP1nYvbP6CPiBMZ CXOQ+AilbQH4OY9/gn1JBgJx724Ra6pDzP09tKdv+BtRNfo6V0MiQoK1V9ZxBRmwX5CN TbnW3vb6x6nd+gouYaRKOtXP/FAbL/7FlZfnf8qyz0uljoBIWPib2isBdzHU3kVn3H4Y 5uBZ1cG5yPN5sDLVu/dRs29oObCj7MlzpOU/m5z7XGkQGi/4z4oMQzYrg7+aaXhek2pV qTHV2fdyDTFCrJL/RftGKWkHF5ymB93gWujddHIhvYuYXelvIZ79smPUIp0DmAwMkMNs /TbQ== X-Gm-Message-State: AOAM533E2eswGDbHmIprmCAHQAw6/PsQguc1zQug7UxTzcNUWLdDzh9w vCc+0c2XFT6uBn03WAlZog1dyJxqRj/e0PnVljA= X-Google-Smtp-Source: ABdhPJyft7jjmM62xpHzFa1e5eDyNPLkIH/QmkvSYxRLkEx0Q7fnsMVR9bbUaRLw98zJcYaRRu5dXXCwl0ksw9d4EOk= X-Received: by 2002:a05:6830:1008:: with SMTP id a8mr1905233otp.107.1601968038374; Tue, 06 Oct 2020 00:07:18 -0700 (PDT) MIME-Version: 1.0 References: <20200923120817.1667149-0-mholenko@antmicro.com> <20200923120817.1667149-4-mholenko@antmicro.com> In-Reply-To: From: Geert Uytterhoeven Date: Tue, 6 Oct 2020 09:07:07 +0200 Message-ID: Subject: Re: [PATCH v11 4/5] dt-bindings: serial: document LiteUART bindings To: Mateusz Holenko Cc: Rob Herring , Mark Rutland , Greg Kroah-Hartman , Jiri Slaby , "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , "open list:SERIAL DRIVERS" , Stafford Horne , Karol Gugala , Mauro Carvalho Chehab , "David S. Miller" , "Paul E. McKenney" , Filip Kokosinski , Pawel Czarnecki , Joel Stanley , Jonathan Cameron , Maxime Ripard , Shawn Guo , Heiko Stuebner , Sam Ravnborg , Icenowy Zheng , Laurent Pinchart , Linux Kernel Mailing List , "Gabriel L. Somlo" Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Hi Mateusz, On Tue, Oct 6, 2020 at 9:01 AM Mateusz Holenko wrote: > On Fri, Sep 25, 2020 at 3:16 PM Geert Uytterhoeven wrote: > > On Wed, Sep 23, 2020 at 12:10 PM Mateusz Holenko wrote: > > > From: Filip Kokosinski > > > > > > Add documentation for LiteUART devicetree bindings. > > > > > > Signed-off-by: Filip Kokosinski > > > Signed-off-by: Mateusz Holenko > > > Reviewed-by: Rob Herring > > > --- /dev/null > > > +++ b/Documentation/devicetree/bindings/serial/litex,liteuart.yaml > > > +properties: > > > + compatible: > > > + const: litex,liteuart > > > > Have you already decided how to handle future LiteUART variants that add > > new features (e.g. CTS/RTS, DMA)? > > We were thinking of adding KConfig options, like > > [ ] LiteUART serial port support > < > LiteUART DMA support > > and using ifdefs in the code. That is the driver part, not the DT part. If enabled, the driver still needs to know if the feature is present and to be used, or not. > The other option could be to extend LiteX itself so that the UART core > provides information about its configuration via the capabilities register. > That way the driver could configure itself automatically at runtime. > > This is, however, not decided yet. A capabilities register sounds good to me. That means everything is handled automatically by the driver However, it does mean the DT schema checker cannot validate the use of optional DT properties related to optional features, if any. Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds