lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Fri, 17 Apr 2020 16:22:47 +0200
From:   "H. Nikolaus Schaller" <hns@...delico.com>
To:     Tony Lindgren <tony@...mide.com>
Cc:     Evgeniy Polyakov <zbr@...emap.net>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        linux-omap <linux-omap@...r.kernel.org>,
        Adam Ford <aford173@...il.com>,
        "Andrew F . Davis" <afd@...com>,
        Andreas Kemnade <andreas@...nade.info>,
        Vignesh R <vigneshr@...com>
Subject: Re: [PATCHv3] w1: omap-hdq: Simplify driver with PM runtime autosuspend


> Am 16.04.2020 um 20:46 schrieb Tony Lindgren <tony@...mide.com>:
> 
> * H. Nikolaus Schaller <hns@...delico.com> [200416 15:04]:
>> Hi Tony,
>> it looks as if something with this patch is broken on GTA04. For v5.6 and v5.7-rc1.
>> 
>> HDQ battery access times out after ca. 15 seconds and I get temperature of -273.1°C...
>> 
>> Reverting this patch and everything is ok again.
> 
> Hmm OK interesting.
> 
>> What is "ti,mode" about? Do we have that (indirectly) in gta04.dtsi?
>> Or does this patch need some CONFIGs we do not happen to have?
> 
> Sounds like you have things working though so there should be no
> need for having ti,mode = "1w" in the dts.
> 
>>> 	pm_runtime_enable(&pdev->dev);
>>> +	pm_runtime_use_autosuspend(&pdev->dev);
>>> +	pm_runtime_set_autosuspend_delay(&pdev->dev, 300);
> 
> Care to check if changing pm_runtime_set_autosuspend_delay value
> to -1 in probe makes the issue go away? Or change it manually
> to -1 via sysfs.
> 
> If that helps, likely we have a missing pm_runtime_get_sync()
> somewhere in the driver.

Yes, it does! It suffices to set it to -1 for one readout.
Aything else I can test?

root@...ux:~# time cat /sys/class/power_supply/bq27000-battery/uevent
POWER_SUPPLY_NAME=bq27000-battery
POWER_SUPPLY_STATUS=Discharging
POWER_SUPPLY_PRESENT=1
POWER_SUPPLY_VOLTAGE_NOW=4049000
POWER_SUPPLY_CURRENT_NOW=233478
POWER_SUPPLY_CAPACITY=0
POWER_SUPPLY_CAPACITY_LEVEL=Normal
POWER_SUPPLY_TEMP=-2731
POWER_SUPPLY_TIME_TO_EMPTY_NOW=0
POWER_SUPPLY_TIME_TO_EMPTY_AVG=0
POWER_SUPPLY_TIME_TO_FULL_NOW=0
POWER_SUPPLY_TECHNOLOGY=Li-ion
POWER_SUPPLY_CHARGE_FULL=0
POWER_SUPPLY_CHARGE_NOW=755788
POWER_SUPPLY_CHARGE_FULL_DESIGN=1233792
POWER_SUPPLY_CYCLE_COUNT=80
POWER_SUPPLY_ENERGY_NOW=0
POWER_SUPPLY_POWER_AVG=941700
POWER_SUPPLY_HEALTH=Good
POWER_SUPPLY_MANUFACTURER=Texas Instruments

real    0m8.910s
user    0m0.001s
sys     0m0.028s
root@...ux:~# echo -1 >/sys/bus/platform/drivers/omap_hdq/480b2000.1w/power/autosuspend_delay_ms
root@...ux:~# time cat /sys/class/power_supply/bq27000-battery/uevent
POWER_SUPPLY_NAME=bq27000-battery
POWER_SUPPLY_STATUS=Discharging
POWER_SUPPLY_PRESENT=1
POWER_SUPPLY_VOLTAGE_NOW=3985000
POWER_SUPPLY_CURRENT_NOW=231871
POWER_SUPPLY_CAPACITY=78
POWER_SUPPLY_CAPACITY_LEVEL=Normal
POWER_SUPPLY_TEMP=354
POWER_SUPPLY_TIME_TO_EMPTY_NOW=10440
POWER_SUPPLY_TIME_TO_EMPTY_AVG=9900
POWER_SUPPLY_TECHNOLOGY=Li-ion
POWER_SUPPLY_CHARGE_FULL=858138
POWER_SUPPLY_CHARGE_NOW=670170
POWER_SUPPLY_CHARGE_FULL_DESIGN=1233792
POWER_SUPPLY_CYCLE_COUNT=80
POWER_SUPPLY_ENERGY_NOW=2544780
POWER_SUPPLY_POWER_AVG=922720
POWER_SUPPLY_HEALTH=Good
POWER_SUPPLY_MANUFACTURER=Texas Instruments

real    0m0.232s
user    0m0.001s
sys     0m0.023s
root@...ux:~# echo 300 >/sys/bus/platform/drivers/omap_hdq/480b2000.1w/power/autosuspend_delay_ms
root@...ux:~# time cat /sys/class/power_supply/bq27000-battery/uevent
POWER_SUPPLY_NAME=bq27000-battery
POWER_SUPPLY_STATUS=Discharging
POWER_SUPPLY_PRESENT=1
POWER_SUPPLY_VOLTAGE_NOW=3985000
POWER_SUPPLY_CURRENT_NOW=234727
POWER_SUPPLY_CAPACITY=78
POWER_SUPPLY_CAPACITY_LEVEL=Normal
POWER_SUPPLY_TEMP=354
POWER_SUPPLY_TIME_TO_EMPTY_NOW=10620
POWER_SUPPLY_TIME_TO_EMPTY_AVG=10140
POWER_SUPPLY_TECHNOLOGY=Li-ion
POWER_SUPPLY_CHARGE_FULL=858138
POWER_SUPPLY_CHARGE_NOW=669102
POWER_SUPPLY_CHARGE_FULL_DESIGN=1233792
POWER_SUPPLY_CYCLE_COUNT=80
POWER_SUPPLY_ENERGY_NOW=2541860
POWER_SUPPLY_POWER_AVG=903740
POWER_SUPPLY_HEALTH=Good
POWER_SUPPLY_MANUFACTURER=Texas Instruments

real    0m0.178s
user    0m0.000s
sys     0m0.029s
root@...ux:~# 

BR and thanks,
Nikolaus

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ