From patchwork Mon May 8 12:35:09 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 91120 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp2133685vqo; Mon, 8 May 2023 05:59:06 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ63cM1BnbdTCiPd1SQUVRJPAgBUcJVCL4+jZwfzEOEzM9TxWI2KRx4l5pa1ZGQZ34ZQ5Wq0 X-Received: by 2002:a17:903:185:b0:1a1:e237:5f0 with SMTP id z5-20020a170903018500b001a1e23705f0mr13742340plg.58.1683550746536; Mon, 08 May 2023 05:59:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1683550746; cv=none; d=google.com; s=arc-20160816; b=MWZK0lAF2m64Sr+jGwo/5eC95CDTbunSw4Ao+2J8c7gOcS8SY246kp7p7srAY7e5eJ 7zRUU8TNzd1h1Sda99s7tRgV/2cs8lr1Ro5ojE4PNXPaapYbwLbeTj4S3d0U7VLPv9IJ qHiQk+jRLl5Bk5uNQNRK2ScveNN+no6a6HUap3/U7L6bMtCpLx1dU28nuiyowTEsfAZh v6Ijhm5JzjRZSDeGodlvo/Z4hUWhQqUIITqKbH17zzXl4Lfsy3QNigasv/CPHSAWZs8w mknd+8KxrWINsD2Ipfcv0B83ojUn5DeXR1RIX6GPC08d9h20WTSgVrl+TyTwa9sACmLb 4c4Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:in-reply-to:references:message-id :content-transfer-encoding:mime-version:subject:date:from :dkim-signature; bh=ulJciNp9+1XlKIBJfPg6D9fHgUw6mUDVehwtyecw6EM=; b=zJqIp3k3UZ3fK16M9p2WEZAFqdHJKKXFUanfAzFf2q25Oeas3/25gtexqOXIKaMgC8 XXd04KkPsPyH8FQIm3lo2Sefl+FGmpduXLFNSKKcmsOS/hHXbtGiOuoFx+UraZ7Iri+x YtMj9ZabwrQr1Gt52/9b7hpWOhDL3pNECPxLqaywWUreIsu8Gn7kFHdvulwT8SPve6Vl IaVOLc/OKt8LkJziTTPAXfPR+h8VBGx61e3Ifdbri593SI7QXbClHVAsKqlTuFK37pye tuj0RJJk2xJu1ivKlXBR7+d6AhPcorv+iRPFZ72Mh3VZEshKCWA8YrEVjjqpZT5/2gpQ kLjw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=U5GXHAq4; 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: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 17-20020a170902e9d100b001aade552f84si7929115plk.93.2023.05.08.05.58.51; Mon, 08 May 2023 05:59:06 -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=U5GXHAq4; 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 S234195AbjEHMfW (ORCPT + 99 others); Mon, 8 May 2023 08:35:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35208 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234160AbjEHMfQ (ORCPT ); Mon, 8 May 2023 08:35:16 -0400 Received: from mail-lj1-x232.google.com (mail-lj1-x232.google.com [IPv6:2a00:1450:4864:20::232]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 33DE1391A9 for ; Mon, 8 May 2023 05:35:13 -0700 (PDT) Received: by mail-lj1-x232.google.com with SMTP id 38308e7fff4ca-2ac785015d7so50030861fa.1 for ; Mon, 08 May 2023 05:35:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1683549311; x=1686141311; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=ulJciNp9+1XlKIBJfPg6D9fHgUw6mUDVehwtyecw6EM=; b=U5GXHAq4aJMBPrI1k9iVP7Kp1DyAp854W2N1KvoA7v70jUMtjgIvgwrv3KbG81NSMZ LSq6t2czDIX5nwii7BD8YWo1R78spiM8peQzpzqRLkQITpjpnH9GItCXdQU8EOBwKeue XlKeTApzwlXElHuC1v82EKApUd+fZ3WkSJLtxbhDf+X4IotkBgR2QwO1CahppYJsmFcz GLdBXC0qJHhEoKpjGdnon7ncA/DI1mqqdRRQB9x/onJRZ8kq9ZIILZ/9XgQSMqGc2ql2 sex8ItGNuH8hHfFlZQGayN66qLdmOCr97Nau2ZJo1CkgwJOqawGWzYVFD6ATuBTF4NQZ uLqw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683549311; x=1686141311; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=ulJciNp9+1XlKIBJfPg6D9fHgUw6mUDVehwtyecw6EM=; b=QsaZNloQa2hRVcGIB0w9a6VtyKlLSxDNA4vy4iBrncStWIAZDddzHqRvMuotpAJU2u UhlAAFID8sgCNFipkaJ/Nwk6D84/Fnm/Bt7I8/MK0Gozx6/a9KHaMgAO0xoIPNR4e23c 5Lp0q601kD4Fr/AvhwoaH1GUnJm2t6QLAY3Ye3vbQzzILvXCuclYy31O50XlkW9tU0Yi idKoRYcgfG3U9xXsQtlsPNhHSucuvfdbBfem1Y/RrxIcjKG8MVtUToeLvKz+2hDG4TbM 1emAv7NeBKSzJeSeD9fBXOvRnJjI9TXfggt3MO2/5sro2dVPukZmZAejjZ4Tyytn5+1T 8cRw== X-Gm-Message-State: AC+VfDyySXnHHtzbBJzpXiyvxCjvy6IIlnJeS0uBpE7JBR839sNCiAjf YZ5t3hi3991DyDAAKSEa4tyrlQ== X-Received: by 2002:ac2:51cd:0:b0:4f2:4d0a:7bde with SMTP id u13-20020ac251cd000000b004f24d0a7bdemr1256751lfm.31.1683549311405; Mon, 08 May 2023 05:35:11 -0700 (PDT) Received: from [127.0.1.1] ([85.235.12.238]) by smtp.gmail.com with ESMTPSA id q2-20020ac25fc2000000b004b55ddeb7e3sm1289593lfg.309.2023.05.08.05.35.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 08 May 2023 05:35:10 -0700 (PDT) From: Linus Walleij Date: Mon, 08 May 2023 14:35:09 +0200 Subject: [PATCH v4 1/2] dt-bindings: gpio: Convert STMPE GPIO to YAML schema MIME-Version: 1.0 Message-Id: <20230426-stmpe-dt-bindings-v4-1-36fdd53d9919@linaro.org> References: <20230426-stmpe-dt-bindings-v4-0-36fdd53d9919@linaro.org> In-Reply-To: <20230426-stmpe-dt-bindings-v4-0-36fdd53d9919@linaro.org> To: Bartosz Golaszewski , Rob Herring , Krzysztof Kozlowski , Maxime Coquelin , Alexandre Torgue , Dmitry Torokhov , Lee Jones , Philippe Schenker , Stefan Agner , Marek Vasut , Steffen Trumtrar Cc: linux-gpio@vger.kernel.org, devicetree@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-input@vger.kernel.org, Linus Walleij X-Mailer: b4 0.12.1 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,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=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-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1765330907365546981?= X-GMAIL-MSGID: =?utf-8?q?1765330907365546981?= This rewrites the STMPE GPIO bindings to a YAML schema. We add the properties that are used in the widely used STMPE GPIO device nodes found in the wild, most notably interrupt support, so interrupt-cells and interrupt-controller is now part of the bindings. Signed-off-by: Linus Walleij Reviewed-by: Krzysztof Kozlowski --- ChangeLog v3->v4: - Realize that there were actually some old bindings so we need to get rid of them as part of this patch. - Fix blank lines after description: keyword. ChangeLog v2->v3: - Use a compact hog node schema backed by the standard hog schema. ChangeLog v1->v2: - New patch split off from the MFD patch. --- .../devicetree/bindings/gpio/gpio-stmpe.txt | 17 ------- .../devicetree/bindings/gpio/st,stmpe-gpio.yaml | 53 ++++++++++++++++++++++ 2 files changed, 53 insertions(+), 17 deletions(-) diff --git a/Documentation/devicetree/bindings/gpio/gpio-stmpe.txt b/Documentation/devicetree/bindings/gpio/gpio-stmpe.txt deleted file mode 100644 index b33f8f02c0d7..000000000000 --- a/Documentation/devicetree/bindings/gpio/gpio-stmpe.txt +++ /dev/null @@ -1,17 +0,0 @@ -STMPE gpio ----------- - -Required properties: - - compatible: "st,stmpe-gpio" - -Optional properties: - - st,norequest-mask: bitmask specifying which GPIOs should _not_ be requestable - due to different usage (e.g. touch, keypad) - -Node should be child node of stmpe node to which it belongs. - -Example: - stmpe_gpio { - compatible = "st,stmpe-gpio"; - st,norequest-mask = <0x20>; //gpio 5 can't be used - }; diff --git a/Documentation/devicetree/bindings/gpio/st,stmpe-gpio.yaml b/Documentation/devicetree/bindings/gpio/st,stmpe-gpio.yaml new file mode 100644 index 000000000000..22c0cae73425 --- /dev/null +++ b/Documentation/devicetree/bindings/gpio/st,stmpe-gpio.yaml @@ -0,0 +1,53 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/gpio/st,stmpe-gpio.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: STMicroelectonics Port Expander (STMPE) GPIO Block + +description: + STMicroelectronics Port Expander (STMPE) is a series of slow + bus controllers for various expanded peripherals such as GPIO, keypad, + touchscreen, ADC, PWM or rotator. It can contain one or several different + peripherals connected to SPI or I2C. These bindings pertain to the + GPIO portions of these expanders. + +maintainers: + - Linus Walleij + +properties: + compatible: + const: st,stmpe-gpio + + "#gpio-cells": + const: 2 + + "#interrupt-cells": + const: 2 + + gpio-controller: true + + interrupt-controller: true + + st,norequest-mask: + description: + A bitmask of GPIO lines that cannot be requested because for + for example not being connected to anything on the system + $ref: /schemas/types.yaml#/definitions/uint32 + +patternProperties: + "^.+-hog(-[0-9]+)?$": + type: object + + required: + - gpio-hog + +additionalProperties: false + +required: + - compatible + - "#gpio-cells" + - "#interrupt-cells" + - gpio-controller + - interrupt-controller