Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp4185580imw; Tue, 19 Jul 2022 01:15:29 -0700 (PDT) X-Google-Smtp-Source: AGRyM1uYB/7QXq6WNtmN2KafPDvd+dB6kYnPaaf35Pi5ODlKS9i9A3PJZIYjNj8Ab/Y6CL2FwuX1 X-Received: by 2002:a05:6402:280b:b0:43b:5d75:fcfa with SMTP id h11-20020a056402280b00b0043b5d75fcfamr14938950ede.114.1658218529367; Tue, 19 Jul 2022 01:15:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1658218529; cv=none; d=google.com; s=arc-20160816; b=HelLv87r43Nercw21PSSoNJuUSpybQUPdqC+4344dvrfKJ1kj5/WpBOCeNNe5kSX+T 30bQ1CJPwd/QEaKqbjJF+vb2hxD4m1dsgUZ/FvsejiFIv3Y8lvnbPBbTjDWEqpkFSpE1 9KgG/cCGdfbftSrLi21TVurS9QKzuZ9xRFSTV89+cXkyMAAAgpJ8kvpdFOPrNyLe2s5S s4gCzKcw4ZEBCcXFH6EdbGDb4fIW1QCLoYYbbH1o46eLGqpHyQv4DXV6VIy1gnmT03Lj 4wzb1qzn3j9/vScVsjcVgM3lPhgs3AEnY/w3NV0/spouFe14wNj7+z+259PbYWfToibS D+ag== 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=M5cTYTqWaTMF9MhTCmeKhpWnFSKz6cFUJZCFLS451Ws=; b=mXr3zEYJSdnbEWimIvfH6Ch+dVzzZ/tQoNBiB7qvV0VZJ28tnVQ/02awCVNmPtwsA/ p7T3sgDNFAyfTy35phQqP46SNa6RxKPIrygEtZK/MPLoQNmdvFW/oF1+DdDSzNg+SwNF e/1chJDC1dNscqlWf99PHUdx45mZpLc19ajgXyQbFEgw6yMCOEFdkZjJABUwgkt5hKNS cyQKM2Ccv2uI5eyzSgl5TPGnXmK7IvZh/hB3t9Bof5HYLO5oIZhER0Lzv8S0K6GS2Sza +Vx+Zm4LgMnHWmw51PAxG3b0FlMSvi/9MQ9iPBY2YYV1udomiNd86Ft0acX7OaleRXqU +nuw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bgdev-pl.20210112.gappssmtp.com header.s=20210112 header.b=xLyoJ+VA; 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 he35-20020a1709073da300b007269661baf2si23051590ejc.475.2022.07.19.01.15.04; Tue, 19 Jul 2022 01:15:29 -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=xLyoJ+VA; 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 S237083AbiGSIKn (ORCPT + 99 others); Tue, 19 Jul 2022 04:10:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55704 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236926AbiGSIK0 (ORCPT ); Tue, 19 Jul 2022 04:10:26 -0400 Received: from mail-ej1-x630.google.com (mail-ej1-x630.google.com [IPv6:2a00:1450:4864:20::630]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 80FA03FA1C for ; Tue, 19 Jul 2022 01:09:52 -0700 (PDT) Received: by mail-ej1-x630.google.com with SMTP id z23so25681851eju.8 for ; Tue, 19 Jul 2022 01:09:52 -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=M5cTYTqWaTMF9MhTCmeKhpWnFSKz6cFUJZCFLS451Ws=; b=xLyoJ+VAQX96XbLh3R+9UyAd9edhCXgdgOCpMgqxnJQJvZ85fC7ZY3h8bNW0nRGe8q EjnRKmjoIe0KqrAgtWPz94bTCKRiFC8Spy1as9hRHyl28m5noVAmvA/uOYqCnrpu2zxI vFP5DIrfStJcsO53qfBI8LpfryOl0oWlanh26fCRmcMY/cAcNKaiKB7S6Apa8FEj0IAV q1jomyFIkKSBQs7DJkAUdMqL49jiVlF+l/V1KDwNv5RY0QyE+m2mjY7Zp7tgsR2ZveIz Sy736+zV9uRn7AlFt+MvSM/FgJQYo+px0usaf/58aSUctZjeYlDy7EqOWq81dk0uD8v+ 5vnQ== 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=M5cTYTqWaTMF9MhTCmeKhpWnFSKz6cFUJZCFLS451Ws=; b=p3yPQYvObZDUsgA8DHwpeOhDI1sGKNcW99M0B6O5nSX94UaWe/2c3ssVYEMJ36Ikea kl0vPG2bp7PFZ20lWDlQI6w+bcLSoSKS6fhJtmZx9bS5RD9hInvkwcn8UFcYalHNF418 Uwgkh9qCWK+mxQDS0M2Q2ENA1aV/61gpLwhXI4v54D9QcLAU3iXUrpgjccC+otJY9DL5 62SLCBunytl0kDM23gqWWVK8NBQuW93exKr5lVIwberCaqIdxaqlVpJFQSxtSZWr/0s2 euzYlR+gWRVDIMhIHsHw48AfB7kTMUzihNSoVGw+M+j5yJ9J88u0LJ9g3pzZzZqBfPnl nU5A== X-Gm-Message-State: AJIora9acWojrKfvQAxKRrgMnJ/O1xV1lhnwp7wxYhQXFwjBsriruK/G kMwS7iA1LMmUXeA8t13TxW1P7DzqwOeM/I5hLCmzGB8Xg1I= X-Received: by 2002:a17:907:1b16:b0:72b:8c16:dac0 with SMTP id mp22-20020a1709071b1600b0072b8c16dac0mr28429198ejc.286.1658218183931; Tue, 19 Jul 2022 01:09:43 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Bartosz Golaszewski Date: Tue, 19 Jul 2022 10:09:33 +0200 Message-ID: Subject: Re: [PATCH v3 0/6] gpio: Implement and utilize register structures for ISA drivers To: William Breathitt Gray Cc: Linus Walleij , "open list:GPIO SUBSYSTEM" , Linux Kernel Mailing List , John Hentges , Jay Dolan , Fred Eckert , Paul Demetrotion , techsupport@winsystems.com, Andy Shevchenko 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 autolearn=unavailable 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, Jul 18, 2022 at 10:56 PM William Breathitt Gray wrote: > > Changes in v3: > - Updated contact information in MAINTAINERS > - Added help text for GPIO_I8255 Kconfig option > - Move include/linux/gpio/i8255.h to drivers/gpio/gpio-i8255.h > - Include "gpio-i8255.h" instead of > - Include linux/types.h instead of linux/compiler_types.h > - Add underscores for *PORTC_LOWER* and *PORTC_UPPER* defines > - Move (offset % 8) expression to a port_offset const above the io_port > const in i8255_direction_mask(); this should help optimize assembly > instructions on some architectures > - Implement an opaque i8255_state struct to organize and access i8255 > device states; this replaces the control_state array passed to > various i8255 library functions in previous patchsets > - Implement and provide a i8255_state_init() function to initialize the > i8255_state struct for a consumer > - Use a spinlock within i8255 library functions to protect access to > i8255 states and synchronize I/O operations; a spinlock is used so > that these functions may be used within an interrupt context > - Export the i8255 library symbols within a new I8255 namespace > - Update the 104-dio-48e, 104-idi-48, gpio-mm drivers to use the new > i8255_state struct and I8255 namespace > > The PC104/ISA drivers were updated to use I/O memory accessor calls such > as ioread8()/iowrite8() in a previous patch series [0]. 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. > > [0] https://lore.kernel.org/all/cover.1652201921.git.william.gray@linaro.org/ > > William Breathitt Gray (6): > gpio: ws16c48: Implement and utilize register structures > gpio: 104-idio-16: Implement and utilize register structures > gpio: i8255: Introduce the Intel 8255 interface library 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 > Hey William! Are you planning to submit a fourth version anytime soon? I am willing to take it for the next merge window if it arrives soon - like tomorrow at the latest. Bart