linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] z2-battery: Fix count of properties
@ 2011-03-11 10:03 Vasily Khoruzhick
  2011-03-11 12:11 ` Sergei Shtylyov
  0 siblings, 1 reply; 5+ messages in thread
From: Vasily Khoruzhick @ 2011-03-11 10:03 UTC (permalink / raw)
  To: linux-arm-kernel

PROP_STATUS property was not counted, as result
VOLTAGE_MIN property is missing in sysfs. Fix it.

Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>
---
 drivers/power/z2_battery.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/drivers/power/z2_battery.c b/drivers/power/z2_battery.c
index e5ed52d..551d7bf 100644
--- a/drivers/power/z2_battery.c
+++ b/drivers/power/z2_battery.c
@@ -134,6 +134,8 @@ static int z2_batt_ps_init(struct z2_charger *charger, int props)
 	enum power_supply_property *prop;
 	struct z2_battery_info *info = charger->info;
 
+	if (info->charge_gpio >= 0)
+		props++; /* POWER_SUPPLY_PROP_STATUS */
 	if (info->batt_tech >= 0)
 		props++;	/* POWER_SUPPLY_PROP_TECHNOLOGY */
 	if (info->batt_I2C_reg >= 0)
-- 
1.7.4.1

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

* [PATCH] z2-battery: Fix count of properties
  2011-03-11 10:03 [PATCH] z2-battery: Fix count of properties Vasily Khoruzhick
@ 2011-03-11 12:11 ` Sergei Shtylyov
  2011-03-11 13:09   ` [PATCH v2] " Vasily Khoruzhick
  0 siblings, 1 reply; 5+ messages in thread
From: Sergei Shtylyov @ 2011-03-11 12:11 UTC (permalink / raw)
  To: linux-arm-kernel

Hello.

On 11-03-2011 13:03, Vasily Khoruzhick wrote:

> PROP_STATUS property was not counted, as result
> VOLTAGE_MIN property is missing in sysfs. Fix it.

> Signed-off-by: Vasily Khoruzhick<anarsoul@gmail.com>
> ---
>   drivers/power/z2_battery.c |    2 ++
>   1 files changed, 2 insertions(+), 0 deletions(-)

> diff --git a/drivers/power/z2_battery.c b/drivers/power/z2_battery.c
> index e5ed52d..551d7bf 100644
> --- a/drivers/power/z2_battery.c
> +++ b/drivers/power/z2_battery.c
> @@ -134,6 +134,8 @@ static int z2_batt_ps_init(struct z2_charger *charger, int props)
>   	enum power_supply_property *prop;
>   	struct z2_battery_info *info = charger->info;
>
> +	if (info->charge_gpio>= 0)
> +		props++; /* POWER_SUPPLY_PROP_STATUS */

    Why not align this comment with the below one?

>   	if (info->batt_tech>= 0)
>   		props++;	/* POWER_SUPPLY_PROP_TECHNOLOGY */
>   	if (info->batt_I2C_reg>= 0)

WBR, Sergei

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

* [PATCH v2] z2-battery: Fix count of properties
  2011-03-11 12:11 ` Sergei Shtylyov
@ 2011-03-11 13:09   ` Vasily Khoruzhick
  2011-03-11 21:36     ` Marek Vasut
  0 siblings, 1 reply; 5+ messages in thread
From: Vasily Khoruzhick @ 2011-03-11 13:09 UTC (permalink / raw)
  To: linux-arm-kernel

PROP_STATUS property was not counted, as result
VOLTAGE_MIN property is missing in sysfs. Fix it.

Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>
---
v2: Align comment properly

 drivers/power/z2_battery.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/drivers/power/z2_battery.c b/drivers/power/z2_battery.c
index 81304c0..2a9ab89 100644
--- a/drivers/power/z2_battery.c
+++ b/drivers/power/z2_battery.c
@@ -134,6 +134,8 @@ static int z2_batt_ps_init(struct z2_charger *charger, int props)
 	enum power_supply_property *prop;
 	struct z2_battery_info *info = charger->info;
 
+	if (info->charge_gpio >= 0)
+		props++;	/* POWER_SUPPLY_PROP_STATUS */
 	if (info->batt_tech >= 0)
 		props++;	/* POWER_SUPPLY_PROP_TECHNOLOGY */
 	if (info->batt_I2C_reg >= 0)
-- 
1.7.4.1

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

* [PATCH v2] z2-battery: Fix count of properties
  2011-03-11 13:09   ` [PATCH v2] " Vasily Khoruzhick
@ 2011-03-11 21:36     ` Marek Vasut
  2011-03-16 13:55       ` Anton Vorontsov
  0 siblings, 1 reply; 5+ messages in thread
From: Marek Vasut @ 2011-03-11 21:36 UTC (permalink / raw)
  To: linux-arm-kernel

On Friday 11 March 2011 14:09:32 Vasily Khoruzhick wrote:
> PROP_STATUS property was not counted, as result
> VOLTAGE_MIN property is missing in sysfs. Fix it.
> 
> Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>

You can have my:

Acked-by: Marek Vasut <marek.vasut@gmail.com>

on this one.
> ---
> v2: Align comment properly
> 
>  drivers/power/z2_battery.c |    2 ++
>  1 files changed, 2 insertions(+), 0 deletions(-)
> 
> diff --git a/drivers/power/z2_battery.c b/drivers/power/z2_battery.c
> index 81304c0..2a9ab89 100644
> --- a/drivers/power/z2_battery.c
> +++ b/drivers/power/z2_battery.c
> @@ -134,6 +134,8 @@ static int z2_batt_ps_init(struct z2_charger *charger,
> int props) enum power_supply_property *prop;
>  	struct z2_battery_info *info = charger->info;
> 
> +	if (info->charge_gpio >= 0)
> +		props++;	/* POWER_SUPPLY_PROP_STATUS */
>  	if (info->batt_tech >= 0)
>  		props++;	/* POWER_SUPPLY_PROP_TECHNOLOGY */
>  	if (info->batt_I2C_reg >= 0)

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

* [PATCH v2] z2-battery: Fix count of properties
  2011-03-11 21:36     ` Marek Vasut
@ 2011-03-16 13:55       ` Anton Vorontsov
  0 siblings, 0 replies; 5+ messages in thread
From: Anton Vorontsov @ 2011-03-16 13:55 UTC (permalink / raw)
  To: linux-arm-kernel

On Fri, Mar 11, 2011 at 10:36:14PM +0100, Marek Vasut wrote:
> On Friday 11 March 2011 14:09:32 Vasily Khoruzhick wrote:
> > PROP_STATUS property was not counted, as result
> > VOLTAGE_MIN property is missing in sysfs. Fix it.
> > 
> > Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>
> 
> You can have my:
> 
> Acked-by: Marek Vasut <marek.vasut@gmail.com>
> 
> on this one.

Applied, thanks guys!

-- 
Anton Vorontsov
Email: cbouatmailru at gmail.com

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

end of thread, other threads:[~2011-03-16 13:55 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-03-11 10:03 [PATCH] z2-battery: Fix count of properties Vasily Khoruzhick
2011-03-11 12:11 ` Sergei Shtylyov
2011-03-11 13:09   ` [PATCH v2] " Vasily Khoruzhick
2011-03-11 21:36     ` Marek Vasut
2011-03-16 13:55       ` Anton Vorontsov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).