From patchwork Fri May 10 08:23:20 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Guillaume LA ROQUE X-Patchwork-Id: 10938353 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 3070214B6 for ; Fri, 10 May 2019 08:23:39 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 20CD9289EC for ; Fri, 10 May 2019 08:23:39 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 14A4D28BD5; Fri, 10 May 2019 08:23:39 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id B1D00289EC for ; Fri, 10 May 2019 08:23:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=HCenSJUJ7G3K5kkNPL6/rmIoxYYkqf17qhRUDFau3QQ=; b=NdaUQ0FKPvYmFcQ+hX/bchSdvF j6VLZ+YD8LXNeSD0etP1GAMIcttH/j+4RfRuWen59Roi+yhyOAYQggrTabcdJGDyXUo5+RLTs2Pis d0v64DW1YDn+bcIGBpleB3LGPjurFXWqCl8mp+DAJzzU1N0/o3HEHB+Yi/Aj3LQDUPvEW3qlhk/DW 18LRI3ZGD5JkMw6RlBhkamw+c8LS/dSFnv0+lOY2Tc5ntNfnucu5CLit11l85l0e5jIkPcakocLA5 S7hlqUXN6k6IKb/NPhjdgiFGcWgk+kEFR800t1HZSipPvRyz9+HsK2zs2XEPQWDixYqOW/APBo6M+ uko1+FUQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1hP0ob-0002X2-6D; Fri, 10 May 2019 08:23:37 +0000 Received: from mail-wr1-x442.google.com ([2a00:1450:4864:20::442]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1hP0oT-0002LR-Q2 for linux-amlogic@lists.infradead.org; Fri, 10 May 2019 08:23:33 +0000 Received: by mail-wr1-x442.google.com with SMTP id w12so6714725wrp.2 for ; Fri, 10 May 2019 01:23:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=msbkGlp4GOhLlJp7h+ns/oU8AGbAhiOw2cYUQ/XgHZU=; b=KEXGh7nmUykMyg4yXJZT+cyBY0RHBUaLKxbcmNjZm0Ue2syRxhUuLCc4400XQLSZgB S+GhphIVuI3lFYTP8irlP2sQH40kocQ0hixEGpeLhj6czFzDPD1Jz8ckItkX8rc0cxY2 Z/mWafEhmGgCFn+vKOw0+80CkwXD19tLEpWn+rRttIw/cKqhdJxk+2VJRa4Vm5fjxBBt MWhM/MwyzYhHezij8GnP1YRmHWdl1+NFQ505YEhvwWJAHgGJk+t0CjjZ16nf3grszchd i+I1gjdrY+fkg82fWnFx0gl396JA7lutRJa6ODULUeUT2qJ9sgsRJbRrPfgeczOtLvKZ 8AZA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=msbkGlp4GOhLlJp7h+ns/oU8AGbAhiOw2cYUQ/XgHZU=; b=mDJnF/eHGoPPlPctacdYUZVBx6uKhW3/h6Ggv/z3Z4mt4DitMnHPHjkEkqv3B/qwUO y5ogRqSRLSkdDYoKMUm45MoEjJlRJUxDQXdSkVIvGCDarTQgk3OwjaQQeOh5GN/Bhn08 khIbiEzonf7DyvtzHP+AXl8+NLIhaSTItIAaRTgRt9vl8kUXAIC5zY1JJBkHv+86lzKP F+UbzhZYu/EUr1XPsxT4CbsItp0nKyC5z3+lKDpqzz2ByVNYQtxR0Nr29Mih4NMeH90S vXbf1oJzV579iFoiumMIGK1fw04iImV576QjGoio/GDG8RQTomSd+xJ1/kIxqWlVu6gb vp2A== X-Gm-Message-State: APjAAAU1XgGfzjb7xN/HStvlAgdi/39DbGYUAM6J3DtoTArCkgqedk2/ hKqmDq1eu8qkbN15l5HRIMbDQg== X-Google-Smtp-Source: APXvYqyVjzp0+hFVzgtYATfdbzr59K01hLStgvR1iexvFc+PiLzKfBuLpxquocim6U65M+dIkCbloA== X-Received: by 2002:adf:e908:: with SMTP id f8mr568698wrm.124.1557476608527; Fri, 10 May 2019 01:23:28 -0700 (PDT) Received: from glaroque-ThinkPad-T480.local (lmontsouris-657-1-212-31.w90-63.abo.wanadoo.fr. [90.63.244.31]) by smtp.gmail.com with ESMTPSA id z4sm3790285wmk.5.2019.05.10.01.23.27 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 10 May 2019 01:23:28 -0700 (PDT) From: Guillaume La Roque To: linus.walleij@linaro.org, khilman@baylibre.com Subject: [PATCH v5 2/6] pinctrl: generic: add new 'drive-strength-microamp' property support Date: Fri, 10 May 2019 10:23:20 +0200 Message-Id: <20190510082324.21181-3-glaroque@baylibre.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190510082324.21181-1-glaroque@baylibre.com> References: <20190510082324.21181-1-glaroque@baylibre.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190510_012330_109899_A7E7627A X-CRM114-Status: GOOD ( 10.03 ) X-BeenThere: linux-amlogic@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-gpio@vger.kernel.org, devicetree@vger.kernel.org, linux-amlogic@lists.infradead.org, linux-kernel@vger.kernel.org, jbrunet@baylibre.com MIME-Version: 1.0 Sender: "linux-amlogic" Errors-To: linux-amlogic-bounces+patchwork-linux-amlogic=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Add drive-strength-microamp property support to allow drive strength in uA Signed-off-by: Guillaume La Roque --- drivers/pinctrl/pinconf-generic.c | 2 ++ include/linux/pinctrl/pinconf-generic.h | 3 +++ 2 files changed, 5 insertions(+) diff --git a/drivers/pinctrl/pinconf-generic.c b/drivers/pinctrl/pinconf-generic.c index b4f7f8a458ea..d0cbdb1ad76a 100644 --- a/drivers/pinctrl/pinconf-generic.c +++ b/drivers/pinctrl/pinconf-generic.c @@ -39,6 +39,7 @@ static const struct pin_config_item conf_items[] = { PCONFDUMP(PIN_CONFIG_DRIVE_OPEN_SOURCE, "output drive open source", NULL, false), PCONFDUMP(PIN_CONFIG_DRIVE_PUSH_PULL, "output drive push pull", NULL, false), PCONFDUMP(PIN_CONFIG_DRIVE_STRENGTH, "output drive strength", "mA", true), + PCONFDUMP(PIN_CONFIG_DRIVE_STRENGTH_UA, "output drive strength", "uA", true), PCONFDUMP(PIN_CONFIG_INPUT_DEBOUNCE, "input debounce", "usec", true), PCONFDUMP(PIN_CONFIG_INPUT_ENABLE, "input enabled", NULL, false), PCONFDUMP(PIN_CONFIG_INPUT_SCHMITT, "input schmitt trigger", NULL, false), @@ -167,6 +168,7 @@ static const struct pinconf_generic_params dt_params[] = { { "drive-open-source", PIN_CONFIG_DRIVE_OPEN_SOURCE, 0 }, { "drive-push-pull", PIN_CONFIG_DRIVE_PUSH_PULL, 0 }, { "drive-strength", PIN_CONFIG_DRIVE_STRENGTH, 0 }, + { "drive-strength-microamp", PIN_CONFIG_DRIVE_STRENGTH_UA, 0 }, { "input-debounce", PIN_CONFIG_INPUT_DEBOUNCE, 0 }, { "input-disable", PIN_CONFIG_INPUT_ENABLE, 0 }, { "input-enable", PIN_CONFIG_INPUT_ENABLE, 1 }, diff --git a/include/linux/pinctrl/pinconf-generic.h b/include/linux/pinctrl/pinconf-generic.h index 6c0680641108..72d06d6a3099 100644 --- a/include/linux/pinctrl/pinconf-generic.h +++ b/include/linux/pinctrl/pinconf-generic.h @@ -55,6 +55,8 @@ * push-pull mode, the argument is ignored. * @PIN_CONFIG_DRIVE_STRENGTH: the pin will sink or source at most the current * passed as argument. The argument is in mA. + * @PIN_CONFIG_DRIVE_STRENGTH_UA: the pin will sink or source at most the current + * passed as argument. The argument is in uA. * @PIN_CONFIG_INPUT_DEBOUNCE: this will configure the pin to debounce mode, * which means it will wait for signals to settle when reading inputs. The * argument gives the debounce time in usecs. Setting the @@ -112,6 +114,7 @@ enum pin_config_param { PIN_CONFIG_DRIVE_OPEN_SOURCE, PIN_CONFIG_DRIVE_PUSH_PULL, PIN_CONFIG_DRIVE_STRENGTH, + PIN_CONFIG_DRIVE_STRENGTH_UA, PIN_CONFIG_INPUT_DEBOUNCE, PIN_CONFIG_INPUT_ENABLE, PIN_CONFIG_INPUT_SCHMITT,