From patchwork Thu Sep 21 01:52:45 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yinbo Zhu X-Patchwork-Id: 14301 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:172:b0:3f2:4152:657d with SMTP id h50csp4551386vqi; Wed, 20 Sep 2023 18:55:14 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFPJvxhcZtqnjy/JfDfbMc5ZzLX/PIhIiTlCJeEC6psat4+TwjBEHOY4EaY+HxOdkrA0IZd X-Received: by 2002:a17:902:9f8e:b0:1c5:b1a6:8111 with SMTP id g14-20020a1709029f8e00b001c5b1a68111mr3394511plq.31.1695261314554; Wed, 20 Sep 2023 18:55:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695261314; cv=none; d=google.com; s=arc-20160816; b=iz+PAzDIGeAAA0XtEKCsMfGsdTl7UN+AEPTfiWRHo29X0XKPRGm+wRFV8ncasHqfB+ MCENWdRIRX9S9sY9I/7S4m9otefKxyVgWOj3urNHkPkSpOhkxbX4j6+FB64GAIGnfnJq Sdmoq2oKbCyIBPMVj62t8KiJn3QkxIWOXxgrrf7YHE9Vio/24m3xDjJXA7kjYxEFwFYr EIi6wjGBJ8HHddDDdXOruYalAGMP4rdIdedxlM3Qx3qgiItGp6XD9sHlJQ+X0Fk4n/rW K47qxAQDYFaTQA9+X54z7K2s3kH5XfJuAO8JvCgpoWaAmsR06KA8p3CI1H1Hg9/lRee0 rbRg== 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; bh=SzZAGTIZi4D30wfO+Ml2Yv/C1OGfr+aUpvSlfmmWIW8=; fh=XKODDx4sBhvAOKSuyA4IwULcg17i77q5Oxnmp6SJnKg=; b=LfYChho2pq06DbsNepruNSS5Vwym9P9zCVDGlgMTl2TYPUUDFUAz7ZjEyzWiVo+gnJ gAVR+jYZa/+A5pNmZzNQs0nK1gjh8ngpDmKMjdOCVq9VtxVywEFzRJ8cEfVo+H998CGd ETAiE/ZcumCBhuYreRc6P58z/3Fri3oSsKO1zX1ZT2sS8L7pDwc2vbUmg+LlU4aXlOZ0 LZsvhqD3ZU7Phro1a6zz3obBTMZpMEVxsvKd5y7NGGnVFron58D84LJN+kz9pyc8KhDO KDv1Z/Q4WQEx8/aRKRWelKq2HZ7HxEyvX+/e8FC9JAJeiyWI5hCwAwBSDidagwVgCGV2 6unQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from howler.vger.email (howler.vger.email. [2620:137:e000::3:4]) by mx.google.com with ESMTPS id m12-20020a170902e40c00b001c370dc4445si322935ple.210.2023.09.20.18.55.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Sep 2023 18:55:14 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) client-ip=2620:137:e000::3:4; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by howler.vger.email (Postfix) with ESMTP id AAD088322717; Wed, 20 Sep 2023 18:53:23 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229799AbjIUBxN (ORCPT + 29 others); Wed, 20 Sep 2023 21:53:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36624 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229716AbjIUBxM (ORCPT ); Wed, 20 Sep 2023 21:53:12 -0400 Received: from mail.loongson.cn (mail.loongson.cn [114.242.206.163]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 5C996AB; Wed, 20 Sep 2023 18:53:04 -0700 (PDT) Received: from loongson.cn (unknown [10.20.42.201]) by gateway (Coremail) with SMTP id _____8AxTev+oQtlanEqAA--.10539S3; Thu, 21 Sep 2023 09:53:02 +0800 (CST) Received: from localhost.localdomain (unknown [10.20.42.201]) by localhost.localdomain (Coremail) with SMTP id AQAAf8AxndzwoQtlCvsMAA--.26254S2; Thu, 21 Sep 2023 09:53:01 +0800 (CST) From: Yinbo Zhu To: Linus Walleij , Bartosz Golaszewski , Rob Herring , Krzysztof Kozlowski , Conor Dooley , linux-gpio@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Jianmin Lv , wanghongliang@loongson.cn, loongson-kernel@lists.loongnix.cn, Yinbo Zhu Subject: [PATCH v6 0/2] gpio: loongson: add more gpio chip support Date: Thu, 21 Sep 2023 09:52:45 +0800 Message-Id: <20230921015247.23478-1-zhuyinbo@loongson.cn> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 X-CM-TRANSID: AQAAf8AxndzwoQtlCvsMAA--.26254S2 X-CM-SenderInfo: 52kx5xhqerqz5rrqw2lrqou0/ X-Coremail-Antispam: 1Uk129KBjDUn29KB7ZKAUJUUUUU529EdanIXcx71UUUUU7KY7 ZEXasCq-sGcSsGvfJ3UbIjqfuFe4nvWSU5nxnvy29KBjDU0xBIdaVrnUUvcSsGvfC2Kfnx nUUI43ZEXa7xR_UUUUUUUUU== X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS 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 X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (howler.vger.email [0.0.0.0]); Wed, 20 Sep 2023 18:53:23 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1777610327386978234 X-GMAIL-MSGID: 1777610327669032307 This patch was to add loongson 2k0500, 2k2000 and 3a5000 gpio chip driver support. Change in v6: 1. Add a reviewed-by for gpio driver. 2. Rework the commit log. 3. Replace changes to "u32" in loongson_gpio_chip_data. Change in v5: 1. Use boolean initializer for lgpio->chip.can_sleep. 2. Remove the code that about io width gain from ngpios. 3. Fixup the ls7a-gpio and ls2k-gpio items in yaml file. 4. Add the reviewed-by information for dt-bindings patch. 5. Add some comments in loongson_gpio_to_irq. Change in v4: 1. Reword the title and commit log information. 2. Remove the offset parse in DT and add it in of_device_id and acpi_device_id's data field. 3. Add more gpio chip dt-bindings support in yaml file. Change in v3: 1. Reword the dt-bindings patch commit log information. 2. Add "loongson,ls2k1000-gpio" compatible. Change in v2: 1. Reword the patch commit log information. 2. Add some GPIO register offset description in yaml. Yinbo Zhu (2): gpio: dt-bindings: add more loongson gpio chip support gpio: loongson: add more gpio chip support .../bindings/gpio/loongson,ls-gpio.yaml | 21 +++- drivers/gpio/gpio-loongson-64bit.c | 119 ++++++++++++++++-- 2 files changed, 127 insertions(+), 13 deletions(-)