Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp881964rwl; Fri, 7 Apr 2023 06:56:55 -0700 (PDT) X-Google-Smtp-Source: AKy350Z3t62cBL/IdecmIz1ECr0SObQ2tfNcdtwzKpwp10fOU8F9oYNnOR06NI81kUtuMZrqYYat X-Received: by 2002:a05:6402:120f:b0:4fd:c5e:79b8 with SMTP id c15-20020a056402120f00b004fd0c5e79b8mr1865626edw.32.1680875815024; Fri, 07 Apr 2023 06:56:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680875815; cv=none; d=google.com; s=arc-20160816; b=kRo6IYodW4zrbzsH6REZWpdm/pSYi5EhztDauNAiioTbLnip5fwZD/MJ3TAQWBQODl iJn6idcI72un7mA2uOWMXJx7zewZDejeppptHtNOvq1puUCCUxcX6y9rjnIpdV/t6f7b xONJ+XHrpCrk2VKlaTwwX/1d5qP6N+ruCPS03zsFSqCxNyJf/wFAUHsHjey2fc97D73a jm86bVQYAx5hekjtvjDcVV989vvZI/WmcT2j9QYK/9ZeEHnOpGx4+rL5js3mFPJyOdSf AccTgn83Jubx5Q/qnDD9xYeR3tbzT4CEkZbf5EEeIwnIb02C6KXHK6EkRHiix7IsT4jA c7Fw== 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=aKK09fngq38ILpy1qwOd5H4TNRR3elskTobTEmmbiwE=; b=tniDVd9QErdBJqEcgnkqBGEvJeFrfxu+DpvryiuEksFlNTR6EAhc0kxUoWK3qxv134 biHh5B7JaafFW3jfGvBNZNPxw010gn+aMsMgJqNlEQWIfy4Z9BTxRYuGUTU1wTEALV/H fPhMbLqwcUej2UfwYCa2vZ+HgRVa/3WcIzE+Im2yESQ8xIkyJYEGalAqXY4d9pK6azLN Rny5d4wAdsWtuUcrWv3zwb5p7A33YFMugGpFdNyxibX5AVeKM0FSLxGvmAUMVubC0ok9 gK9UlXRoFQnV8jfaFsZ1AM9fH0Tcgpyj8Bbl02Hs4uUOfRuZhWqd7bMLjP0/byShb0iA uLHg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=gecNJ+X1; 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 a7-20020aa7cf07000000b004fac80816a7si1010793edy.183.2023.04.07.06.56.29; Fri, 07 Apr 2023 06:56:55 -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=gecNJ+X1; 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 S240205AbjDGNvk (ORCPT + 99 others); Fri, 7 Apr 2023 09:51:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40800 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232268AbjDGNvQ (ORCPT ); Fri, 7 Apr 2023 09:51:16 -0400 Received: from mail-yb1-xb2c.google.com (mail-yb1-xb2c.google.com [IPv6:2607:f8b0:4864:20::b2c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 51DA4CA03 for ; Fri, 7 Apr 2023 06:48:37 -0700 (PDT) Received: by mail-yb1-xb2c.google.com with SMTP id q5so1628131ybk.7 for ; Fri, 07 Apr 2023 06:48:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1680875316; 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=aKK09fngq38ILpy1qwOd5H4TNRR3elskTobTEmmbiwE=; b=gecNJ+X1UXFrJOR9jcDYcM6qMfLOurNZETsFwO7h71tAaUNxew8gclFKyL6cXUzze3 Aptfhq7i7Hhh0c69UWzoA0lLdtiaXsP+LwYlb7dIGKCsvL2npvyvml+tRD3CpexDD3Am nlK34EUsiaWTGsygZivf6TaFZirXlH7i6YVwfyk64Pwboul69xIWB4A9H447UcHr30vH aq3ec57aimCI3IE40YFoqQXAXVxdsD0CKPQk+/NtO6iFdOV0wUQVqD3NKXIg5L2bKBB4 mOa3oSGOUdMRjxVa+WAgNIGnir4KRvZaNTGeSGf5uTx2Gayb+XkwtNlDZN3apq2PH3o7 aKOQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680875316; 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=aKK09fngq38ILpy1qwOd5H4TNRR3elskTobTEmmbiwE=; b=WsbWunxRnfROQ509Usqcqk0GJT6l7MUpohAQixO8tbQGYEazdRaMTXQBfKiQKKPn2g 3YcoAWFcfn/Vtspm9u5SK5s0YdKYFo4YJKTHwmB39ggpPVVdfiGeYlHo5FFRUoWMP21Q c+rg/hoYqFAsDuvMokGHIzTc4CBTfMou96TVCQ0hd+UBW6f6K5ludtlR13qqaOwsiUMe 1dutQZVbv3wUguPsECV1DLiFtVUKZKtPcngrn9L6Mv8SCegj0SEENMFXyCj+kQeafq0B spQ7ekWzzHPQHIife+RF8lw4hwWaYPSyi4RvKFzISMtWBowpSUGfBItAP30Yzdxe3e31 prqw== X-Gm-Message-State: AAQBX9e2FGd5fkirfuWDLk+72sehm1wuWyBu1+ohr8TmNeM79xPDBBvE XzmedYMZioB/WJTp6oeJCwLW3Hbs0EprD3jEhd5ARw== X-Received: by 2002:a25:740f:0:b0:b09:6f3d:ea1f with SMTP id p15-20020a25740f000000b00b096f3dea1fmr1907548ybc.4.1680875316286; Fri, 07 Apr 2023 06:48:36 -0700 (PDT) MIME-Version: 1.0 References: <20230327130010.8342-1-okan.sahin@analog.com> <20230327130010.8342-3-okan.sahin@analog.com> <25e1fda4b6df2d10444d7eca3cd0e387@walle.cc> In-Reply-To: <25e1fda4b6df2d10444d7eca3cd0e387@walle.cc> From: Linus Walleij Date: Fri, 7 Apr 2023 15:48:25 +0200 Message-ID: Subject: Re: [PATCH v1 2/2] gpio: ds4520: Add ADI DS4520 Regulator Support To: Michael Walle Cc: "Sahin, Okan" , Bartosz Golaszewski , Rob Herring , Krzysztof Kozlowski , linux-gpio@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-0.2 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS autolearn=unavailable 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 On Wed, Apr 5, 2023 at 3:57=E2=80=AFPM Michael Walle wro= te: > OTOH I'm not sure the driver is doing it correctly, because it also > seems to switch the pullup resisters together with the direction. > I'm not sure that is correct. So there might be just one register > involved after all and the GPIO_REGMAP should work again. I'm pretty sure that should be in the .set_config() callback. > Also, according to the datasheet this has some nv memory (to set the > initial state of the GPIOs [?]). So it should really be a multi-function > device. I'm not sure if this has to be considered right from the > beginning or if the device support can start with GPIO only and later > be transitioned to a full featured MFD (probably with nvmem support). That's a bit of a soft definition. If the chip is *only* doing GPIO and nvram it can be a GPIO-only device I think. The precedent is a ton of ethernet drivers with nvram for storing e.g. the MAC address. We don't make all of those into MFDs, as the nvram is closely tied to the one and only function of the block. Yours, Linus Walleij