From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2A1E7C43470 for ; Wed, 28 Apr 2021 13:45:14 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id E062A600D1 for ; Wed, 28 Apr 2021 13:45:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239841AbhD1Np4 (ORCPT ); Wed, 28 Apr 2021 09:45:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51930 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239836AbhD1Npz (ORCPT ); Wed, 28 Apr 2021 09:45:55 -0400 Received: from mail-pg1-x52f.google.com (mail-pg1-x52f.google.com [IPv6:2607:f8b0:4864:20::52f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C6A1EC06138A; Wed, 28 Apr 2021 06:45:10 -0700 (PDT) Received: by mail-pg1-x52f.google.com with SMTP id s22so23634152pgk.6; Wed, 28 Apr 2021 06:45:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=tW6Jg1hPCefeE4+Q5b9EX/MI8Wk9Qn2Twj5sMLql1/0=; b=MnimyphcYUdXSnck5cSXyKGtFL3svaYYHKqt4u4CHuyRoU1LONISHmgfLbIuy3Jx8D U10C91iCKgNrJxVKH1s3HL1lN/l4dC0MgqGEhtQNBljcPrZNUfEQwmS/npH3orn2lYbs dLeQC3lu4RvXRLUO1whrYSHwY/DUVbF5akWwPq8IzOMBEI9gHDL4j+qz5cp8GYfjaMsn 81YTsmeNNCl3gWi+ff2s0pQFfHU3rC5CqmekKZMACLzOnBwQA/uF8nWJFDBQ/d4Hb89c vhTZiw/9G2y1yqP6FcotT2L3Bs49IodoDp8i0Z+ws2TLyl84937at/5wWnY65eznFktM fEaw== 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=tW6Jg1hPCefeE4+Q5b9EX/MI8Wk9Qn2Twj5sMLql1/0=; b=lItoHtIkc0Z1eF/Bdnvsrs7BXed1t+kEPVJH22E8teS7RAIBm/Efu7k0R4r0YsSebd j7JDVxAmD9Sqb4x8l+AVKUhLEuJZXg3rkKks3McswK+0fjsP1P4lcr0mRie2enYZ3VrF mFNE5OLGjIPQwupYe8EMEuKzaa5q1df+gG44smUBussJuPNQnG3faE9Zc3QvUyTzI75g xSE13+b64tramD+bBUFOGCTRG8xfT/kdFO4BOH/BgxvmCVUTbKTaHyQ1XG4KWum6kZ65 sq0JBzVTh0/7CFjYEnkQifW5pdKIKivkWzU7eg3RGtMDAjY+PpEvdikM4uprHvI97RNZ u1Pw== X-Gm-Message-State: AOAM5307z5ia1XWNqCJ8ejSHqVWx2TA/v7PschnsPvBakKVDf6UIU5wn ZTGxOPELXSHJyfhD1abGiXkTDYeZYq3s9teieM+EiA8HqXA= X-Google-Smtp-Source: ABdhPJyh2zXRbuOdrBqVu7Frq1itIC3qKiVh/qPj4l8gEEzGAANFyUmIw6ldH+/FexEe3bG730Ffn+dolOGZxJJkfmE= X-Received: by 2002:a63:cd11:: with SMTP id i17mr26641169pgg.74.1619617510313; Wed, 28 Apr 2021 06:45:10 -0700 (PDT) MIME-Version: 1.0 References: <20210426095426.118356-1-tsbogend@alpha.franken.de> <6f6bce2f070998db49acca2f6611727b@walle.cc> In-Reply-To: From: Andy Shevchenko Date: Wed, 28 Apr 2021 16:44:54 +0300 Message-ID: Subject: Re: [PATCH v4 1/2] gpio: Add support for IDT 79RC3243x GPIO controller To: Michael Walle Cc: Thomas Bogendoerfer , Linus Walleij , Bartosz Golaszewski , Linux Kernel Mailing List , "open list:GPIO SUBSYSTEM" Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.org On Wed, Apr 28, 2021 at 2:57 PM Michael Walle wrote: > > Am 2021-04-28 13:07, schrieb Andy Shevchenko: > > On Wed, Apr 28, 2021 at 1:51 AM Michael Walle wrote: > >> Am 2021-04-26 12:29, schrieb Andy Shevchenko: > >> > On Mon, Apr 26, 2021 at 12:55 PM Thomas Bogendoerfer > >> > wrote: > >> > > >> > 2) there is gpio-regmap generic code, that may be worth > >> > considering. > >> > >> This driver uses memory mapped registers. While that is > >> also possible with gpio-regmap, there is one drawback: > >> it assumes gpiochip->can_sleep = true for now, see [1]. > >> Unfortunately, there is no easy way to ask the regmap > >> if its mmio/fastio. > > > > I don't see how it is an impediment. > > You'd have to use the *_cansleep() variants with the gpios, > which cannot be used everywhere, no? *can* sleep means that it requires a sleeping context to run, if your controller is fine with that, there are no worries. OTOH if you want to run this in an atomic context, then consumers can't do with that kind of controller. What I meant above (and you stripped it here) is to add a patch that will fix that and set it based on gpio_regmap_config. -- With Best Regards, Andy Shevchenko