Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp2080630rwb; Wed, 5 Oct 2022 08:46:16 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4YvG6/qXA4/8cbYNeM/mgfF1oMS4VE4Jbz5IIGrRmgzLr8rfo+PDnmsCg/qbB7nDlTPatq X-Received: by 2002:aa7:ca45:0:b0:458:d9a2:6164 with SMTP id j5-20020aa7ca45000000b00458d9a26164mr379063edt.340.1664984776256; Wed, 05 Oct 2022 08:46:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1664984776; cv=none; d=google.com; s=arc-20160816; b=ERE5N+ibOoUzOQsK7wc8AlvVBocKSZaVAcltp6PbR8jFNjfG4DL/KuEaB6VZ6+2zAB d89w6qz+f55U68SLW/DdXyMzWEvfAuHJX42QItTVxpTI2Vr34y1S012iriSWLS/LErTW jKd/Tn6xsgCzQB3fweqKFrPRwrG7S43yeoX91akbD8HJS73c+lcpEv0uYVhg24ny3f7m Ptm5FncZuMrgjex9X3/elE6S8jfIQEN9UIQpmrSegCjt/GuxO3CWfJdepQztdZlbP5Ks k5XagZZ4HTZAplSQkrUCIr0L78rVCnryFsb2s+c3qm53b/7Xs/y353fUqZOAm9SW0Yve 3mLA== 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=ImmpV6nBR3axrQ+CsoksQDBmfqCSG7z7E6j/x4o0FG0=; b=lkyKDN7ZuZKGeWYSLKorPnhq4Drm6rdJbxSUa6RgScQnlf65+AaKC+UOu9V1+6wmVl U8nsYxYvuidKUc/nYdfRxw95cNECVa4zgfJFQDi1vc/JAa8YMP6Y0QOxzTUzrA5T0JkK lRRV8/u9pIzwwFdJSvx047JBsHyfVOo0GXhNoo1Y/nd1IUN4ZUess/qHeRu3Jb/XAUFQ LEb3jBFCiI0xc9qQezD3TQ532jRWdbp8pEltKnJog9jSGrt+PPERbr6DH0m+nVcJktXk MsN5G2tvWTITn7bTLqkmQ7NzJeth3XMnJx0eg6vpwo8lbocv+QqTLQUB2B6moKcbev8h rvRw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=nPWqxTAr; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id rh16-20020a17090720f000b007269ef1872esi11405563ejb.897.2022.10.05.08.45.50; Wed, 05 Oct 2022 08:46:16 -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=@gmail.com header.s=20210112 header.b=nPWqxTAr; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230322AbiJEO64 (ORCPT + 99 others); Wed, 5 Oct 2022 10:58:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50542 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230214AbiJEO6d (ORCPT ); Wed, 5 Oct 2022 10:58:33 -0400 Received: from mail-ej1-x629.google.com (mail-ej1-x629.google.com [IPv6:2a00:1450:4864:20::629]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DC6217D1E7; Wed, 5 Oct 2022 07:58:02 -0700 (PDT) Received: by mail-ej1-x629.google.com with SMTP id 13so36061707ejn.3; Wed, 05 Oct 2022 07:58:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date; bh=ImmpV6nBR3axrQ+CsoksQDBmfqCSG7z7E6j/x4o0FG0=; b=nPWqxTArnPtfpiAmk4Eb6+XVVapsXuO5q+8bmGaUKhDR5EPdr0gNGhfB1zxngaLaGr DjADGn7XP2uqDx8OQ1DYP3Y3a2g5UjSQXpb0nAn34GU0xijMOGElKiYNnJXNw46FLEPx U2xNqPCFKMuDc6dxw+VMaq1Q9Ii8xrBDmcFUrF4Sxl2GvqGJkO52Ab2t8eGxtdpuJmsG bTtDPIq4jG6Ge4wB91DlhIzPCzxzlteGu+GgkdacK0CgLN904hZAKJhGa9v9T0l1r/ey 9XZ+LRiHY9sSSYsc6cjUCFp5ct4mECU5Us2bBEgolfUoZ4Hl2t4f2hTay7gCfTygLhQd cOww== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date; bh=ImmpV6nBR3axrQ+CsoksQDBmfqCSG7z7E6j/x4o0FG0=; b=5Dq5iOSjUQj94GxOBhaewKgHTFV3HozClj0++imGOJMoH4D1Ilv0czF1DFiF5Zk+Zr jhTBp0hwahBjqmVPX1GMSruSXsepBK3NBzMsRdC0h1GCpk0jonXUJyussUnSLvH0gOlD 8FCIz1DtNjmWyjKIsBRIfB2qRWidlpL+yj2jDrlkqpOnVOHLRQRokaBlL+qZ/vH8ujvF scu76lakhYaF389o6JtWcY9DTocfAbMOyUJ/k+9jRk8RfJKqv+ao9M6Vc2URmrxKsNhE jyykPTjcdaQ54pd1ZyUXqNzLRk/b5iZWPYclqmD7nUni0n7p/6sSvgeGoOYqAzduYJDj 4log== X-Gm-Message-State: ACrzQf3PkHfNd4q1utgP7seUlqgVWr3Qh+mxETw6Ew+Kfl1Ug6VMQp9D Ra56qHPdimbgmD7ksteiGxE= X-Received: by 2002:a17:907:988c:b0:78c:e54b:9030 with SMTP id ja12-20020a170907988c00b0078ce54b9030mr3878ejc.149.1664981881135; Wed, 05 Oct 2022 07:58:01 -0700 (PDT) Received: from fedora.local.tbs-biometrics.cz (176-74-132-138.netdatacomm.cz. [176.74.132.138]) by smtp.gmail.com with ESMTPSA id m5-20020a50cc05000000b004588ef795easm4023941edi.34.2022.10.05.07.58.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 05 Oct 2022 07:58:00 -0700 (PDT) From: =?UTF-8?q?Martin=20Za=C5=A5ovi=C4=8D?= To: robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, linus.walleij@linaro.org, brgl@bgdev.pl, gregkh@linuxfoundation.org, jeffrey.l.hugo@gmail.com, andersson@kernel.org, Michael.Srba@seznam.cz, saravanak@google.com, mani@kernel.org, hemantk@codeaurora.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, linux-gpio@vger.kernel.org Cc: =?UTF-8?q?Martin=20Za=C5=A5ovi=C4=8D?= Subject: [RFCv2 PATCH 1/4] dt-bindings: bus: add Wiegand bus dt documentation Date: Wed, 5 Oct 2022 16:57:43 +0200 Message-Id: <20221005145746.172138-1-m.zatovic1@gmail.com> X-Mailer: git-send-email 2.37.3 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,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 This patch documents the devicetree entry for enabling Wiegand bus driver. The drivers that will use Wiegand bus driver shall create a sub-node of the documented node. Signed-off-by: Martin Zaťovič --- Hello again, this is the second round of RFC patches in an attempt to add Wiegand driver to linux kernel. Thank you for all the issues you have pointed out in the first round. I have tried to fix all of them and I have also implemented a Wiegand bus driver, that is now used by the GPIO driver itself - as suggested by Linus. Any advice you have for me regarding the patches will be appreciated! With regards, Martin Zaťovič --- .../devicetree/bindings/bus/wiegand.yaml | 50 +++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 Documentation/devicetree/bindings/bus/wiegand.yaml diff --git a/Documentation/devicetree/bindings/bus/wiegand.yaml b/Documentation/devicetree/bindings/bus/wiegand.yaml new file mode 100644 index 000000000000..1ed863ab925c --- /dev/null +++ b/Documentation/devicetree/bindings/bus/wiegand.yaml @@ -0,0 +1,50 @@ +# SPDX-License-Identifier: GPL-2.0 +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/bus/wiegand.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Wiegand Bus + +maintainers: + - Martin Zaťovič + +description: | + Wiegand interface is a wiring standard popularized in the 1980s. To this day + many card readers, fingerprint readers, sensors, etc. use Wiegand interface + particularly for access control applications. It utilizes two wires to + transmit the data - D0 and D1. + + Both data lines are initially pulled up. To send a bit of value 1, the D1 + line is set low. Similarly to send a bit of value 0, the D0 line is set low. + +properties: + $nodename: + pattern: "^wiegand(@[0-9a-f]+)?$" + + compatible: + contains: + const: wiegand + +required: + - compatible + +additionalProperties: false + +examples: + - | + #include + + wiegand { + compatible = "wiegand"; + + wiegand-gpio { + compatible = "wiegand,wiegand-gpio"; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_uart2_wiegand>; + data-hi-gpios = <&gpio 7 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>; + data-lo-gpios = <&gpio 6 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>; + }; + }; + +... -- 2.37.3