Received: by 10.223.185.116 with SMTP id b49csp376213wrg; Tue, 20 Feb 2018 23:17:01 -0800 (PST) X-Google-Smtp-Source: AH8x224eh5VE3I1HZqf/+YwSpPTSBWssyV3S6mMPQwSyI4fJaR84wlTyreBNMhisQ7jsQZ8HddrW X-Received: by 10.101.65.71 with SMTP id x7mr1946126pgp.203.1519197421229; Tue, 20 Feb 2018 23:17:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519197421; cv=none; d=google.com; s=arc-20160816; b=b728Bdyqa24kobNQqAfbqwuoxNqIjkS87myP+o0lYdrppq5dGa84uv1BDeKRAYuJrD f95GYosuOc6sVgb5t0Y6VGL5QYJWa/LTHEZOz+RL4LdJo7cBtwHmDlucGbGyoJBnBIGp O1jKCcCxVA8DY3VhlVETeyVafRPHWpH3O67GGla27kAm65R7Ii/RoILQXADCJfxKm4xi 739LD2a+7HXb8I2/ct4vTAcfbyp0FZ/9B53XS5MsKTYMZVZcc8epv510JXlmSm2XvGbz uoSRZrGvlgbz11XiIXCQEjE2MBsGh4WI3vt+RpfjQKcfawM6L3A6SkNrdGFupYMlxtBP Rssw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:arc-authentication-results; bh=7ogMPazthmwllAp7FzUqgI2texCeT7/jhmaE71noClo=; b=Uy0Epi5q8f9PomXjZylusqjDiIu8ZYP7/QAU+q+YgtteAYPrXQtleIxdg331E9KETu Wv+XWo3/+hFGluBVisu2wI/gLg8OudWh8meUx3B9aMnW8NHiqGLT/yoD8F7HLAfIBcZ8 NjrIN7Rp/5CDi3CgADU84ZaQZfH7NdpKa7n4Z0XxBbD6WDhDcHUHOyp0aSDMopYsDiyR 0PaumYEbvgC5PccOUIc+H4ZOI32JhrfYJdH46RA/vP9kfjrDi8/Ue0+ARkLE/DLYc1eI gesBOk2LyDlh+8nHrm9vvWkypcHzgQeZ7mVXzgIY3m5ANpF1bhncto3hgFii1G+M+4ZS JS2w== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=nvidia.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f4-v6si1130259plt.765.2018.02.20.23.16.45; Tue, 20 Feb 2018 23:17:01 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=nvidia.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751537AbeBUG7d (ORCPT + 99 others); Wed, 21 Feb 2018 01:59:33 -0500 Received: from hqemgate14.nvidia.com ([216.228.121.143]:16219 "EHLO hqemgate14.nvidia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751416AbeBUG7a (ORCPT ); Wed, 21 Feb 2018 01:59:30 -0500 Received: from hqpgpgate101.nvidia.com (Not Verified[216.228.121.13]) by hqemgate14.nvidia.com id ; Tue, 20 Feb 2018 22:59:34 -0800 Received: from HQMAIL103.nvidia.com ([172.20.161.6]) by hqpgpgate101.nvidia.com (PGP Universal service); Tue, 20 Feb 2018 22:59:28 -0800 X-PGP-Universal: processed; by hqpgpgate101.nvidia.com on Tue, 20 Feb 2018 22:59:28 -0800 Received: from DRUKMAIL102.nvidia.com (10.25.59.20) by HQMAIL103.nvidia.com (172.20.187.11) with Microsoft SMTP Server (TLS) id 15.0.1347.2; Wed, 21 Feb 2018 06:59:28 +0000 Received: from HQMAIL105.nvidia.com (172.20.187.12) by drukmail102.nvidia.com (10.25.59.20) with Microsoft SMTP Server (TLS) id 15.0.1347.2; Wed, 21 Feb 2018 06:59:23 +0000 Received: from rrajk-ubuntu.nvidia.com (10.124.1.5) by HQMAIL105.nvidia.com (172.20.187.12) with Microsoft SMTP Server (TLS) id 15.0.1347.2 via Frontend Transport; Wed, 21 Feb 2018 06:59:12 +0000 From: Rajkumar Rampelli To: , , , , , , , , , , , , , , , , , , , , , , CC: , , , , , , , , Subject: [PATCH 01/10] pwm: core: Add support for PWM HW driver with pwm capture only Date: Wed, 21 Feb 2018 12:28:50 +0530 Message-ID: <1519196339-9377-2-git-send-email-rrajk@nvidia.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1519196339-9377-1-git-send-email-rrajk@nvidia.com> References: <1519196339-9377-1-git-send-email-rrajk@nvidia.com> MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Add support for pwm HW driver which has only capture functionality. This helps to implement the PWM based Tachometer driver which reads the PWM output signals from electronic fans. PWM Tachometer captures the period and duty cycle of the PWM signal Signed-off-by: Rajkumar Rampelli --- drivers/pwm/core.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/pwm/core.c b/drivers/pwm/core.c index 1581f6a..87d14c9 100644 --- a/drivers/pwm/core.c +++ b/drivers/pwm/core.c @@ -246,6 +246,10 @@ static bool pwm_ops_check(const struct pwm_ops *ops) if (ops->apply) return true; + /* driver supports capture operation */ + if (ops->capture) + return true; + return false; } -- 2.1.4