Re: [PATCH v6 2/7] power: supply: fix wrong interpretation of register value

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

On Wed, Nov 23, 2022 at 06:54:20PM +0100, Saravanan Sekar wrote:
> Fix the switch cases to match the register value.
> 
> Signed-off-by: Saravanan Sekar <sravanhome@xxxxxxxxx>
> ---

Acked-by: Sebastian Reichel <sebastian.reichel@xxxxxxxxxxxxx>

-- Sebastian

>  drivers/power/supply/mp2629_charger.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/power/supply/mp2629_charger.c b/drivers/power/supply/mp2629_charger.c
> index bf9c27b463a8..46d620bd23b9 100644
> --- a/drivers/power/supply/mp2629_charger.c
> +++ b/drivers/power/supply/mp2629_charger.c
> @@ -284,10 +284,10 @@ static int mp2629_charger_battery_get_prop(struct power_supply *psy,
>  			val->intval = POWER_SUPPLY_STATUS_DISCHARGING;
>  			break;
>  		case 0x01:
> -		case 0x10:
> +		case 0x02:
>  			val->intval = POWER_SUPPLY_STATUS_CHARGING;
>  			break;
> -		case 0x11:
> +		case 0x03:
>  			val->intval = POWER_SUPPLY_STATUS_FULL;
>  		}
>  		break;
> @@ -305,7 +305,7 @@ static int mp2629_charger_battery_get_prop(struct power_supply *psy,
>  		case 0x01:
>  			val->intval = POWER_SUPPLY_CHARGE_TYPE_TRICKLE;
>  			break;
> -		case 0x10:
> +		case 0x02:
>  			val->intval = POWER_SUPPLY_CHARGE_TYPE_STANDARD;
>  			break;
>  		default:
> -- 
> 2.34.1
> 

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Input]     [Linux Kernel]     [Linux SCSI]     [X.org]

  Powered by Linux