Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp7954219ybc; Fri, 29 Nov 2019 03:39:05 -0800 (PST) X-Google-Smtp-Source: APXvYqwhLwxC96AjEBvLBfJH2d1V3fcQioXMaxGP8S9SteyaC28xbDayjSBKSlSBgAphwTW6c3V7 X-Received: by 2002:a5d:5284:: with SMTP id c4mr15996207wrv.376.1575027545158; Fri, 29 Nov 2019 03:39:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1575027545; cv=none; d=google.com; s=arc-20160816; b=jV4PqucLehiRyfJJADR9akgfzIlwYZovnZpPAKMfODy/k0PWT23uwuU2pFQl1mMTlz opWuP/UY7qEQKAFSitfVZyKFsBuTnT0WqNbhpNdyHPQTdKIKFurkZ1vj89M6IcIgzBj2 ZQ3Age85nAiLAtFG91A8WyL9+31v9qLbdOE1KidXY4BCoNpsQqRVLno5FnHNWcSWjX99 TXg/MSZ/q46WKYDdMzSUz/jrk5psJNn2j36WrHky8/IPBrk9wLH0E//FOyXZKa2VAHIc hf/rqWP8pmYH3Fpr71FTWsxzIJ9g0kHJD7P6FBWjEDv+TkwiO7vGgM5pYCbKftjCyHco M9nA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=w9So8mXczCiVlCoCD839RrZpZGa+QTxKVRGRWJA8fKE=; b=b1JGnbea23R8IsAZU6OIUCOy9Jx061BF4LDDfTKYqYDi+fz+QvCb7rXxsCSSq3YxVA 8921rwQcfn6CcEmFMcBQ8YGt6izRLGTye60wDQ7h/M0N7Km1DxpJ6iosRsriN0f0M5qo nuLFqeReAsaek0enbl2/HMGcFkx5RT6F2Pzl/NL2xjv+unDBjHBWAXtC0WaICfkbovnO cBZPHLDyHje3wFjJ6Xp3o8AoNCqPIWOweS2qME7b9BofbLtR1TbY5CfmEHcj7EjaBbxF SadpdUiORXBpV+rQQ9z7NG0mEj2gAQeeqGOlTF7XS4r/uZZWgB48T4DobLizyNjomO/v sv6w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id gz9si14084287ejb.238.2019.11.29.03.38.40; Fri, 29 Nov 2019 03:39:05 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726770AbfK2LgI (ORCPT + 99 others); Fri, 29 Nov 2019 06:36:08 -0500 Received: from metis.ext.pengutronix.de ([85.220.165.71]:48341 "EHLO metis.ext.pengutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726360AbfK2LgH (ORCPT ); Fri, 29 Nov 2019 06:36:07 -0500 Received: from pty.hi.pengutronix.de ([2001:67c:670:100:1d::c5]) by metis.ext.pengutronix.de with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1iaeZ7-0002le-Gy; Fri, 29 Nov 2019 12:36:01 +0100 Received: from mfe by pty.hi.pengutronix.de with local (Exim 4.89) (envelope-from ) id 1iaeZ6-00020W-Fx; Fri, 29 Nov 2019 12:36:00 +0100 Date: Fri, 29 Nov 2019 12:36:00 +0100 From: Marco Felsch To: Linus Walleij Cc: Bartosz Golaszewski , Support Opensource , Lee Jones , Rob Herring , Liam Girdwood , Mark Brown , stwiss.opensource@diasemi.com, Adam Thomson , "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , "linux-kernel@vger.kernel.org" , Sascha Hauer Subject: Re: [PATCH v2 1/5] gpio: add support to get local gpio number Message-ID: <20191129113600.phbhqudrgtm2egpf@pengutronix.de> References: <20191127135932.7223-1-m.felsch@pengutronix.de> <20191127135932.7223-2-m.felsch@pengutronix.de> <20191129101542.drtcn44twcyzxqmm@pengutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Sent-From: Pengutronix Hildesheim X-URL: http://www.pengutronix.de/ X-IRC: #ptxdist @freenode X-Accept-Language: de,en X-Accept-Content-Type: text/plain X-Uptime: 12:32:22 up 14 days, 2:50, 29 users, load average: 0.01, 0.02, 0.00 User-Agent: NeoMutt/20170113 (1.7.2) X-SA-Exim-Connect-IP: 2001:67c:670:100:1d::c5 X-SA-Exim-Mail-From: mfe@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 19-11-29 11:19, Linus Walleij wrote: > On Fri, Nov 29, 2019 at 11:15 AM Marco Felsch wrote: > > > > What about renaming gpio_chip_hwgpio() everywhere > > > to gpiod_to_offet(), remove it from drivers/gpio/gpiolib.h > > > and export it in instead? > > > > That's also possible but then we have to include the consumer.h header > > within the gpiolib.c and this seems to be wrong. But since I'm not the > > maintainer it is up to you and Bart. Both ways are possible, > > What about following the pattern by the clk subsystem and > create and put it there? > > It should be an indication to people to not use these features > lightly. We can decorate the header file with some warnings. That's a good idea. So the following points should be done: - rename gpio_chip_hwgpio() to gpiod_to_offset() or gpiod_to_local_offset() - move the new helper to - add kerneldoc - add warnings into the header Regards, Marco > Yours, > Linus Walleij > -- Pengutronix e.K. | | Steuerwalder Str. 21 | http://www.pengutronix.de/ | 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |