Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp662115rwr; Wed, 26 Apr 2023 04:56:10 -0700 (PDT) X-Google-Smtp-Source: AKy350Y8r/0XDZkR+lwnoTrAZf5aBTUJmo7bPjLCwk+o7fxNy7foC3yX0LoFCezzJ1zQNglNFUmd X-Received: by 2002:a05:6a20:8f1b:b0:ef:e440:8aac with SMTP id b27-20020a056a208f1b00b000efe4408aacmr27028904pzk.39.1682510170328; Wed, 26 Apr 2023 04:56:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682510170; cv=none; d=google.com; s=arc-20160816; b=H6iZqGAA5SnMwylI7sUEs7UR9kqPwfmICQq7aFsJdQ6xqeo/6rRf+bSFO1n7jd9FPi 8VZsHrJXZJBg7RqJ+5mW9RARTWcrb8rne099Iq+Vv+j9nNIiE2nC66OYMdmCMEVn1egD vpi/chG5QmTml5lQtR+apzEFBcqsEEBVfYfS+m5Bukt8JG75QhhJ2nLh8eyoIV/GQb+d cmn2gC7vo86+J+8Mkj6VwJlCZezqumGsy0KaqdFHSwF9cSDDIpN3AO4Csc0tpR69z68k vtjeu/ifCLpDLuC6cfiPWToLvtrhBXMoyhAQFtmjOWfjEkAvE8aIec5BpU5c4zUk3VXo p5PA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:message-id:user-agent :references:in-reply-to:subject:cc:to:from:date:mime-version :dkim-signature; bh=RGgieoJu2M0mWFk816sGTOLEYpz179EmxMrNMNHPmVs=; b=g6oBrcJi2mVFdZx/YqkLKBL19JJJbArUNX9FXxVa8ODTN4ORUeZeC+pjR2BOknZ1wm HtdNuFqx9k6r/SeGCebbMFkOwkKmBJraeezV0AhjPH4Urrzv1qlM/XxyJytDCviaVi3K cTf01H57McVv16tX/f5scAmkpgmt6rjePKYY4htFW3jFUIpbKCslpnZDfNFut5gWnQUa j6rqIRnQKKhrvHU3gpZ4ZYDWPvhWQs8tov937hjQ3zuPkpSwG83SRpUWtgTYPsk3ulvO gunu/lQdPrk6e5hg7RmuNYQUMMjvgN3eqlGB5yPMRcrZIDuLJJIVxiDzAQJX1HUDG7bk Ng2Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@walle.cc header.s=mail2022082101 header.b=FJ73v2j0; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=walle.cc Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id l12-20020a65448c000000b005075581074bsi15884044pgq.446.2023.04.26.04.55.56; Wed, 26 Apr 2023 04:56:10 -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=@walle.cc header.s=mail2022082101 header.b=FJ73v2j0; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=walle.cc Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240638AbjDZLyi (ORCPT + 99 others); Wed, 26 Apr 2023 07:54:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48612 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240581AbjDZLyg (ORCPT ); Wed, 26 Apr 2023 07:54:36 -0400 Received: from mail.3ffe.de (0001.3ffe.de [IPv6:2a01:4f8:c0c:9d57::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id ADEE05B9A; Wed, 26 Apr 2023 04:53:48 -0700 (PDT) Received: from 3ffe.de (0001.3ffe.de [IPv6:2a01:4f8:c0c:9d57::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mail.3ffe.de (Postfix) with ESMTPSA id 7EC50D27; Wed, 26 Apr 2023 13:53:03 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=walle.cc; s=mail2022082101; t=1682509983; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=RGgieoJu2M0mWFk816sGTOLEYpz179EmxMrNMNHPmVs=; b=FJ73v2j09tV5wSSysU854ogO76xRRAlxU4aMTuFnoTdmNaR3BzbHZqcncONGr7tz9DsLbL ztZm4oTI+ZOfH0Qk6k9FZf/9sMS4GLBVCwh7vekTd5q1gn4zhjRQFhqxb7gZwQvceqL4Ox eugvqzb/Z6vVbrCJVhXCk75vSJf31YIUlrttLhrj7Cn0OL0lDMMq0IZdNVMBo4PYw1aukN mf2huzqw9jP90/Xabywro7N7VYyyxhqX9KDDBpMgRdC6+CiSdLLcWXEnS9vwYOiYwccmAy bc0MYlfVptdwJZgwbG0FXvTujcqQJWv/z7w3Qi3JRlrZOpLAPrqCwQ4Pwev3bg== MIME-Version: 1.0 Date: Wed, 26 Apr 2023 13:53:03 +0200 From: Michael Walle To: "Sahin, Okan" Cc: andy.shevchenko@gmail.com, Linus Walleij , Bartosz Golaszewski , Rob Herring , Krzysztof Kozlowski , linux-gpio@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v1 2/2] gpio: ds4520: Add ADI DS4520 Regulator Support In-Reply-To: References: <20230327130010.8342-1-okan.sahin@analog.com> <20230327130010.8342-3-okan.sahin@analog.com> <25e1fda4b6df2d10444d7eca3cd0e387@walle.cc> <1ff70a97dfbcaddd69029001ce99bb69@walle.cc> User-Agent: Roundcube Webmail/1.4.13 Message-ID: X-Sender: michael@walle.cc Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED 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, > I think I understand what you are trying to say so far. I did not have > too much > experience related to gpio. I will set pull_up register in .set_config > However, I did not understand where its parameters come from. > set_config(struct gpio_chip *chip, unsigned int offset, > unsigned long config) > It might be trivial question, but Where does config come from? Others have to answer that one as I don't have that much experience either. > At the end, I should rewrite the code using regmap_gpio, right? So if I > rewrite > code using regmap_gpio, how can I replace set_config(...)? You'd have to add a .set_config to gpio_regmap_config and then in gpio_regmap_register(): gpio->set_config = config->set_config; I don't think it makes sense to have a default implementation in gpio-regmap, the variances between "simple" gpio controllers might be too broad. -michael