Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp5802715imu; Wed, 30 Jan 2019 03:57:30 -0800 (PST) X-Google-Smtp-Source: ALg8bN7ZRV0YZmV0aBN77AMUaeLSU5CLXW8il7rzN3EP3qCj935Dq5Ob09mDu47gv8X2rO4bPRWQ X-Received: by 2002:a63:fe0a:: with SMTP id p10mr27079053pgh.265.1548849450452; Wed, 30 Jan 2019 03:57:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548849450; cv=none; d=google.com; s=arc-20160816; b=AV2US5yeK+EJc7TgUtJ4Phr3Fa9quoPiXISbdIqceXwdxNp0IjOW62pCFVUocj4Ecx 8bTfvNJRqSMEEvO7ix39Gr4qcTQ9acG0qNRFfWSjxJsmy8LDCJtAwAEqt9zVXt4+XmIK u8nMKEwt1VcuYBp/T7jkKzb5cwQoKVUqiLJK6Nv31SJ8efWNkUvYfukALbHugEzhKt+j X3MTtmQnlttqivERB1VYxR5/MBU5ehT2VawyLgs5jdHfbqXQZWzjjPiocfovDKkBjyRU cXGpg7tacGVbNU2egq2l90IwQ8faiuHX1Wlyn8R9fb8jIF5S8zCPcpoQuiBuyzGXRm8R S8bA== 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=oNMco5tAjl1a3GvBUWtghgZXjAYi71IVJGdFX+ipEzw=; b=SK2f6EKyu3kuOIbQ7GQnd4HB7q1yeZ7DOUj0dPuZFrKjwZx1gATRDFyBN+sflyIKZ4 Z14L8LsxlZMmpsBfjv5QYEdcHoxA3l7JuM52E4UTFRlaVtxmFa/Tx6RMADQQbvT8ROGV rE4hqrV6aFH6KK3uQPGamedhewFabia5rt9J9WvhS302Ibtom9PeD9lixL5tgPBOtUqQ 7NXX83RAGui6DRsgAbUrBCDH1TMWYd6mdp11GgUPmwfcgai2FIXdliUJY7oZa7/NLdz3 tU7sOXF34dgTN9HY3SH4o3ipv03uVDdEWco5I+mXQOTRIOwSJclCPqJa2M3WUT/GRvxm 6HTw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=PDysMpHU; 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 14si1274688pgx.178.2019.01.30.03.57.14; Wed, 30 Jan 2019 03:57:30 -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=PDysMpHU; 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 S1730852AbfA3L4i (ORCPT + 99 others); Wed, 30 Jan 2019 06:56:38 -0500 Received: from mail-lj1-f194.google.com ([209.85.208.194]:37927 "EHLO mail-lj1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730847AbfA3L4h (ORCPT ); Wed, 30 Jan 2019 06:56:37 -0500 Received: by mail-lj1-f194.google.com with SMTP id c19-v6so20464405lja.5 for ; Wed, 30 Jan 2019 03:56:36 -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=oNMco5tAjl1a3GvBUWtghgZXjAYi71IVJGdFX+ipEzw=; b=PDysMpHUhfHG9QGU170VoKLHcEGPmIak3HNjueDV2mt2knWxI/FWDz/XGGyv1sDWUa Kyum6Xr8pwhfl2vY/agPPpmyOPn1SawK/BUHCiv2aZIwBzkg6EE9yYP4+opNeEG+Vw/i UffHPJ7Jfu75GZ1DVgVswQbYr4hKAKsXxK37k= 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=oNMco5tAjl1a3GvBUWtghgZXjAYi71IVJGdFX+ipEzw=; b=omJicLksah5WLI2AOjAeFVi5gaumJDmsUaqmzpll4BHjLqxEv/y0ARLAXGS5x/5N6U O39WZESE4RTYSOVmN6vTRA06Q/jpljMLk3WghMyBzI5iSfMSkHvoIC6z1BLDYOxDI1mK rUCSbqXvDcOPg0glAJefUiwj5Upprb/zPnTGFsv+jO1rfvhdKZOWDqRCQZvtSj8nTFvc ufPSpvMmK8HBQVLuiFmryJVT0aWJwY77iyHgHLGy9G8+jZ61zrRq9snov1+l1VhHGaO2 Fm01uAWsrp6B2hnYdPp3ZHDJtuEsR+e3hPIIIs8fswzGJR8CAcBR9Ydoeh2bOFC1WBI2 FWNQ== X-Gm-Message-State: AJcUukcrvLPDHbyrptHaJAYYqJMJduAT5VUQvQo+KBeN7vuIJNrvn6bO T1eEHPUBVeeB5S77cjdFYTGBAn7e+1VZf+1RRVNITA== X-Received: by 2002:a2e:568d:: with SMTP id k13-v6mr25898323lje.105.1548849395212; Wed, 30 Jan 2019 03:56:35 -0800 (PST) MIME-Version: 1.0 References: <20190129170734.688a6adf91267cc6f1b5fa08@linux-foundation.org> <20190130101814.GA3668@icarus> In-Reply-To: <20190130101814.GA3668@icarus> From: Linus Walleij Date: Wed, 30 Jan 2019 12:56:23 +0100 Message-ID: Subject: Re: [PATCH v8 0/8] Introduce the for_each_set_clump8 macro To: William Breathitt Gray Cc: Andrew Morton , "open list:GPIO SUBSYSTEM" , linux-arch@vger.kernel.org, "linux-kernel@vger.kernel.org" , Andy Shevchenko , Rasmus Villemoes 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 Wed, Jan 30, 2019 at 11:17 AM William Breathitt Gray wrote: > On Tue, Jan 29, 2019 at 05:07:34PM -0800, Andrew Morton wrote: > > Do we have any expectation that these facilities will be used by > > anything other than GPIO? If not then perhaps they should be sited > > within drivers/gpio (presumably as a standalone module) until such a > > need is found? > > I can move it within drivers/gpio since my only use at moment is for > these gpio drivers I maintain. However, moving it to the gpio subsystem > does make it less likely to be seen by authors in other subsystems who > may have use for it -- so there is the chance that this becomes isolated > and untilized only amonst the gpio drivers. That may not be such a bad > thing in the end; I suspect it will be easy to spot if other subsystems > start implementing their own for_each_set_clump (if other subsystems > would even have such a need for it). I would sure prefer to have these in the generic core where this patch puts them. I don't see the problem with that. We have to start generic code from some point. > Linus, if I move the for_each_set_clump macro and related functions to > drivers/gpio, should I move the code into the gpiolib.h and gpiolib.c > files? Or would it be best to implement this as a separate standalone > module, and make a Kconfig dependency for those gpio drivers which > require it? A standalone module feels somewhat overkill for such little > code in my opinion. Yeah. I was however thinking about that we should create a helper library for port-mapped IO along the lines of gpio-mmio.c so we might as well get started with that in that case, just call it gpio-port-mapped-io.c and put these in first or something. Yours, Linus Walleij