From patchwork Sun Dec 1 22:23:30 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Anton Vorontsov X-Patchwork-Id: 3262731 Return-Path: X-Original-To: patchwork-linux-omap@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 15C269F377 for ; Sun, 1 Dec 2013 22:28:41 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 35CC920255 for ; Sun, 1 Dec 2013 22:28:40 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 458AA2024F for ; Sun, 1 Dec 2013 22:28:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752185Ab3LAW2i (ORCPT ); Sun, 1 Dec 2013 17:28:38 -0500 Received: from mail-pd0-f178.google.com ([209.85.192.178]:63741 "EHLO mail-pd0-f178.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751417Ab3LAW2h (ORCPT ); Sun, 1 Dec 2013 17:28:37 -0500 Received: by mail-pd0-f178.google.com with SMTP id y10so16788915pdj.37 for ; Sun, 01 Dec 2013 14:28:37 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-type:content-disposition :content-transfer-encoding:in-reply-to:user-agent; bh=SIw9Y4fGjgLkgk1UEABzTkA9dyQ/wLo48I/nw58vwYY=; b=YZMFOMVlzIdg+VgFahAzhp+kq7WkBeddqR0EbHthiAyonONUHfx/UapfUo0rBjW0AT 8c75jyO0zD5gQFog6t8Uube+LSoNYwTQiwVWomMozcv1w6NfDF9M7hKvn635t7h3rVOR 8MULhi45p1FQ1n7LDJouKKGoeGGFV9O4ZJVlYKBTiwh3LHrbbaLcZOv3ZgAg3Dw7L6+6 yBLLsopsBSeMiV9XNh93EmW7Df8vBDu4X4wmQEnzOg22B1+1m3/agUM7HD6Tq+j7AAM0 QNyE0U63xq4sjAfu9K4MT1l+uz4vqSUCZkrWJ2BHRWeD1eWbzo7mHssiUghswdFeIx+3 wJNg== X-Gm-Message-State: ALoCoQkeXWKuUTWkseu93PoG8u7r2uu56ufFh3hNKG7RuYShBBUcYZZOF9sb7b+9wqj2ZdNL87Gz X-Received: by 10.68.170.66 with SMTP id ak2mr28066215pbc.5.1385936917282; Sun, 01 Dec 2013 14:28:37 -0800 (PST) Received: from localhost (c-24-6-186-115.hsd1.ca.comcast.net. [24.6.186.115]) by mx.google.com with ESMTPSA id vk17sm133470237pab.5.2013.12.01.14.28.34 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 01 Dec 2013 14:28:36 -0800 (PST) Date: Sun, 1 Dec 2013 14:23:30 -0800 From: Anton Vorontsov To: Pali =?utf-8?B?Um9ow6Fy?= Cc: David Woodhouse , Tony Lindgren , Russell King , linux-kernel@vger.kernel.org, linux-omap@vger.kernel.org, freemangordon@abv.bg, aaro.koskinen@iki.fi, pavel@ucw.cz, Jenny TC Subject: Re: [PATCH v2 1/3] power_supply: Add power_supply notifier Message-ID: <20131201222330.GB6271@lizard> References: <1378630239-10006-1-git-send-email-pali.rohar@gmail.com> <1384856285-19593-1-git-send-email-pali.rohar@gmail.com> <1384856285-19593-2-git-send-email-pali.rohar@gmail.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <1384856285-19593-2-git-send-email-pali.rohar@gmail.com> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP On Tue, Nov 19, 2013 at 11:18:03AM +0100, Pali Rohár wrote: > This patch adds a notifier chain to the power_supply. > This notifier helps drivers in other subsystem to listen to > changes in power supply subsystem. This would help to take some > actions in those drivers on changing the power supply properties. > One such scenario is to increase/decrease system performance based > on the battery capacity/voltage. Another scenario is to adjust the > h/w peak current detection voltage/current thresholds based on battery > voltage/capacity. The notifier helps drivers to listen to changes > in power_suppy susbystem without polling the power_supply properties > > Signed-off-by: Jenny TC > Signed-off-by: Pali Rohár ... > +enum power_supply_notifier_events { > + PSY_EVENT_NONE, This one is not needed. > + PSY_EVENT_PROP_CHANGED, > + PSY_EVENT_BATTERY, > + PSY_EVENT_CABLE, > +}; The only event that is currently used in your patch series is EVENT_PROP_CHANGED... So, I applied the patch with the following changes: --- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/include/linux/power_supply.h b/include/linux/power_supply.h index c6f52c0..0c2a260 100644 --- a/include/linux/power_supply.h +++ b/include/linux/power_supply.h @@ -15,6 +15,7 @@ #include #include #include +#include #include #include #include @@ -159,10 +159,7 @@ enum power_supply_type { }; enum power_supply_notifier_events { - PSY_EVENT_NONE, PSY_EVENT_PROP_CHANGED, - PSY_EVENT_BATTERY, - PSY_EVENT_CABLE, }; union power_supply_propval { @@ -242,7 +239,7 @@ struct power_supply_info { int use_for_apm; }; -extern struct atomic_notifier_head power_supply_notifier; +extern struct atomic_notifier_head power_supply_notifier; extern int power_supply_reg_notifier(struct notifier_block *nb); extern void power_supply_unreg_notifier(struct notifier_block *nb); extern struct power_supply *power_supply_get_by_name(const char *name);