Linux-PM Archive on lore.kernel.org
 help / color / Atom feed
* [PATCH] test_power: Fix battery_current initial value
@ 2020-07-29 12:14 lh lin
  2020-07-29 20:38 ` Sebastian Reichel
  0 siblings, 1 reply; 2+ messages in thread
From: lh lin @ 2020-07-29 12:14 UTC (permalink / raw)
  To: Sebastian Reichel, linux-pm, linux-kernel, linux-arm-kernel
  Cc: YJ Chiang, Lecopzer Chen, LH Lin

From: LH Lin <lh.lin@mediatek.com>

Since default battery_status is POWER_SUPPLY_STATUS_DISCHARGING,
we should change default battery_current to a negative value.

Signed-off-by: LH Lin <lh.lin@mediatek.com>
---
 drivers/power/supply/test_power.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/power/supply/test_power.c b/drivers/power/supply/test_power.c
index 65c23ef6408d..4f29f0f096f5 100644
--- a/drivers/power/supply/test_power.c
+++ b/drivers/power/supply/test_power.c
@@ -34,7 +34,7 @@ static int battery_technology		= POWER_SUPPLY_TECHNOLOGY_LION;
 static int battery_capacity		= 50;
 static int battery_voltage		= 3300;
 static int battery_charge_counter	= -1000;
-static int battery_current		= 1600;
+static int battery_current		= -1600;
 
 static bool module_initialized;
 
-- 
2.18.0

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] test_power: Fix battery_current initial value
  2020-07-29 12:14 [PATCH] test_power: Fix battery_current initial value lh lin
@ 2020-07-29 20:38 ` Sebastian Reichel
  0 siblings, 0 replies; 2+ messages in thread
From: Sebastian Reichel @ 2020-07-29 20:38 UTC (permalink / raw)
  To: lh lin; +Cc: linux-pm, linux-kernel, linux-arm-kernel, YJ Chiang, Lecopzer Chen


[-- Attachment #1: Type: text/plain, Size: 1002 bytes --]

Hi,

On Wed, Jul 29, 2020 at 08:14:00PM +0800, lh lin wrote:
> From: LH Lin <lh.lin@mediatek.com>
> 
> Since default battery_status is POWER_SUPPLY_STATUS_DISCHARGING,
> we should change default battery_current to a negative value.
> 
> Signed-off-by: LH Lin <lh.lin@mediatek.com>
> ---

Thanks, queued.

-- Sebastian

>  drivers/power/supply/test_power.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/power/supply/test_power.c b/drivers/power/supply/test_power.c
> index 65c23ef6408d..4f29f0f096f5 100644
> --- a/drivers/power/supply/test_power.c
> +++ b/drivers/power/supply/test_power.c
> @@ -34,7 +34,7 @@ static int battery_technology		= POWER_SUPPLY_TECHNOLOGY_LION;
>  static int battery_capacity		= 50;
>  static int battery_voltage		= 3300;
>  static int battery_charge_counter	= -1000;
> -static int battery_current		= 1600;
> +static int battery_current		= -1600;
>  
>  static bool module_initialized;
>  
> -- 
> 2.18.0

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, back to index

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-29 12:14 [PATCH] test_power: Fix battery_current initial value lh lin
2020-07-29 20:38 ` Sebastian Reichel

Linux-PM Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-pm/0 linux-pm/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-pm linux-pm/ https://lore.kernel.org/linux-pm \
		linux-pm@vger.kernel.org
	public-inbox-index linux-pm

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-pm


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git