Received: by 2002:a05:6358:5282:b0:b5:90e7:25cb with SMTP id g2csp2054004rwa; Mon, 22 Aug 2022 00:54:48 -0700 (PDT) X-Google-Smtp-Source: AA6agR53tZB5ZHcsIBu+Pz3VknXaCWz83XohyMQP5ArGgYlI2x9dxcQ8Y3i7pro2XspUKsDwzLnW X-Received: by 2002:a17:902:7297:b0:16f:975e:7c72 with SMTP id d23-20020a170902729700b0016f975e7c72mr18800594pll.45.1661154887799; Mon, 22 Aug 2022 00:54:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661154887; cv=none; d=google.com; s=arc-20160816; b=PezcXe9SnxtetzaMBLl/fdYLczCfLHPk1Xcb98k22/f2XKG3f9Cnwg5voUO0bKb+S4 oyoN4hDTDcvBZEs6GT4uBOX2tc+ZtNldjMt3xU0LUnQAL5OWDoqvIYotKgpLz6XUBgx5 uPo5Ci6FTZcXVKPMtOAK1P0bEPuWdhsSQWmtDyfdwIxDY1sgBk/DGpPEIS3DDKtzeiHy tGeiUpoFMTgGt3CcinF7SAHlhEWUZ4OlQ6SnOc06PFy0l0dexfc1gDqbEjfFVGj7F/A9 KQJs/HYIjAvBHW7gUNipENlVgceiG6yx6natgqht4zVcXYMydF5890iHzdNWvJPsMWKY 0jyg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=L4C9jxDEHQJxeNb6tSjoDWUpW5OXjQBjDyyOgdCfm1c=; b=Dm93jUAyI5R8HjH6RClefKKYVULmy0XLhfb3WLzg/kB/4Xvv+RdvY4rDLI9h7oSjoD TF4GLov3Q88xJcaZ4Mw4Xe9mT2d4zpP3Dpuj+sMy5W+9BjtOPc19t7v1tx0Oz4z48t4b uHjH8K/nuYce2P2zbtQakbh0LIOKeJfgIovMPlDoFuh+Z0zeNNQk75H1w063Zo/mg9pL LrgsaUNzpRid75XV17hiBTBWxjVek2EB8j9TonH16kL/LIZJ/lMrYiIwrvYHOOecIY9L GwSVq+0/tYUbPqau6AY2pL6O4hK26goqaJwm265fInNPyY6t6vteITwbFROpDYwWp4Ci Qokw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=HDpf9UEU; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id f5-20020aa782c5000000b005257035371bsi12057880pfn.108.2022.08.22.00.54.36; Mon, 22 Aug 2022 00:54:47 -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=HDpf9UEU; 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 S233036AbiHVHOx (ORCPT + 99 others); Mon, 22 Aug 2022 03:14:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37264 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230289AbiHVHOv (ORCPT ); Mon, 22 Aug 2022 03:14:51 -0400 Received: from mail-ed1-x532.google.com (mail-ed1-x532.google.com [IPv6:2a00:1450:4864:20::532]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DBB441F2E0 for ; Mon, 22 Aug 2022 00:14:50 -0700 (PDT) Received: by mail-ed1-x532.google.com with SMTP id w10so507724edc.3 for ; Mon, 22 Aug 2022 00:14:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc; bh=L4C9jxDEHQJxeNb6tSjoDWUpW5OXjQBjDyyOgdCfm1c=; b=HDpf9UEUkLM+5q7kzurPq7l8YVBs2Gwncdlt1GECYz1eWZorNMAeFaFnahENaZwyFY 18QtbkG2hpVzGZqil0J/u4IDUrBttXvTS+/GqOPCUsats9mqRRteaUrJWoPIjIjIv7aX Q8JnYhEUPii5uclxswYUCtlv2KGWXtnfPH5Rm5qPiKSeJQBiZ1no0bMudmDO6W8RMAuz E4hrIacq5HCEIw+9o/HrdNxJM5HkM8jr8BVXUrn7FmMLYDOGQoeZGwQUxfEvXIU6LrAi x3DDMuFpfH56yBR8kkRMv5PS2rdu2xqG1le13VIig9oVjs9dKho40gBpQfMA1MMVpvmE x3/w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc; bh=L4C9jxDEHQJxeNb6tSjoDWUpW5OXjQBjDyyOgdCfm1c=; b=dl4Lk0A7ZYkOY0QNwe4XRE7zlvbfy0xiWxbHFdAaSxrOTxXLrpSY7W7S4ENaulSDmu uEpam7nwvtHn/p4dN4tkgXSCZPaEdfmHri8DxoN8rY3GtnqyoiucVq6S3OTQY5KnBz2X 2wMuiRh0HAwTWleb7VO5iK8FHieY12FlkWgcqc0wAz6TQGFuUH8f5emVv9gX8Ula8yj2 T8mKjnUcHEjpCXXDx12INk3BUmSJNyg37dU4x3xDPtDxQReqwkdksmptu+f0UauuJWQm eq7lXitwwOiZLTIvKm1gDj3v5jM7QJ+dd20sw7k+uD+zjXX5bVDHeSuV6OVK83wUtfMi 3U/Q== X-Gm-Message-State: ACgBeo3PVRMGuB8f5HexLvviFbG/5UFDACIY58aUMuvXIru1OFFIC2ui ZmSEPTX0dfMsoNZ7xcG32EDy6BefTCCpCS/JhlHRCw== X-Received: by 2002:a05:6402:4312:b0:43d:b9c0:65ee with SMTP id m18-20020a056402431200b0043db9c065eemr15253416edc.205.1661152489457; Mon, 22 Aug 2022 00:14:49 -0700 (PDT) MIME-Version: 1.0 References: <20220728091712.13395-1-m.zatovic1@gmail.com> In-Reply-To: <20220728091712.13395-1-m.zatovic1@gmail.com> From: Linus Walleij Date: Mon, 22 Aug 2022 09:14:38 +0200 Message-ID: Subject: Re: [PATCH RFC v1 1/2] bus: add Wiegand write-only GPIO driver To: =?UTF-8?B?TWFydGluIFphxaVvdmnEjQ==?= Cc: linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, mani@kernel.org, hemantk@codeaurora.org, elder@linaro.org, f.fainelli@gmail.com, Michael.Srba@seznam.cz, jeffrey.l.hugo@gmail.com, gregkh@linuxfoundation.org, bjorn.andersson@linaro.org, saravanak@google.com, krzysztof.kozlowski+dt@linaro.org, robh+dt@kernel.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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 Hi Martin! Thanks for your patch! On Thu, Jul 28, 2022 at 11:17 AM Martin Za=C5=A5ovi=C4=8D wrote: > Wiegand is a communication protocol that is still widely used > especially for access control applications. It utilizes two wires to > transmit data - D0 and D1, the generic names of which are data-lo and > data-hi. So the driver provides Wiegand GPIO, if you want to provide generic Wiegand infrastructure (for other things than GPIO as well) then that should indeed be in drivers/bus. However then you should provide an API for random WIegand drivers, such as the now baked-in GPIO driver, so I think what you want to achieve is: 1. A wiegand bus transport driver in drives/bus 2. A wiegand abstract API in include/linux/wiegand.h 3. A GPIO driver on top of the wiegand bus in drivers/gpio/wiegand-gpio.c that uses How does this sound? I don't know how a wiegand device driver API would look but there are several examples in other subsystems and buses then the wiegand specifics need to be accounted for. Yours, Linus Walleij