Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp204443pxf; Wed, 31 Mar 2021 00:51:59 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyAFKC6x0r0K4/7vcefwURxDBlIvk3exOm9OxTIwCSuOdgzEz0b094ZveLXIs7eesQge0QU X-Received: by 2002:a05:6402:5252:: with SMTP id t18mr2164574edd.258.1617177119199; Wed, 31 Mar 2021 00:51:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1617177119; cv=none; d=google.com; s=arc-20160816; b=nk0Vw5phVnUBubZyeYWMdEHV4rWGb/mStbiigF7DPzPSpNVb9zztZUEZdZ0RueOzZe jdTey/ElpBqldoyexUVzlPZrRNgh5xDhlEf8shtHTBx+MhwHoLWPGEMv7OsF42J6kVnu 2mwhZX5dU6Hv/3Q4ggKLR9RV45V9J9JcEr9a5In+jQKYMzhwvVVvKwiy7hDNTLqEQIFS NMDGWJpvNjkq8ogDnFYxHbdckdR7BR/8BScFn+M174IwPfpso8G3LHBiXi89yma4GI4t ZcPpxAFwYOMb78BoXAv/bcwXQkOMAU2pTQCTQ/EOlJCsrPmsdcBE4OGAQsuVnTacUQWL /OdQ== 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=Hywtd1KIB/q90EXy+mvZhwXEbQdTlEqSmz3ryL7o6/w=; b=tB3HtkZupp+f8Wmgjmw8Kj2uZm05LahwNcfyWKSICDgXLFgYivQxCIB612OuoqDgCr OHjplxwkD5ZKyeRONDIM3LNsLICs9SWXjuTMpkbxVw++M6UnxembR6gEavz4bwTRtI4R Mr9nt7/TNYwLDP3fqFjgaGuDdBrPiHYfnwbHgMlFHVgryqeg2l7/cB7Y96tGNF0fBePV wiuE1LglELuzVu6XjpnkkFM0YmIVXvAIuIrBBuJFwvW9Wf8EAQjhZJD+PJqafwNotb0V XEMoFp5OF9UdJFqHeX239jYNtMeDUnE9kGCaCiJrwT+SUKzFQfNDkwqNtbQLN+36N0g0 70Hg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@baylibre-com.20150623.gappssmtp.com header.s=20150623 header.b=vLQk20z5; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id r17si1184042edp.301.2021.03.31.00.51.35; Wed, 31 Mar 2021 00:51:59 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@baylibre-com.20150623.gappssmtp.com header.s=20150623 header.b=vLQk20z5; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234098AbhCaHuh (ORCPT + 99 others); Wed, 31 Mar 2021 03:50:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43812 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233925AbhCaHuF (ORCPT ); Wed, 31 Mar 2021 03:50:05 -0400 Received: from mail-yb1-xb2b.google.com (mail-yb1-xb2b.google.com [IPv6:2607:f8b0:4864:20::b2b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7ACFFC061574 for ; Wed, 31 Mar 2021 00:50:05 -0700 (PDT) Received: by mail-yb1-xb2b.google.com with SMTP id i144so20238625ybg.1 for ; Wed, 31 Mar 2021 00:50:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=Hywtd1KIB/q90EXy+mvZhwXEbQdTlEqSmz3ryL7o6/w=; b=vLQk20z5dr0eE0dUMRUz4Ku9kps5ZE3mVkEdzWhOmSfoLowIfxFDi8qbPbmtUeQV/N y/97yULuDc6u/Vy6dZtwzkhDhQt5rboSukZltgFeXSIMvLfb/SouIFU7vj1+mQZp1Hcg rosVO1RTLbphO8Ar9bwjD7JKzNND4GiNasrCtQKX/dN+HC8fZ4Dri8QLBvazp0yVIOil JeEO/lRvQFrw7uLzcXRXzyAHl5Xisl4uScy+WykpQZFvCpyAYn6Y/3rRN7YGGkEA96jD AUJ9vmzrAf4dC+JiGrYqDp91ikoI21VeErWYtu2+8l4eP5RS5J8MVPEnW7V4VyDjopLE 7DCw== 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=Hywtd1KIB/q90EXy+mvZhwXEbQdTlEqSmz3ryL7o6/w=; b=ibXmExs/l7HY1n9Vwz6p8jeGHiekqp55I7NPozIjwpZebYbUKg1t3WkIT0Z1HUZHa9 GuWA91ynY+CUWyiZYyMq4VTTHZY3AyHqe4BWYyBclmwf3+y4G2YEcKLamJY7UQD358bD 007xIKSi9NOMdTIJZTFrsmANWqAwd9bcWCcqANbo9fRJgVy0zQU/yci4416+FBRL1SnP 8Z3mpkoJJj/1G90DOSoqc+HRBsRlUvJ0NwA03eNYlRwItUhI3Pd8XYMEuENUVPBdwIJl BNTLLJSjGI+MaDjYvBV7nt2siNkifxwgIQmIvYAVYsVFbbrF1CvWwvMr8SwoHrVc38Da 9h1w== X-Gm-Message-State: AOAM5335XstHOVRaPaGlXjmuYque1wiy1eQHRqEWYJAsUgdX2WUw+gKY d4PzmUwouTgKiEWrZo/UGIVusCDcByoDQ11oBauoO7K+Ygg= X-Received: by 2002:a25:d2d3:: with SMTP id j202mr2883936ybg.157.1617177004878; Wed, 31 Mar 2021 00:50:04 -0700 (PDT) MIME-Version: 1.0 References: <20210315082339.9787-1-sander@svanheule.net> In-Reply-To: From: Bartosz Golaszewski Date: Wed, 31 Mar 2021 09:49:54 +0200 Message-ID: Subject: Re: [PATCH v6 0/2] Add Realtek Otto GPIO support To: Sander Vanheule Cc: linux-devicetree , linux-gpio , Andy Shevchenko , Bert Vermeulen , Linus Walleij , LKML , Marc Zyngier , Rob Herring Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Mar 30, 2021 at 7:48 PM Sander Vanheule wrote: > > Add support for the GPIO controller employed by Realtek in multiple series of > MIPS SoCs. These include the supported RTL838x and RTL839x. The register layout > also matches the one found in the GPIO controller of other (Lexra-based) SoCs > such as RTL8196E, RTL8197D, and RTL8197F. > > For the platform name 'otto', I am not aware of any official resources as to > what hardware this specifically applies to. However, in all of the GPL archives > we've received, from vendors using compatible SoCs in their design, the > platform under the MIPS architecture is referred to by this name. > > The GPIO ports have been tested on a Zyxel GS1900-8 (RTL8380), and Zyxel > GS1900-48 (RTL8393). Furthermore, the GPIO ports and interrupt controller have > been tested on a Netgear GS110TPPv1 (RTL8381). > > Changes in v6: > - Use devm_gpiochip_add_data() > - Code style for reading ngpios, header order > - Add Andy's Reviewed-by tag > > Changes in v5: > - Edited code comments > - Fold functions that were used only once or twice (ISR/IMR accessors) > - Drop trivial functions for line to port/pin calculations > - Use gpio_irq_chip->init_hw() to initialise IRQ registers > - Invert GPIO_INTERRUPTS flag to GPIO_INTERRUPTS_DISABLED > - Support building as module > - Add Rob's Reviewed-by tag > > Changes in v4: > - Fix pointer notation style > - Drop unused read_u16_reg() function > - Drop 'inline' specifier from functions > > Changes in v3: > - Remove OF dependencies in driver probe > - Don't accept IRQ_TYPE_NONE as a valid interrupt type > - Remove (now unused) dev property from control structure > - Use u8/u16 port registers, instead of raw u32 registers > - Use 'line' name for gpiochip, 'port' and 'pin' names for hardware > - Renamed DT bindings file > - Dropped fallback-only DT compatible > - Various code style clean-ups > > Changes in v2: > - Clarify structure and usage of IMR registers > - Added Linus' Reviewed-by tags > > Sander Vanheule (2): > dt-bindings: gpio: Binding for Realtek Otto GPIO > gpio: Add Realtek Otto GPIO support > > .../bindings/gpio/realtek,otto-gpio.yaml | 78 +++++ > drivers/gpio/Kconfig | 13 + > drivers/gpio/Makefile | 1 + > drivers/gpio/gpio-realtek-otto.c | 325 ++++++++++++++++++ > 4 files changed, 417 insertions(+) > create mode 100644 Documentation/devicetree/bindings/gpio/realtek,otto-gpio.yaml > create mode 100644 drivers/gpio/gpio-realtek-otto.c > > -- > 2.30.2 > Series applied, thanks! Bartosz