Message ID | 20221017170600.88480-1-andriy.shevchenko@linux.intel.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4ac7:0:0:0:0:0 with SMTP id y7csp1554444wrs; Mon, 17 Oct 2022 10:08:57 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5BUQg0NBrXSFY78vnEvN0a8teJglyCJ2ZEgw6WRAhk7vdYSa2QpE+xT4wcU/rj01HFvncN X-Received: by 2002:a17:906:5d04:b0:77f:ca9f:33d1 with SMTP id g4-20020a1709065d0400b0077fca9f33d1mr9534105ejt.526.1666026525090; Mon, 17 Oct 2022 10:08:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666026525; cv=none; d=google.com; s=arc-20160816; b=kuxCR+vOJ6mfrgnK+rODyl1S5kF/9mEWl8M2G8VFS1c5fbBwa9mOenaY5cPW/i2N2B DukNHJ7j8EYEUOhJHQ46Clp2X9BYBqU0Vs0/Adj7waQKPnhHJxC0qw0Q1kA7DlTsHcT0 VXd8G+O0mI91E1qm8yeSIfi8IE758UADodMX41RwaXe1hkW1Ul9XcEuVfMD/T7gnyNDS fxuDV+nzLir7JaZJwz/ASd0UvYrdXPynTi0z6kCuo2Xrflsa1TUtMSA5SjZLdr/WeV20 rT9mnDtbhO2ctsPgp8wx1XOUJvnEx06DVrLsQNC0ZKHaJBpNtX98lf/ragRGf0fSRjxW T8RA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=OkhVaPpf/3jwGf9uZYceIihGjKzCDZI8QXmyhnn+Uf0=; b=OkShxOREjAKysQ8oIXvipY2kg8llkzJAdE+pLrWQyxbMEAquFQcQiPwylPGWJk9Qut sNZaBnF2bks+vCZB9tMncIlIw2/z6G87CuqiLpZQHdVFAm8iWrgmkkWC1mqtNhUNuNV1 jlwu2f1ZULHHT3hVQ6QlrTCYx0sJDWemKPbxdVxRABtB9PSy4gUbnQ7a3yuXcminRVE3 k2DvMCWbwtt7HPF/SvrmVnpYd1XdqtTy9wN8ZgLxG3Ro6okNFdZwxAqnmVjBYutoKQp0 NDUXm5EjkEC+U3vv70+c2rvID9KoLXptgIjf/hzRyYVifs2LV9/gOBY+kib5Eotu+ArG UWBA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=nZHyNW03; 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=NONE sp=NONE dis=NONE) header.from=intel.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id jg30-20020a170907971e00b0078da5f6ed9esi10264766ejc.779.2022.10.17.10.08.17; Mon, 17 Oct 2022 10:08:45 -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=@intel.com header.s=Intel header.b=nZHyNW03; 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=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229660AbiJQRFz (ORCPT <rfc822;kernel.ruili@gmail.com> + 99 others); Mon, 17 Oct 2022 13:05:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37700 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229765AbiJQRFy (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Mon, 17 Oct 2022 13:05:54 -0400 Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BDFE370E65; Mon, 17 Oct 2022 10:05:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1666026349; x=1697562349; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=A3GSK7UcppYiZrTEXbYQcILOnGqIDRlwIG2L6adHdKY=; b=nZHyNW03gs6s5nsdIB4W6BnVmiouwKVTdAgJMvL1SdyoUBonQ/6JOKK8 RqjqmwtWZ9cj3BXLFLOzosZTjjvRKp457oANs2IcKDXbhoWIHuHB7wHvW 3sYWdsb3QNnGf39pjeoynsnegIErHEU/uiuJGRTbOZHjNjWe7xyhpw34j x9XZQ0JTiqeZt9ueCXIhiHc+RPyMBblq9Bj/RURg5z9/eYv/MRzuJk0jW Mgcv3PJuld6+xn+pddG6hBMJKWCMs3guVOGLjYF0MO3SNh6JppCjbVRxl AzOrFOpK434pMu2Tk8ShxzM1hWdDH0IazeYxXPrRTT7cs5Z+FRdstjKDg A==; X-IronPort-AV: E=McAfee;i="6500,9779,10503"; a="289154494" X-IronPort-AV: E=Sophos;i="5.95,192,1661842800"; d="scan'208";a="289154494" Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 Oct 2022 10:05:44 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10503"; a="628374303" X-IronPort-AV: E=Sophos;i="5.95,192,1661842800"; d="scan'208";a="628374303" Received: from black.fi.intel.com ([10.237.72.28]) by orsmga002.jf.intel.com with ESMTP; 17 Oct 2022 10:05:42 -0700 Received: by black.fi.intel.com (Postfix, from userid 1003) id 11E2F26D; Mon, 17 Oct 2022 20:06:03 +0300 (EEST) From: Andy Shevchenko <andriy.shevchenko@linux.intel.com> To: Andy Shevchenko <andriy.shevchenko@linux.intel.com>, Qingtao Cao <qingtao.cao.au@gmail.com>, linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Linus Walleij <linus.walleij@linaro.org>, Bartosz Golaszewski <brgl@bgdev.pl> Subject: [PATCH v1 1/1] gpio: exar: Allow IO port access Date: Mon, 17 Oct 2022 20:06:00 +0300 Message-Id: <20221017170600.88480-1-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.35.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,SPF_HELO_NONE,SPF_NONE 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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1746955429604088180?= X-GMAIL-MSGID: =?utf-8?q?1746955429604088180?= |
Series |
[v1,1/1] gpio: exar: Allow IO port access
|
|
Commit Message
Andy Shevchenko
Oct. 17, 2022, 5:06 p.m. UTC
It's possible that PCI device can provide an IO port resource for
the device. regmap MMIO currently uses MMIO by default. With an
additional flag we enable support for IO port accesses.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
drivers/gpio/gpio-exar.c | 1 +
1 file changed, 1 insertion(+)
Comments
On Mon, Oct 17, 2022 at 7:05 PM Andy Shevchenko <andriy.shevchenko@linux.intel.com> wrote: > It's possible that PCI device can provide an IO port resource for > the device. regmap MMIO currently uses MMIO by default. With an > additional flag we enable support for IO port accesses. > > Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Looks clever to me! Acked-by: Linus Walleij <linus.walleij@linaro.org> I would let William have a look at it as well, as he's worked extensively with port-mapped I/O. Yours, Linus Walleij
On Tue, Oct 18, 2022 at 10:29:13AM +0200, Linus Walleij wrote: > On Mon, Oct 17, 2022 at 7:05 PM Andy Shevchenko > <andriy.shevchenko@linux.intel.com> wrote: > > > It's possible that PCI device can provide an IO port resource for > > the device. regmap MMIO currently uses MMIO by default. With an > > additional flag we enable support for IO port accesses. > > > > Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> > > Looks clever to me! > Acked-by: Linus Walleij <linus.walleij@linaro.org> > I would let William have a look at it as well, as he's worked extensively > with port-mapped I/O. > > Yours, > Linus Walleij I love how simple it is to add IO port support to these drivers now. :-) Acked-by: William Breathitt Gray <william.gray@linaro.org> I'm hoping to convert several of the port-mapped GPIO drivers to the regmap API later this cycle, so it's good to see other modules making use of this interface as well. Thanks, William Breathitt Gray
On Mon, Oct 17, 2022 at 7:05 PM Andy Shevchenko <andriy.shevchenko@linux.intel.com> wrote: > > It's possible that PCI device can provide an IO port resource for > the device. regmap MMIO currently uses MMIO by default. With an > additional flag we enable support for IO port accesses. > > Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> > --- > drivers/gpio/gpio-exar.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/drivers/gpio/gpio-exar.c b/drivers/gpio/gpio-exar.c > index 482f678c893e..df1bdaae441c 100644 > --- a/drivers/gpio/gpio-exar.c > +++ b/drivers/gpio/gpio-exar.c > @@ -141,6 +141,7 @@ static const struct regmap_config exar_regmap_config = { > .name = "exar-gpio", > .reg_bits = 16, > .val_bits = 8, > + .io_port = true, > }; > > static int gpio_exar_probe(struct platform_device *pdev) > -- > 2.35.1 > Applied, thanks! Bartosz
diff --git a/drivers/gpio/gpio-exar.c b/drivers/gpio/gpio-exar.c index 482f678c893e..df1bdaae441c 100644 --- a/drivers/gpio/gpio-exar.c +++ b/drivers/gpio/gpio-exar.c @@ -141,6 +141,7 @@ static const struct regmap_config exar_regmap_config = { .name = "exar-gpio", .reg_bits = 16, .val_bits = 8, + .io_port = true, }; static int gpio_exar_probe(struct platform_device *pdev)