From patchwork Wed Jul 20 10:40:19 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Emil Renner Berthing X-Patchwork-Id: 1658469 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=canonical.com header.i=@canonical.com header.a=rsa-sha256 header.s=20210705 header.b=KfZ57Oln; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.ubuntu.com (client-ip=91.189.94.19; helo=huckleberry.canonical.com; envelope-from=kernel-team-bounces@lists.ubuntu.com; receiver=) Received: from huckleberry.canonical.com (huckleberry.canonical.com [91.189.94.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4Lnsg10tr3z9sGD for ; Wed, 20 Jul 2022 20:40:43 +1000 (AEST) Received: from localhost ([127.0.0.1] helo=huckleberry.canonical.com) by huckleberry.canonical.com with esmtp (Exim 4.86_2) (envelope-from ) id 1oE782-0005NN-J7; Wed, 20 Jul 2022 10:40:30 +0000 Received: from smtp-relay-internal-1.internal ([10.131.114.114] helo=smtp-relay-internal-1.canonical.com) by huckleberry.canonical.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1oE780-0005Mi-Pk for kernel-team@lists.ubuntu.com; Wed, 20 Jul 2022 10:40:28 +0000 Received: from mail-ed1-f72.google.com (mail-ed1-f72.google.com [209.85.208.72]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-relay-internal-1.canonical.com (Postfix) with ESMTPS id 864403F0B5 for ; Wed, 20 Jul 2022 10:40:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1658313628; bh=ydtPBVjPXEz01dHLdOFvQrS39aQ7DuesBRL9KAykViQ=; h=From:To:Subject:Date:Message-Id:MIME-Version; b=KfZ57OlnVP8boUgyukyH0H9q/qrs3BmYLUQleAKp7l9ByJDCtWyOzSNPfBawOPPym c9TZCoC4zY9BCCa/wMpsPkVZX6+pyJrYCideUy5MEioY1cOt/e1wk4O9uFpGMJZS0x x176pqwNUOeKXpkhCgjA0YFyL9rODMLNdKkkEs9Lu5sRktxTGgIQAQ37xrQhvYLUvR zTRv/0unb6XztTLXoqGcwiPXqAzf1membM4mu+z3MMUzYck3EGOTibkpdxFnHIiaLr +hbHex8fb77H/meFc7eERAYFC50obpZdy1slvD3ZDyKS5fadm2QXVksYQD8IlLhhtY hzk4uZeubBaTA== Received: by mail-ed1-f72.google.com with SMTP id m10-20020a056402510a00b0043a93d807ffso11806468edd.12 for ; Wed, 20 Jul 2022 03:40:28 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=ydtPBVjPXEz01dHLdOFvQrS39aQ7DuesBRL9KAykViQ=; b=gHXvdQH1mWXikDMhoXhqNWB80jSE4RE5rij2jDQYuTiXg3H+LERUaj4thgl88lDv1J eU70IUbCiQFzw0nhP6Rr8cXcx5RRgM/wgkJu8tmFtF4CCdFQFa9nc3/QVu2GmL4gXSHd NXufpuc/otPXR4nWrQq98b8E9k9HMyKUS209YSv0eRCM/sukDzWQMAVGSbdB0EFxoyFW XEkJUR4lHPa1vaIR4P72YVZUdviloRio9e0wqZCoYp/oRkiJzRVjSTZTx3YH73LESA0F 3KnXtG7cihwyUEdKTmqXARo5GWlIQutjiT8TgJUFsngURPomhREFx5bDvg2/OooqXx4b gW4A== X-Gm-Message-State: AJIora/XENki6r4+mgZY/9ZiHRydA2rQP/PqEM+NTtFXuQECNVIO22Pf S83m5IrO1nHLwkuJn2UGfqW/6sHLNTWadWknBXcRaie30hnP54aXTlPKMiNbkcllqrO4VU3dzm0 7+OWdEB/kCM2MJWgsAReSUsx6Wk/xiO+K86wuujqVuA== X-Received: by 2002:a17:907:87b0:b0:72f:11fc:86c1 with SMTP id qv48-20020a17090787b000b0072f11fc86c1mr19813038ejc.449.1658313627364; Wed, 20 Jul 2022 03:40:27 -0700 (PDT) X-Google-Smtp-Source: AGRyM1tmWo9IKpUJFmr+OTwtevJt6T0eNg0pni7Eo5WqViTgu6wmsMe6PmtrVb1LN+cnS2diZrjSRQ== X-Received: by 2002:a17:907:87b0:b0:72f:11fc:86c1 with SMTP id qv48-20020a17090787b000b0072f11fc86c1mr19813024ejc.449.1658313627142; Wed, 20 Jul 2022 03:40:27 -0700 (PDT) Received: from stitch.. (80.71.140.73.ipv4.parknet.dk. [80.71.140.73]) by smtp.gmail.com with ESMTPSA id r18-20020a17090609d200b006feed200464sm7699690eje.131.2022.07.20.03.40.26 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Jul 2022 03:40:26 -0700 (PDT) From: Emil Renner Berthing To: kernel-team@lists.ubuntu.com Subject: [SRU][K][J, hwe-5.17, oem-5.17, starfive-5.17, allwinner-5.17][PATCH 0/1] Enable CONFIG_GPIO_CDEV_V1 Date: Wed, 20 Jul 2022 12:40:19 +0200 Message-Id: <20220720104025.1580222-1-emil.renner.berthing@canonical.com> X-Mailer: git-send-email 2.36.1 MIME-Version: 1.0 X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.20 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: "kernel-team" [Impact] * The libgpiod2 library and gpiod tools shipped in Jammy don't work. * These tools are meant to replace the old sysfs interface and be a better and more efficient way to manipulate GPIOs from userspace. Unfortunately the latest release is still using v1 of the character device kernel API which is not enabled in Ubuntu kernels. * This is Kent Gibsons reply on the linux-gpio mailing list: On Tue, Jul 12, 2022 at 09:48:45AM +0200, Alexandre Ghiti wrote: > Hi, > > Ubuntu kernels do not enable GPIO_CDEV_V1 as it is deprecated, but the > libgpiod package that we ship is still based on the latest version > 1.6.3 which does not implement the API v2. So I'd like to update > libgpiod, do you have any recommendations about what branch/sha1 I > should use? Do you plan to make a release that implements the API v2? > Firstly, libgpiod is Bart's library so he is the authority, but this is my understanding... TLDR: You should keep GPIO_CDEV_V1 enabled. v1 is deprecated from a development perspective, so all new feature development will occur on v2, and new applications should target v2. Existing apps targetting v1, be that directly or via libgpiod v1.6.3, will require GPIO_CDEV_V1 until they migrate to v2. The mainline kernel will continue to support v1 while userspace transitions. libgpiod v2 is in active development, and should reach its first release shortly. Note that it is NOT a plugin replacement for v1. It has a different API, for similar reasons to why we had to switch in the kernel, so apps will need to be actively migrated. I wouldn't suggest making any effort to package libgpiod v2 until Bart makes an official release. Cheers, Kent. [Test Plan] * Run gpioinfo on a machine with exposed GPIOs and check that it lists the GPIOs and doesn't error with gpioinfo: error creating line iterator: Invalid argument [Where problems could occur] * There may be code and scripts that hasn't been tested with a working libgpiod2/gpiod tools and uncover latent bugs. Emil Renner Berthing (1): UBUNTU: [Config] Enable CONFIG_GPIO_CDEV_V1 debian.master/config/annotations | 4 +++- debian.master/config/config.common.ubuntu | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) Acked-by: Tim Gardner Acked-by: Stefan Bader