Received: by 2002:ac0:946b:0:0:0:0:0 with SMTP id j40csp4354605imj; Tue, 12 Feb 2019 14:30:56 -0800 (PST) X-Google-Smtp-Source: AHgI3IZy6kfXp9zwnW6+2zMjUS0xIC8GLcAd/wGnNE2HiQeBExrG/3MI3W1eJKbgH7ngyr8844bZ X-Received: by 2002:a65:6147:: with SMTP id o7mr5634247pgv.356.1550010656578; Tue, 12 Feb 2019 14:30:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1550010656; cv=none; d=google.com; s=arc-20160816; b=vXsO7Ji2jUNMCGVT7SjL/ujs3lxjY5JoTq32Eyy81SRI5jpTB9mWOSTrNlEslFy7u4 MV3qLgE3yckOyBYp0T2MfHzauZBvHoBniLsbsbq8bPIRH9SdNdTC3ouZTDQdwUfqphBO hc5igx+m42bNb12DqX0HEyDGt97KTSd/uJ4Blmu4vahgZ9d84z9pzLvu2HSI6uh8KKwy bBeBo39xjR4lU5Ak5xJLdTaHakMB19dsQEqMILkyP1ylWiOonnpp5HeSn7l6QbL9hrku 7P44Fr8EnSLbFrJd1DetlgibFIlK4ElOayv1QQtXaR0JiIwvkFi6l0YXuUzENsdepzB6 lu0Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:cms-type:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature:dkim-filter; bh=EWZ2nEYUcUm6vDd+rU+I3vpcaDBj9+sDWK6WcLFzG/A=; b=URCxNoV68ug8pXI+hxblJ64bZ1m+TYZhPghBVnA8WarSzh7UmZImLHFofvhskm0tt4 UzEAPL9/j1foRSAC8iJbPk5TxKnm/dheD/jKoqYG1qBhsqv9N5dR7qvekPGzin+JHwXj W4PwQP70b7ltIyuqC6ZX1wruTnli/jT8k2AHN6xaZjhpyavIT5g98jXmtcovyUptSUW/ dy2HT7AYwCjCOMjXoBPL8QdvZpENbnIH0UOTIpxzhHzw0YjQfugqzIWY5m+q0xdIKDXK PnBagkUPto05XXrB+AHaEMuX1S0VQh7HDiWcnBzg61mEAiKL7kQS9QTGdyZBft1X4/oj t5TA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=c0cEtikC; 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=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y26si14417776pfd.25.2019.02.12.14.30.40; Tue, 12 Feb 2019 14:30:56 -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; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=c0cEtikC; 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=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732639AbfBLWYl (ORCPT + 99 others); Tue, 12 Feb 2019 17:24:41 -0500 Received: from mailout1.w1.samsung.com ([210.118.77.11]:37944 "EHLO mailout1.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732165AbfBLWYi (ORCPT ); Tue, 12 Feb 2019 17:24:38 -0500 Received: from eucas1p2.samsung.com (unknown [182.198.249.207]) by mailout1.w1.samsung.com (KnoxPortal) with ESMTP id 20190212222436euoutp015eb23d540e12d44845ea4341fbd3aa6b~CviJTmzi50553905539euoutp01X for ; Tue, 12 Feb 2019 22:24:36 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.w1.samsung.com 20190212222436euoutp015eb23d540e12d44845ea4341fbd3aa6b~CviJTmzi50553905539euoutp01X DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1550010276; bh=EWZ2nEYUcUm6vDd+rU+I3vpcaDBj9+sDWK6WcLFzG/A=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=c0cEtikClTjr6ZxaF5ulKqvMYLyDiYVsc7SWMMLSkng+NX2lOHyqRk+tO8edDFEGT YVGf7tgaNDEJf8gBN7y+bA5n5Cz+l9GxF0rws8QSZYw2t1ilQKW4fiMZERtne286ec BMRDZRwjp7768WM/ENbJK3tEOaGqQJ4L8jgFLofM= Received: from eusmges2new.samsung.com (unknown [203.254.199.244]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20190212222435eucas1p287880cc375816e75e161b605c9d22f7d~CviInW9_51608916089eucas1p2x; Tue, 12 Feb 2019 22:24:35 +0000 (GMT) Received: from eucas1p2.samsung.com ( [182.198.249.207]) by eusmges2new.samsung.com (EUCPMTA) with SMTP id C0.45.04294.3A7436C5; Tue, 12 Feb 2019 22:24:35 +0000 (GMT) Received: from eusmtrp2.samsung.com (unknown [182.198.249.139]) by eucas1p1.samsung.com (KnoxPortal) with ESMTPA id 20190212222434eucas1p134dcdce827df19704c698fd6452b0a06~CviHyE6xG2824728247eucas1p1U; Tue, 12 Feb 2019 22:24:34 +0000 (GMT) Received: from eusmgms1.samsung.com (unknown [182.198.249.179]) by eusmtrp2.samsung.com (KnoxPortal) with ESMTP id 20190212222434eusmtrp262d1d8f6e688e30afdccec48285d360b~CviHjWnmX2980329803eusmtrp2O; Tue, 12 Feb 2019 22:24:34 +0000 (GMT) X-AuditID: cbfec7f4-835ff700000010c6-00-5c6347a34d52 Received: from eusmtip1.samsung.com ( [203.254.199.221]) by eusmgms1.samsung.com (EUCPMTA) with SMTP id 2E.2C.04284.2A7436C5; Tue, 12 Feb 2019 22:24:34 +0000 (GMT) Received: from AMDC3778.DIGITAL.local (unknown [106.120.51.20]) by eusmtip1.samsung.com (KnoxPortal) with ESMTPA id 20190212222433eusmtip1712679907e8da16d668fff6043ecc269~CviG7grD20525605256eusmtip17; Tue, 12 Feb 2019 22:24:33 +0000 (GMT) From: Lukasz Luba To: linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org Cc: b.zolnierkie@samsung.com, myungjoo.ham@samsung.com, cw00.choi@samsung.com, kyungmin.park@samsung.com, m.szyprowski@samsung.com, s.nawrocki@samsung.com, tkjos@google.com, joel@joelfernandes.org, chris.diamand@arm.com, mka@chromium.org, rostedt@goodmis.org, mingo@redhat.com, Lukasz Luba Subject: [PATCH v3 4/7] include: devfreq: add polling_idle_ms to 'profile' Date: Tue, 12 Feb 2019 23:23:55 +0100 Message-Id: <1550010238-24002-5-git-send-email-l.luba@partner.samsung.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1550010238-24002-1-git-send-email-l.luba@partner.samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFtrAKsWRmVeSWpSXmKPExsWy7djP87qL3ZNjDL49FbPYOGM9q8W0T5dZ LK5/ec5qsaxB1eJs0xt2i1sNMhaXd81hs/jce4TRYu2Ru+wWlw4sYLL4vOExo8XtxhVsFvs6 HjBZHH7TzmrxfnKxA7/HmnlrGD1mN1xk8WjZd4vdY8GmUo+Fn76yehx8t4fJ4/2+q2wefVtW MXp83iQXwBnFZZOSmpNZllqkb5fAlbF82UPGgpXcFQv2vWdrYJzM2cXIySEhYCLx8cVB1i5G Lg4hgRWMEu+2nmaGcL4wShy4fYoRwvnMKPGh8z8zTMvZIyehqpYzSnz9fYYdruXyw1dAwzg4 2AT0JHasKgRpEBGwknjR/gqshlngGJPEp71TmEFqhAW8JB61soLUsAioSuw/2QS2gBcovPbJ AVaIZXISN891gsU5BbwlzkxbCXarhMA+donGSR3sEEUuEpNutbFB2MISr45vgYrLSPzfOZ8J wi6WONuxCqqmRqL95A6oGmuJw8cvgt3MLKApsX6XPogpIeAocfajNoTJJ3HjrSBIMTOQOWnb dGaIMK9ER5sQxAwNiS09F6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ubG5sZmFkrivOcNKqOEBNITS1KzU1MLUotg+pg4OKUaGMs5ohWirrHJznr8LOSrgXi19WIT tU9nSqprv7lxLGFNirYrZq47xurf+M63Zn6kp6Xu1ifF5nm9y3tZH9/c8LLJvOZ8g1TD62k3 s7696Tkm5Cue68d/WmOL+S9Rt6PC+8s8zl9zFIpfxzmh1THlyrZDczhCnoo3rbjpcUzKv0Jo NUu6T99OJZbijERDLeai4kQAN1Qbh6UCAAA= X-CMS-MailID: 20190212222434eucas1p134dcdce827df19704c698fd6452b0a06 X-Msg-Generator: CA Content-Type: text/plain; charset="utf-8" X-RootMTR: 20190212222434eucas1p134dcdce827df19704c698fd6452b0a06 X-EPHeader: CA CMS-TYPE: 201P X-CMS-RootMailID: 20190212222434eucas1p134dcdce827df19704c698fd6452b0a06 References: <1550010238-24002-1-git-send-email-l.luba@partner.samsung.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Add needed fields to support new state: idle, where different polling interval is in use. It provides better control of the devfreq device and lower the power consumption when the device is not busy. Signed-off-by: Lukasz Luba --- include/linux/devfreq.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/include/linux/devfreq.h b/include/linux/devfreq.h index fbffa74..5140970 100644 --- a/include/linux/devfreq.h +++ b/include/linux/devfreq.h @@ -72,6 +72,11 @@ struct devfreq_dev_status { * @initial_freq: The operating frequency when devfreq_add_device() is * called. * @polling_ms: The polling interval in ms. 0 disables polling. + * @polling_idle_ms: The polling interval in 'idle state' in ms. + * When the device is running at lowest frequency and has + * low-load, it is considered as in 'idle state'. + * Thus, longer polling interval is used for the device + * to save some power. * @target: The device should set its operating frequency at * freq or lowest-upper-than-freq value. If freq is * higher than any operable frequency, set maximum. @@ -98,6 +103,7 @@ struct devfreq_dev_status { struct devfreq_dev_profile { unsigned long initial_freq; unsigned int polling_ms; + unsigned int polling_idle_ms; int (*target)(struct device *dev, unsigned long *freq, u32 flags); int (*get_dev_status)(struct device *dev, -- 2.7.4