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=-16.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=unavailable 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 9A95DC43461 for ; Mon, 12 Apr 2021 14:07:52 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 50B5C61355 for ; Mon, 12 Apr 2021 14:07:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242120AbhDLOII (ORCPT ); Mon, 12 Apr 2021 10:08:08 -0400 Received: from mga14.intel.com ([192.55.52.115]:40962 "EHLO mga14.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242140AbhDLOIH (ORCPT ); Mon, 12 Apr 2021 10:08:07 -0400 IronPort-SDR: mygq9Ag+MqqtGbnrypqnBzeTS2xrgZIsqP9mNq0OPJu+uFNlEyXIFsT1uSo/oxiX5tAPVd4NDu w2xl26uhKXOw== X-IronPort-AV: E=McAfee;i="6200,9189,9952"; a="193760847" X-IronPort-AV: E=Sophos;i="5.82,216,1613462400"; d="scan'208";a="193760847" Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Apr 2021 07:07:48 -0700 IronPort-SDR: BGhmllKTW9Z6NxJaTifkLifZqnSkdcO9scHaBTB25wRZoe5QphRb0LEbp2FL3UNZKlNiKHbYCP nPUCxGNhF57w== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.82,216,1613462400"; d="scan'208";a="599997938" Received: from black.fi.intel.com ([10.237.72.28]) by orsmga005.jf.intel.com with ESMTP; 12 Apr 2021 07:07:44 -0700 Received: by black.fi.intel.com (Postfix, from userid 1003) id 8AF161D2; Mon, 12 Apr 2021 17:08:00 +0300 (EEST) From: Andy Shevchenko To: Andy Shevchenko , "Gustavo A. R. Silva" , Linus Walleij , Drew Fustini , Tony Lindgren , Christophe JAILLET , Thierry Reding , linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-omap@vger.kernel.org, linux-tegra@vger.kernel.org Cc: Vladimir Zapolskiy , Haojian Zhuang , Michal Simek , Daniel Mack , Robert Jarzmik , Thierry Reding , Jonathan Hunter Subject: [PATCH v1 3/3] pinctrl: Add PIN_CONFIG_MODE_PWM to enum pin_config_param Date: Mon, 12 Apr 2021 17:07:41 +0300 Message-Id: <20210412140741.39946-3-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210412140741.39946-1-andriy.shevchenko@linux.intel.com> References: <20210412140741.39946-1-andriy.shevchenko@linux.intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-tegra@vger.kernel.org It seems that we will have more and more pin controllers that support PWM function on the (selected) pins. Due to it being a part of pin controller IP the idea is to have some code that will switch the mode and attach the corresponding driver, for example, via using it as a library. Meanwhile, put a corresponding item to the pin_config_param enumerator. Signed-off-by: Andy Shevchenko --- include/linux/pinctrl/pinconf-generic.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/linux/pinctrl/pinconf-generic.h b/include/linux/pinctrl/pinconf-generic.h index 189e701832ea..e18ab3d5908f 100644 --- a/include/linux/pinctrl/pinconf-generic.h +++ b/include/linux/pinctrl/pinconf-generic.h @@ -80,6 +80,7 @@ struct pinctrl_map; * operation, if several modes of operation are supported these can be * passed in the argument on a custom form, else just use argument 1 * to indicate low power mode, argument 0 turns low power mode off. + * @PIN_CONFIG_MODE_PWM: this will configure the pin for PWM * @PIN_CONFIG_OUTPUT_ENABLE: this will enable the pin's output mode * without driving a value there. For most platforms this reduces to * enable the output buffers and then let the pin controller current @@ -125,6 +126,7 @@ enum pin_config_param { PIN_CONFIG_INPUT_SCHMITT, PIN_CONFIG_INPUT_SCHMITT_ENABLE, PIN_CONFIG_MODE_LOW_POWER, + PIN_CONFIG_MODE_PWM, PIN_CONFIG_OUTPUT_ENABLE, PIN_CONFIG_OUTPUT, PIN_CONFIG_PERSIST_STATE, -- 2.30.2 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=-16.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham 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 D12FBC433B4 for ; Mon, 12 Apr 2021 14:09:36 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 74CF26121E for ; Mon, 12 Apr 2021 14:09:36 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 74CF26121E Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linux.intel.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; h=Sender:Content-Transfer-Encoding :Content-Type:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:Cc:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=q9PZhKJk8glPrifnfDQ9h6nruXzrxEXolwPKDoxaQHI=; b=d3OUw4mxaof8h0hnIg/ZLVNGZ 67QIt2WyuOUUMpmnuZV1oqB0z6ukJ+YQOpaROgDpjRSPubz+CzfW7glOOguZDp1snwl9I1LvreIeH p3X3OjJsjEPkHhrRik1JaZsEcMX/pEbQBCBsKvAl1TzzdM3p6PI/ZBLHJy6lLQnj4gzpUcVSc7Uk+ 8ILRaxxFWIPZrZiqsk4sYX+ngZTbh4sAe5n8FEQXs6Gkh6y8njYXMEaSyyOQ1CxxvJM13E1hnWZeM XZCJQKRxE08RE67/e1ZVDqj41h6ghZ/sEDTwjyACOn4iSmvNPpH71lf0HFcqq5NaaoQAT1ZQpATbI Qp7sl8iyw==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lVxER-006v1d-Qg; Mon, 12 Apr 2021 14:08:04 +0000 Received: from bombadil.infradead.org ([2607:7c80:54:e::133]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lVxEF-006uyp-V0 for linux-arm-kernel@desiato.infradead.org; Mon, 12 Apr 2021 14:07:52 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender :Reply-To:Content-Type:Content-ID:Content-Description; bh=6Mqk+d6vjh9uLTL4RB9RBMxWklbcf9xRChRRiV1AP7o=; b=q99/E6hzRApTYpN9HrBd37S9DJ z5zpkv6vi+3pmxUxhN+2DEfyvXw6cGrm7S96kz3OV4yKCB1zllcg9H9IbkiZxGurDlyvW+L0Yy1zN /VdKqFv2zxtEkEw9gT+p+Qtsns4CwhEIWgpJmk1iZcImPvBlPABZfX1r9GFJ5G+2StKoM20nqwdu5 it4v7ebJYxh5YW0wUIpJNvCyoIqNrZdHgMMGRC2TNC3u9+LtF9jHTFA7KdsBpsRS0JATltLa2ax5g q29ickZEY5QK3IahiqBbIT1xFtv6MrUhR3KxMTLyKEtoinwStjsKH9IjnfY9yheSgeT1O0b5FBH69 45hgXpNQ==; Received: from mga14.intel.com ([192.55.52.115]) by bombadil.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lVxED-006I5T-GR for linux-arm-kernel@lists.infradead.org; Mon, 12 Apr 2021 14:07:50 +0000 IronPort-SDR: SrBb/C+ypATKuIeRoW7QzRzVUckc/fbRNz8UVyhu+Z80MnmYx1wkeJPgqt6ze745WxEDLbSeop bDYEWHASWSQQ== X-IronPort-AV: E=McAfee;i="6200,9189,9952"; a="193760845" X-IronPort-AV: E=Sophos;i="5.82,216,1613462400"; d="scan'208";a="193760845" Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Apr 2021 07:07:48 -0700 IronPort-SDR: BGhmllKTW9Z6NxJaTifkLifZqnSkdcO9scHaBTB25wRZoe5QphRb0LEbp2FL3UNZKlNiKHbYCP nPUCxGNhF57w== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.82,216,1613462400"; d="scan'208";a="599997938" Received: from black.fi.intel.com ([10.237.72.28]) by orsmga005.jf.intel.com with ESMTP; 12 Apr 2021 07:07:44 -0700 Received: by black.fi.intel.com (Postfix, from userid 1003) id 8AF161D2; Mon, 12 Apr 2021 17:08:00 +0300 (EEST) From: Andy Shevchenko To: Andy Shevchenko , "Gustavo A. R. Silva" , Linus Walleij , Drew Fustini , Tony Lindgren , Christophe JAILLET , Thierry Reding , linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-omap@vger.kernel.org, linux-tegra@vger.kernel.org Cc: Vladimir Zapolskiy , Haojian Zhuang , Michal Simek , Daniel Mack , Robert Jarzmik , Thierry Reding , Jonathan Hunter Subject: [PATCH v1 3/3] pinctrl: Add PIN_CONFIG_MODE_PWM to enum pin_config_param Date: Mon, 12 Apr 2021 17:07:41 +0300 Message-Id: <20210412140741.39946-3-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210412140741.39946-1-andriy.shevchenko@linux.intel.com> References: <20210412140741.39946-1-andriy.shevchenko@linux.intel.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210412_070749_573419_615E6124 X-CRM114-Status: GOOD ( 15.18 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org It seems that we will have more and more pin controllers that support PWM function on the (selected) pins. Due to it being a part of pin controller IP the idea is to have some code that will switch the mode and attach the corresponding driver, for example, via using it as a library. Meanwhile, put a corresponding item to the pin_config_param enumerator. Signed-off-by: Andy Shevchenko --- include/linux/pinctrl/pinconf-generic.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/linux/pinctrl/pinconf-generic.h b/include/linux/pinctrl/pinconf-generic.h index 189e701832ea..e18ab3d5908f 100644 --- a/include/linux/pinctrl/pinconf-generic.h +++ b/include/linux/pinctrl/pinconf-generic.h @@ -80,6 +80,7 @@ struct pinctrl_map; * operation, if several modes of operation are supported these can be * passed in the argument on a custom form, else just use argument 1 * to indicate low power mode, argument 0 turns low power mode off. + * @PIN_CONFIG_MODE_PWM: this will configure the pin for PWM * @PIN_CONFIG_OUTPUT_ENABLE: this will enable the pin's output mode * without driving a value there. For most platforms this reduces to * enable the output buffers and then let the pin controller current @@ -125,6 +126,7 @@ enum pin_config_param { PIN_CONFIG_INPUT_SCHMITT, PIN_CONFIG_INPUT_SCHMITT_ENABLE, PIN_CONFIG_MODE_LOW_POWER, + PIN_CONFIG_MODE_PWM, PIN_CONFIG_OUTPUT_ENABLE, PIN_CONFIG_OUTPUT, PIN_CONFIG_PERSIST_STATE, -- 2.30.2 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel