Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp685111rwl; Wed, 5 Apr 2023 06:29:27 -0700 (PDT) X-Google-Smtp-Source: AKy350ZF2yCK2IFgxRpB1/KWVu6uYuo9V2Ge4v8fzJuzuFWdw2QmtdosN+UclgGezhQbzNlhm22y X-Received: by 2002:a17:906:198e:b0:92f:de0d:104b with SMTP id g14-20020a170906198e00b0092fde0d104bmr2976107ejd.9.1680701366979; Wed, 05 Apr 2023 06:29:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680701366; cv=none; d=google.com; s=arc-20160816; b=hKGlxdv0yi5eT5U41nad+RYxuI+V+ki4G/Z7kCzQCmXKDwoYOtTKIS1KBkFLgsShOK 4uD3HmXhdhOWwR6wtYZbNu6rwI/f3unGDSPCLmRixkO8sGV+Uyw3kSu2AsSFDrpzWMtk SW7OfasS5ZWS75NJqlrAcY7nJtvEM7+HyEpgwoqgyhCIVLYs091PbcxrM288FZZfMMAr xlLf7FQh00M4T26t6DLn+eMFj2KBviGCdHFUGvV8x2xhrxRhExJVeY/5LeK0AlPi0fq6 1IQjVne0kHPlndBX5OKf+bY4lyFmPjk81eGBtQuZ8v62qVtO/vJPGbzITXXSVJM25gsz H1gw== 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=5m4rtZfAeR6vet4pBc2kbt1ke7sk+dSI8jcqxxSGabg=; b=cBl+aupb/W9pzpQucDpyH//g7N6asvjFROIj5IEep5Q1TZicoAaRX4BhZTHNRDSf6G 3i34OfA2ckQZjEVx9z0PWg1zumYstUo1uennV5OIR+CjXPg4S98Gyl9bTjibakvWaWFK 0GiyLRoMg0Y35ugoIH1wTHeNpfdktYEt0AoUAZsmkgCGMMO5/g57qm2w76LFTQBBIjcB FLdIrdOXnOTDxDmkUAGui4FkN1KHutI/K7vCRi+mFgnXt1IYvihHyFG/a7zjSaIUFfbE 5mJ7d1cQIBh5OBKZS2dftKdIQGRPDLO1ZmfVUBwHaK5nEm+u+gzy9so1qx9uPYFLvUQf KWYQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=N3lS4Ak6; 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 j5-20020aa7ca45000000b004fd206c9fe7si11209104edt.145.2023.04.05.06.29.02; Wed, 05 Apr 2023 06:29:26 -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=N3lS4Ak6; 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 S238148AbjDENU7 (ORCPT + 99 others); Wed, 5 Apr 2023 09:20:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35028 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237375AbjDENU4 (ORCPT ); Wed, 5 Apr 2023 09:20:56 -0400 Received: from mail-yb1-xb29.google.com (mail-yb1-xb29.google.com [IPv6:2607:f8b0:4864:20::b29]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 91E5926A4 for ; Wed, 5 Apr 2023 06:20:55 -0700 (PDT) Received: by mail-yb1-xb29.google.com with SMTP id cf7so42501049ybb.5 for ; Wed, 05 Apr 2023 06:20:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1680700855; 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=5m4rtZfAeR6vet4pBc2kbt1ke7sk+dSI8jcqxxSGabg=; b=N3lS4Ak6Hm5UiFMyXreG42rMd1R06vtbPLvlXgKK15No6lROSjJ6chA+gMoALkxBVW 5Ro0fhfTddipMFnBoNBrljl27cWdgVBHU7m5ZrJ1BKXaH5H2wXxhZmojKzJyEbLKgwps V438OspT5Qn5OrJK5/cL8db7csqB4u9toLFIHnNyLT+eUOh5Hh2dNZNpTEvMgjwbPJzX yqoTVj1u6tILTYMfZUoD0EP3VeZp8ZXWRXz35vsVQjbnwktkdsBM3uV6mSW1JmM44/JN 7J0BQgZXhgiw6iYCVlwus3YYmX/18r5WoQ2M8aZ/NlLhPaokRZkd1iSaJIuZ8x70WAdU fk7w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680700855; 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=5m4rtZfAeR6vet4pBc2kbt1ke7sk+dSI8jcqxxSGabg=; b=DjlVVy8QpVMJ7/GjrtNo8iKxECcUaR7humZazsjlutEk36h6wbHO4Pb5HOmlywjQNz MZO47KOzIPtFXEj6dIcIi4gfNJ79dEF8fhOJ7awjCgMsqqxnkYT7dHbvCyPw3IpAYDZq DCWeHmUmJ0oidyjMGlhJseyuo+5/GhjgXVcnAQ01oLqTd8KDimK+61cML/yKaVy4AHwb bvLSq1rH0GNmdrPlbU7+sauaIacpJOsuNy0Re3YomZLDEQTogSD2oOMNB0jYMiEcHKJe MXTkcJlYAeJdl/bX+yTpO9BcPmbKWQhxK0y+HYjASWzk/HkCcqRPk7/Xj4EUZDoqkGar 67Ew== X-Gm-Message-State: AAQBX9cTRUlM65+z8gzOXECV6v/p3QAIwA6YrCq5/6Kql6V3sT5KQTBI hUoHcKeqFiUGLkGGLsGr4OGpPVy9rTsP7wbgnOHxYA== X-Received: by 2002:a25:7316:0:b0:b74:3236:2fac with SMTP id o22-20020a257316000000b00b7432362facmr4120216ybc.4.1680700854809; Wed, 05 Apr 2023 06:20:54 -0700 (PDT) MIME-Version: 1.0 References: <20230327130010.8342-1-okan.sahin@analog.com> <20230327130010.8342-3-okan.sahin@analog.com> In-Reply-To: From: Linus Walleij Date: Wed, 5 Apr 2023 15:20:43 +0200 Message-ID: Subject: Re: [PATCH v1 2/2] gpio: ds4520: Add ADI DS4520 Regulator Support To: "Sahin, Okan" Cc: Bartosz Golaszewski , Rob Herring , Krzysztof Kozlowski , "linux-gpio@vger.kernel.org" , "devicetree@vger.kernel.org" , "linux-kernel@vger.kernel.org" , Michael Walle 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 Tue, Apr 4, 2023 at 4:36=E2=80=AFPM Sahin, Okan = wrote: > >The driver is pretty straight-forward, but I think this can use the gene= ric > >GPIO_REGMAP helpers in drivers/gpio/gpio-regmap.c check other drivers se= lecting > >this helper library for inspiration. (..) > Thank you for your contribution. Should I add select GPIO_REGMAP into Kco= nfig? Yes but that is not all, you also need to make use of the library helpers provided in include/linux/gpio/regmap.h. Find examples of other drivers doing this by e.g.: git grep gpio_regmap_register drivers/gpio/gpio-sl28cpld.c: return PTR_ERR_OR_ZERO(devm_gpio_regmap_register(&pdev->dev, &config)); drivers/gpio/gpio-tn48m.c: return PTR_ERR_OR_ZERO(devm_gpio_regmap_register(&pdev->dev, &config)); drivers/pinctrl/bcm/pinctrl-bcm63xx.c: return PTR_ERR_OR_ZERO(devm_gpio_regmap_register(dev, &grc)); ^Look what these are doing Yours, Linus Walleij