Received: by 2002:a05:7412:5112:b0:fa:6e18:a558 with SMTP id fm18csp747706rdb; Tue, 23 Jan 2024 13:52:01 -0800 (PST) X-Google-Smtp-Source: AGHT+IEQnKSr5uTa6VuTgJ7Hx/EOGbX7FOjsOZi85Z/fXBvAphgdxbF7wpFsHn11CqlbGysKTJgH X-Received: by 2002:a17:906:d299:b0:a2f:7a77:5ace with SMTP id ay25-20020a170906d29900b00a2f7a775acemr282492ejb.3.1706046721347; Tue, 23 Jan 2024 13:52:01 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706046721; cv=pass; d=google.com; s=arc-20160816; b=Ald1O7mortHrXDpTng/jn4GkcK7wDRJYhpR8d7XjJOjLI9iTYCBW4ZG70lig02NFbr 82NLaBxQh7hYeBF3u2y8t3W+5GO903rfb1L+t5UnU5h49KMGko855TU9Drx2TGHlU+n2 lUFuqS4UPwNWPik/EvuwHPjHLTAZMnnQERTol9WwvxzCSfaCy8kQw3g6UByQpco+V9ZO ldrbinP89hGCgVIT6M1+I7F4BjUc66yUIF0hkDYcrSiyC4N9OYG/KOD9+q9GFsBcPYBB df4vrPRBdBnQ55+3QbWy+G8vUl9s4XPzLBlU9YrLo2w0C99n+01f9+KJSN7I49xCaUpU rbAg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:list-unsubscribe:list-subscribe :list-id:precedence:dkim-signature; bh=YrH0Mk72e0Geo0pjj83tbehqhSDH4BMYk+a62Q7MQhA=; fh=oQdHGRODQno8JswIAnNbzyxWHA38VWJ1xXFmRca51mk=; b=gEKNuPKsF7l0FTZrjUIt1jAHusqiJNusqocgWv3w3fHiro48b9HJlwSwqW9voSVHSt ZMArvial295MzVmKrF8qp8287W2wbTsPARhLspBsXRI1eXtBAPMRwp74jeuJ+nEVF2Dl g4CTtB6IXzJGxwmLNJlR4uVVIGAYttZabYEXdziHCouQqy1ywF1ZkLw9+doZzmXes/Sr yJwaRakThs+gaYa9mH6emcjKVqtCUTmn9jNkm5TIMO2jKdL7+qMihgK1FTnZv82JIH1w QUunoFAaRylZaHHlsA+l07sScn2boSqPC8T8VpcvzLQkq+RyCUc9c8dnvJAyg3Y5o9tK wneQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=gGZ4b20x; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-36090-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-36090-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id s1-20020a1709060c0100b00a309e88fda6si1535898ejf.252.2024.01.23.13.52.01 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 23 Jan 2024 13:52:01 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-36090-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=gGZ4b20x; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-36090-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-36090-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 67DD41F22F1E for ; Tue, 23 Jan 2024 21:51:15 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 5BB4E47F5D; Tue, 23 Jan 2024 21:51:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="gGZ4b20x" Received: from mail-yw1-f181.google.com (mail-yw1-f181.google.com [209.85.128.181]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 175B54E1C6 for ; Tue, 23 Jan 2024 21:51:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.181 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706046665; cv=none; b=Wn596d6c37i1+JbrSBgKtXbIMV4aZk6VrwHyMj4umabnjejykH/xIjoGdOeQjTknwREgE2el/Mvwwy1GZaSOIX8L2lVyJNGmDcH5x25Wg2f2qesoXMl66Xpk3kwSRB+Hj7/2GWWxTdsTexMv4+qewVbkghQ79ZPPc/CORcF9e0w= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706046665; c=relaxed/simple; bh=YrH0Mk72e0Geo0pjj83tbehqhSDH4BMYk+a62Q7MQhA=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=eAmq6A0AP7l6381mZhlt3M7VqrjaW5gkzIlTZyG2NoMOrcfC5TPgITEPDnMW0YlESDO368/WsieD4ZVq58hw8PoZKKYRzsV9FzxMq4LNL/KhXhsNvDBWzFG4bvBjziafvjvXQsPx0Gq/Oq2h1AaGwP0DI7EITyYhqjq/puWYVGI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=gGZ4b20x; arc=none smtp.client-ip=209.85.128.181 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Received: by mail-yw1-f181.google.com with SMTP id 00721157ae682-5f15a1052b3so46449747b3.1 for ; Tue, 23 Jan 2024 13:51:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1706046663; x=1706651463; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=YrH0Mk72e0Geo0pjj83tbehqhSDH4BMYk+a62Q7MQhA=; b=gGZ4b20x2KsL6YqGrYbzNuqtbRXedQJ/EIfYLe8umOPGLlqm+ItAygcSwPCXxyGaHT iKSranz1YnxydmwXF5Wq6zF9cNEpjQcVZT5l8b4ym9Mx40Xo2ekqz3c8c4U5cOtw8AUt rbP6VEJLePDNQCqwVSjZFJDUMFQ/o36XMv5oWBqPs5Y/c8RKuS/lfqxV0rYHi8n+kRJK SZ3HWSqT5GZD6CLEsy3neC6zOFahYlE/0xi7nu/8GJCpHh/Tv1ejucKYu5nkBLvYA8tZ SkrEXnWwWm7dKNcCEBNsFzPcMiGf/BJsoAqPGeQOUUi4lVprfA+9uZdQ4d7JFYsdZAPh yAnw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706046663; x=1706651463; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=YrH0Mk72e0Geo0pjj83tbehqhSDH4BMYk+a62Q7MQhA=; b=Kx7ItzGCy6J5Rh4G+V8v+SR9dS5C3k03GglASbkexMHNbwZP0nYpgqb7cJwiiVfkm/ PIi4eE2HV2L2JUCnDq1g3VH4aVzZ4ubypIUz2BOmuoNCGDmDcUzw8FjU6FGt5m2Feh3b U1X2YWWZi0GA132swjqVLme/vLPmRSvoKKbZwp9owvfmQRD7Hr8aG9FIT6KbSzVtP9Lj P9ogpsmBo7RrNElfvHztQSe0hy2abctIE3Ekl9ysV7yoJ2VxQHVf2ndrG4xGB25lbjqq 17oiFPgvHnLUyZvXCKnmB6sQY/F0xcIwo/pxVGJMKCZjTJ1lfyI6w+BiSO6MSCPFXRk2 ETgA== X-Gm-Message-State: AOJu0YxBnIGCVEDHyPD1fkcZU1vXAFoBSSx9EI+0tG0Hs+ldw+11Z3Iy d8hUeEZPi1SLzbo/UFxuRjByfKuaOdi1H0TwJCR15C6VAEqUMVGhwkJKO/qUf4uK95A2gKYZ22C kV04MIW6q599FAmDIx3w/yDn8DJls6grD0GE0iQ== X-Received: by 2002:a81:a24d:0:b0:5ff:483d:d156 with SMTP id z13-20020a81a24d000000b005ff483dd156mr5784703ywg.23.1706046663155; Tue, 23 Jan 2024 13:51:03 -0800 (PST) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20240121103505.26475-1-kimseer.paller@analog.com> <20240121103505.26475-3-kimseer.paller@analog.com> In-Reply-To: From: Linus Walleij Date: Tue, 23 Jan 2024 22:50:52 +0100 Message-ID: Subject: Re: [PATCH 2/2] gpio: gpio-adg1414: New driver To: "Paller, Kim Seer" Cc: Bartosz Golaszewski , "linux-gpio@vger.kernel.org" , "devicetree@vger.kernel.org" , "linux-kernel@vger.kernel.org" , Rob Herring , Krzysztof Kozlowski , Conor Dooley Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi Kim, On Tue, Jan 23, 2024 at 11:31=E2=80=AFAM Paller, Kim Seer wrote: > > Locking here is simple enough that you could use the SPI regmap and > > get it to do the serialization for you. And then you could possibly > > reuse the gpio-regmap abstraction and get an even smaller footprint. > > I could not seem to figure out how to use the SPI regmap in this case. > Since the number of daisy-chained devices depends on the length of > data transferred with continuous transaction, I could not determine > how to implement that using the SPI regmap. Or maybe I misunderstood > the statement. However, is it still acceptable to use the current approac= h? You just override or wrap with your own read/write callbacks if necessary by defining a custom static struct regmap_bus. For example in drivers/gpu/drm/panel/panel-ilitek-ili9322.c I do this. It may not save a lot of code in this case but it's still worth it because we understand what regmap_read/write/update_bits do and reading and understanding adg1414_set/get cognitively require more from us as maintainers. Yours, Linus Walleij