Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp8038675ybc; Fri, 29 Nov 2019 04:48:57 -0800 (PST) X-Google-Smtp-Source: APXvYqxplqtBxTN/zr4zT/ki7W03TOjguNRH8jK2KqcBXcNwu5o3enj4qfLSTkRsUydZQ7ATZjMl X-Received: by 2002:aa7:d8c4:: with SMTP id k4mr8531759eds.299.1575031737535; Fri, 29 Nov 2019 04:48:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1575031737; cv=none; d=google.com; s=arc-20160816; b=JnqTg7pN+RF31VQ1VeADK3MeA0tiUovDAZC9Q4UkNSfSOndZhhcstQs5vHgdXVFBRp S2r4KKmnGtIn3DRGicL7BFuyiXD0Oep2m7oAWBulCVMffBiqKY7t40P/AB2V9s0BRpz1 l/AiSL/FQmnJRi4j093ycVDhqO5KxpGpmyz5D0AxADI+TSuqYjwG9XtlQMQG0ZWjHSeR 6ga1wB8HNxHienSlYTc7V2YsOBtk/2fjBKJzAWfV3/ZDAakzKwptWtWY0WEQzQAWaBW7 45nsp59XaDYwUATLc7k1u9SXCfaVQIiWEwZbXVRUpdNlk+Wvt0/UZPll3kmV8X1/28Hu zSGg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=GljEEZ+qFQlAnuGdwSfhc8MmhbIqcq8xLrjdn0h36QY=; b=Q14Tgq/NPGFc1tV7FKPf4icCigCV0E2crFxLU1vvUlayUfkP4iwDHk10VpIbxwsDV6 TsEMzbMc7LJ3VjQMjjRaqSpk+kN8J4h2EFl7M6LBkfqN4Qc2J5727QqnHARM8UfKa0qd IG8TU4o1ZxdPpCwJdyItDELVC3Ok4nvZBM5RRAsF3p7zr4oHa7xmqylcLiU9ecvhySTB Puoy5M1oMpyBwihUKD8v9XuAPlqJOz9DtVgfXTklegtXmcZzO4792Xq/5w5C2shV13KW O7U0KvMcBrFDgfuqlEfqCb1L+8gjzbZJum/pWRdS9nd3pvBu35rhMxHZ/m19j0UMIbJU vkBA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=vp5Bqqo+; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id nw21si13483730ejb.222.2019.11.29.04.48.32; Fri, 29 Nov 2019 04:48:57 -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; dkim=pass header.i=@linaro.org header.s=google header.b=vp5Bqqo+; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726879AbfK2Mqc (ORCPT + 99 others); Fri, 29 Nov 2019 07:46:32 -0500 Received: from mail-lj1-f193.google.com ([209.85.208.193]:37759 "EHLO mail-lj1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726360AbfK2Mqb (ORCPT ); Fri, 29 Nov 2019 07:46:31 -0500 Received: by mail-lj1-f193.google.com with SMTP id u17so4513911lja.4 for ; Fri, 29 Nov 2019 04:46:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=GljEEZ+qFQlAnuGdwSfhc8MmhbIqcq8xLrjdn0h36QY=; b=vp5Bqqo+zzlmJdEsceF0oP8x+cm0xaQ78+bK1cSLSofUgaBUY+daNYjZv50BNeUqzy VPoScXNlv7s+O6pt4L8RrqkDzjvtzPyTXpWRnSWQ1gbrYISHNc3E6H9d2yrNUA9bX8oN S908OXqpM1+w8NXQRQbBaIOTvink9NETDj8Rs/fx4oHC5gnZTixojHL0aO6w5Up3F8io BfHP2p13LOoHcy+JMOAhumbeEJPiv0yqRoBqvar2kQcglUOLFpo9NxyVhlUHbQ+orw5m ux7lApGMEXt4Z3I/XjfPzDZuXOlhw7UN3iSUnjoAzLDexwfPVT7OoBWZJthSPnyClyFC 3GOQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=GljEEZ+qFQlAnuGdwSfhc8MmhbIqcq8xLrjdn0h36QY=; b=IITFan1x1BTy/45mWgqLqG+oKkoZwAR3FZgrjoPi/3RUVFSZK2M8GB6ggU/ievSC2R Ppp4s9DrIe77J/YsMh8QR1vKZUwKvOwbxHpRM2nko7XBXv0y2oARRdpKVB+LMWmNdG0U oK3RjSJwISeHbDNnRg7APomw10dTlgJGIp4/yVBZMVDEcLHM27YDikLKGo1bO86RZHHb HGRP61/lEnfWZbZGQNgFR+AJ+gtiFTyaQ8NpAFrfMJaDL0LB4VPXJqgxY9Q3YBU3rBQD hzsWxK49GIj0Ar0YlYx065FD/uqyfP839J3IuIVQzjRgwlMWGD0q6cH58pTiT1ZMXJat I+8Q== X-Gm-Message-State: APjAAAVPNBdgzeCZ6yhRrkM2Ew/5vT1PA0JaaWbkpSsUoM8fgb8+jLCO d7ONq/uAvzjVnuU/0Ftrxpl28zWBKYuR3J8AhPoz2Q== X-Received: by 2002:a2e:9a12:: with SMTP id o18mr37680939lji.191.1575031587982; Fri, 29 Nov 2019 04:46:27 -0800 (PST) MIME-Version: 1.0 References: <20191127135932.7223-1-m.felsch@pengutronix.de> <20191127135932.7223-2-m.felsch@pengutronix.de> <20191129101542.drtcn44twcyzxqmm@pengutronix.de> <20191129113600.phbhqudrgtm2egpf@pengutronix.de> In-Reply-To: <20191129113600.phbhqudrgtm2egpf@pengutronix.de> From: Linus Walleij Date: Fri, 29 Nov 2019 13:46:16 +0100 Message-ID: Subject: Re: [PATCH v2 1/5] gpio: add support to get local gpio number To: Marco Felsch 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 Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Nov 29, 2019 at 12:36 PM Marco Felsch wrote: > 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 Ack! Linus