Received: by 2002:a5d:925a:0:0:0:0:0 with SMTP id e26csp516917iol; Thu, 9 Jun 2022 08:14:28 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyv3PT3SiF1SMUsvxTZ6hajDFKURmpiRaixz5V0C807c3HztAh1sai1XzFCNiZLwQVlzl3/ X-Received: by 2002:a05:6402:1f83:b0:42d:8d6f:a5d4 with SMTP id c3-20020a0564021f8300b0042d8d6fa5d4mr46378440edc.74.1654787668694; Thu, 09 Jun 2022 08:14:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654787668; cv=none; d=google.com; s=arc-20160816; b=YawQiTBZuN3U62TxB9uSFdOvLI2K7oUh7CLcqVs6NDoNLoaFMmjuXedshMRFb0ynXE 5I8xRWH/mPHdcHii2CuIaSkckU20So5DZrUzzIpdkRopWVI3Cdu6RIco8wfB2xlpqlpc ZYB3nVvmDCkT0aQ7mSy/HBRHJekqebjn6fKUqUjPQm1il14X9xGTcfYATUN9/we2Gy3m oPq/4GrQGteiKbMKE6DHGsbF9SRGaocWG1N2vsUIzGTXlrUCBcKCdIdHgVNdQiT7zxBX Gg26M71su/Vaioi8weEbMAKU61OWiKb0zbtJSkS/hMYNi1DwTOcyt2I4s6kSYAV+kqfY qERw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=0/u1rMjmJk+0BnOEKh8/bNAIanlTimqw+e3mGvtCQ0s=; b=A7ocSYtjysQimcPE/xlS5+a/SUoWK3u75nscqPYUP/HTrabnIjNYovyVXJ7zLQZGjW IP+FdW3MmKm04NvqUWcK2oZg4Y7Hp6ffHy2VdgSpI1aoEgtCDivD+FvOhySm3zXgM6DI JopAYWj93cconoNpEj6Eiv2uHqE4MpK3vIabmP3Go5LhwNaffruVuDh1+1kVTOu6aDfJ EV8Hcv0x3JbzYTGixBzs10+mUGgubPIXfkWIEsb4OgyBST2/KtesWoaCQUxrA8JFGvwl NXtUTpuItLRv8MKBWVguRcYltJU5Ghz4f45sXGoh1zJQ0JwxYTIdSVBd5Q/PQCPBhDti dpWQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bgdev-pl.20210112.gappssmtp.com header.s=20210112 header.b=n6rzyKX3; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id a24-20020a056402169800b0041e4c76fecfsi15264744edv.555.2022.06.09.08.14.00; Thu, 09 Jun 2022 08:14:28 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@bgdev-pl.20210112.gappssmtp.com header.s=20210112 header.b=n6rzyKX3; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236712AbiFIOj4 (ORCPT + 99 others); Thu, 9 Jun 2022 10:39:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51302 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233780AbiFIOjy (ORCPT ); Thu, 9 Jun 2022 10:39:54 -0400 Received: from mail-ed1-x52e.google.com (mail-ed1-x52e.google.com [IPv6:2a00:1450:4864:20::52e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B3ECD323889 for ; Thu, 9 Jun 2022 07:39:53 -0700 (PDT) Received: by mail-ed1-x52e.google.com with SMTP id x5so26406186edi.2 for ; Thu, 09 Jun 2022 07:39:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bgdev-pl.20210112.gappssmtp.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=0/u1rMjmJk+0BnOEKh8/bNAIanlTimqw+e3mGvtCQ0s=; b=n6rzyKX3xBz7Dxc38xruwgA1s4zAP+LN1QZOTs1g1JEN0BDllMd0FSLVDs2dptrIEL OCNd2aP4+AA2ZrMuHU6dJV6fFJiZ26yCw3ItF4A2JZOdF0ZeiCj0jv35QttVoor4LVwg eW5NOS53DB6fF+XjyJKWSx9LGQac+aPjL2pY4B0+jbF8ovRd+/LkcB6/jAuDotxYjS0k wwrqMWoIMQqj1qsIbw/MIAlNRnGhsZrZMCpCKR+fStZPXx4A2tKaeyP1wcDVcA8ZuLbV SfDiN+hNJZcvVaKNcaVXC1kA3EvDJpXKgkyI+W6E+rRY9+lTaaXTibxp8CgMSJMLoEcc j0Xg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=0/u1rMjmJk+0BnOEKh8/bNAIanlTimqw+e3mGvtCQ0s=; b=B2nSDttTydk4oq9AW+5eBdKHPURwO99kzH1vcqUi/KnlxeYS2Ra5YoUqPiV24dnFXs kGnJcIMNxEUBcW1lV4+2CeiGiaoLuUQX/VpuD6Na7XZ1jsr+1Q7jTSnHj0j/gxRlMWjj 4fXnQ+xI9Dl5xdbY5lVpyai1p0Os/01aMBHJKwf2vM2RTzadDMmjlc/+oy8K7gpFfFze Z2Ie87+n6/R/sFa2BKn2mqIPiFmYnd0CCEOeP0FRLaMtLf3t9pgmDo5o6TIs6zZD5i52 uRJaY+U2vlsjs9uB6ZMy8wdeqw3TmPVHpTExsPqI2fYwegDJLGHcKLlEUYD+jAlgK42T x98g== X-Gm-Message-State: AOAM531+2gU87mLRa3a6XO1mhQWY6rKlzrxmvnl8fPmBtBTtIQ/gH3iy YiC7Hgbr/JMY/0SZLM1vYOrd568OUb+ODsSWoD6nd2eIYQA= X-Received: by 2002:a05:6402:e0c:b0:42d:7f16:ac2c with SMTP id h12-20020a0564020e0c00b0042d7f16ac2cmr45236672edh.328.1654785592329; Thu, 09 Jun 2022 07:39:52 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Bartosz Golaszewski Date: Thu, 9 Jun 2022 16:39:41 +0200 Message-ID: Subject: Re: [PATCH 0/5] gpio: Implement and utilize register structures for ISA drivers To: William Breathitt Gray Cc: Linus Walleij , "open list:GPIO SUBSYSTEM" , Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_NONE, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jun 6, 2022 at 4:36 PM William Breathitt Gray wrote: > > The PC104/ISA drivers were updated to use I/O memory accessor calls such > as ioread8()/iowrite8() in a previous patch series [1]. This > patchset is a continuation of the effort to improve the code readability > and reduce magic numbers by implementing and utilizing named register > data structures. > > One of the benefits is that we can now observe more easily similarities > in devices that share similar interfaces; such as the i8255 interfaces > used by the 104-DIO-48E, 104-IDI-48, and GPIO-MM drivers -- as well as > the similar interface used by the 104-IDIO-16 and PCI-IDIO-16 drivers. I > hope to consolidate some of these code blocks in future patchsets. > > [1] https://lore.kernel.org/all/cover.1652201921.git.william.gray@linaro.org/ > > William Breathitt Gray (5): > gpio: 104-dio-48e: Implement and utilize register structures > gpio: 104-idi-48: Implement and utilize register structures > gpio: 104-idio-16: Implement and utilize register structures > gpio: gpio-mm: Implement and utilize register structures > gpio: ws16c48: Implement and utilize register structures > > drivers/gpio/gpio-104-dio-48e.c | 157 +++++++++++++++++++++----------- > drivers/gpio/gpio-104-idi-48.c | 128 +++++++++++++------------- > drivers/gpio/gpio-104-idio-16.c | 58 ++++++++---- > drivers/gpio/gpio-gpio-mm.c | 116 ++++++++++++++--------- > drivers/gpio/gpio-ws16c48.c | 119 +++++++++++++++++------- > 5 files changed, 366 insertions(+), 212 deletions(-) > > > base-commit: f2906aa863381afb0015a9eb7fefad885d4e5a56 > -- > 2.36.1 > Hi William, Unlike the previous patches which were relatively simple, these seem like there's a lot of space for breakage (even though they're attempting to do a good thing). Have you tested the code on real hardware? Bart