Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp4294559imw; Thu, 7 Jul 2022 16:29:42 -0700 (PDT) X-Google-Smtp-Source: AGRyM1vNi4AfGOQ5s/+GpsVc3Al9e3CFevdYMhrwJXudmj62knh4fZ+Ua332N4fEO8EtCsvj7Uet X-Received: by 2002:a17:907:6e12:b0:726:ecd0:b39d with SMTP id sd18-20020a1709076e1200b00726ecd0b39dmr572915ejc.526.1657236582442; Thu, 07 Jul 2022 16:29:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657236582; cv=none; d=google.com; s=arc-20160816; b=Rz2VY9vkh81D7mVrbKUR59ePDIMCFMx11drzeZpYQJxWtnS91PSf3FaGZZIbd4+JtD dc9JmewoAeyb4f+9QD1W9wh5SYYrbXhcJNCu6MEZfOfskz0SBqOMspBz/msmYrE3nEhI wFdOwIQS27+JcbaeVphzBu/KD9ODtpBfG8UuNLbvxaC3z3E2ZuavQ/cacHb4o3epheGq PCzHl0Q4pN72IWYHZxUoUzw/ED8BYQjcdxnTb+PDvQojbn5E3T8qsETYEkCjVvajOB/s L+Z3l4GrWpydpC1U9mmap+wyEBfKpMjerG2a3jtojIw7u+JNtRJWMrdJnXtTsHbvw5UZ Yd5g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=K3GtFLT5VlHIMmMMlLDEGSWPueKfPOd59FonXvTzyyE=; b=cihXD94jm5iCocGqhngbyYjxYyV0dWkXucCVecYN//CJ7akI37cFn+GwQrtoFqNeEv 5eGTZt82Ci/s7T5dDtnzuRvXAsL8wS8zaMJyI8pjZClVAAnebTVJ4Ndka25TQaGCPlYA G3oNXN3/FCnONx0m3U2CIBk/Q44ZyhTUMXMNkdWqezgIwmspbNQ5d5udCO9KCOMO60E6 +tmGTmbnyyMoQmsf3b+suCeUr27s7kx3HldrQizAtVT49UbyBYrUCeS+ZH6aeFTJZX3H C4nGYQVWax0DKBHLw5vdDN/YcC5ZVt1GbGO857Lad7bMOAAhdmZSMoe/wheVuof+/wcf A35w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=HaK0sV1w; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id en17-20020a056402529100b0043a6788fa9bsi1356362edb.211.2022.07.07.16.27.56; Thu, 07 Jul 2022 16:29:42 -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=@linaro.org header.s=google header.b=HaK0sV1w; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236556AbiGGXQR (ORCPT + 99 others); Thu, 7 Jul 2022 19:16:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58138 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236089AbiGGXQQ (ORCPT ); Thu, 7 Jul 2022 19:16:16 -0400 Received: from mail-oa1-x29.google.com (mail-oa1-x29.google.com [IPv6:2001:4860:4864:20::29]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 91869675B3 for ; Thu, 7 Jul 2022 16:16:15 -0700 (PDT) Received: by mail-oa1-x29.google.com with SMTP id 586e51a60fabf-101b4f9e825so27274945fac.5 for ; Thu, 07 Jul 2022 16:16:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=K3GtFLT5VlHIMmMMlLDEGSWPueKfPOd59FonXvTzyyE=; b=HaK0sV1wqReBsLI5fYuywyIsK7IX8zq2V0C3U4KAcNkLTQILSU0CP1lyPlfvHr/WjE ml4+0viUos4z0FKMiUTBEsAoq8Ap4hrnsoMbZ0HSP7e2jfzz3EkamK/Xh1IpCL4rNM4N Dg4wb7cLNpQ1RoXtxw3Jy84B5I77DPJiLZGzZe/bafVfYgYzcth9XVL9Xd0SX/n6CQGL 4PR+uqHrcTllvDEvJnumD1+mSOyMkCyyh3Oci8R5OBrliZA49RzOfx249nS99Cyeq5rN GDrP6FHYvFgDoQBvMJ6iZ4gXG0MdSnSQIJc2886+NJr+7Ivvx1X90mqi595it9vWKc4+ MnHg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=K3GtFLT5VlHIMmMMlLDEGSWPueKfPOd59FonXvTzyyE=; b=79x1hbOS/pBxY6O24RCJ0aO6aQPIybSWGNqc4yCIk2dguReCVswaSeuBKu7SqgftbD QFDwOjCvyBT6zX+WrXCzMfHq4ocN4ePZSLK+Nr+AgryRzVVvxEdpqh3TGc4gPVlAUTNT vHYnRmNFGEVA6taCFINajjIAWyWWJoPdqwytr8HSkDvtKZybrx0mMgYPT7DdW0CIcU/V 3pF09cyRX5qOlh5Xu+qHawYTcydrxIDdn1hpqR5Jcs6y94LXTh1rO8AE8Ai3GDKULItk 1ri+FDjhE+4rj3IVv6Dk+3RDqLcA8EQ6dBL8bDP5sbNoxF+qJoiN/Ed0s+4z5/EYJwn6 8Ilg== X-Gm-Message-State: AJIora+yjmGXeolpfwFKdEVfI+1elNApvgdxJmrTTulSICmDiA4+lhzI rPTl9yvOPyTW+damAcE0BeNntA== X-Received: by 2002:a05:6870:a70c:b0:10c:3bb7:ea15 with SMTP id g12-20020a056870a70c00b0010c3bb7ea15mr3640528oam.69.1657235774716; Thu, 07 Jul 2022 16:16:14 -0700 (PDT) Received: from fedora.attlocal.net (69-109-179-158.lightspeed.dybhfl.sbcglobal.net. [69.109.179.158]) by smtp.gmail.com with ESMTPSA id cg10-20020a056830630a00b006190efaf118sm2177606otb.66.2022.07.07.16.16.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Jul 2022 16:16:14 -0700 (PDT) From: William Breathitt Gray To: linus.walleij@linaro.org, brgl@bgdev.pl Cc: linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org, William Breathitt Gray , John Hentges , Jay Dolan , Fred Eckert , Paul Demetrotion , techsupport@winsystems.com Subject: [PATCH v2 0/6] gpio: Implement and utilize register structures for ISA drivers Date: Thu, 7 Jul 2022 14:10:02 -0400 Message-Id: X-Mailer: git-send-email 2.36.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-0.5 required=5.0 tests=BAYES_00,DATE_IN_PAST_03_06, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=no 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 Changes in v2: - Implement support for the Intel 8255 interface as a new gpio-i8255 module; common code among gpio-104-dio-48e, gpio-104-idi-48, and gpio-gpio-mm are consolidated in the gpio-i8255 module - Refactor the gpio-104-dio-48e, gpio-104-idi-48, and gpio-gpio-mm to utilize the new gpio-i8255 functions; this greatly simplifies the changes for these drivers 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. A new module supporting the Intel 8255 interface is introduced to consolidate the common code found among the 104-DIO-48E, 104-IDI-48, and GPIO-MM drivers. [1] https://lore.kernel.org/all/cover.1652201921.git.william.gray@linaro.org/ William Breathitt Gray (6): gpio: i8255: Introduce the i8255 module gpio: 104-dio-48e: Implement and utilize register structures gpio: 104-idi-48: Implement and utilize register structures gpio: gpio-mm: Implement and utilize register structures gpio: 104-idio-16: Implement and utilize register structures gpio: ws16c48: Implement and utilize register structures MAINTAINERS | 6 + drivers/gpio/Kconfig | 6 + drivers/gpio/Makefile | 1 + drivers/gpio/gpio-104-dio-48e.c | 224 +++++++++------------------- drivers/gpio/gpio-104-idi-48.c | 123 +++++++--------- drivers/gpio/gpio-104-idio-16.c | 58 +++++--- drivers/gpio/gpio-gpio-mm.c | 177 +++++------------------ drivers/gpio/gpio-i8255.c | 249 ++++++++++++++++++++++++++++++++ drivers/gpio/gpio-ws16c48.c | 119 ++++++++++----- include/linux/gpio/i8255.h | 34 +++++ 10 files changed, 575 insertions(+), 422 deletions(-) create mode 100644 drivers/gpio/gpio-i8255.c create mode 100644 include/linux/gpio/i8255.h base-commit: f2906aa863381afb0015a9eb7fefad885d4e5a56 -- 2.36.1