Letux Kernel

Issue 476: readings from twl4030_madc_battery driver are wrong

Reported by Nikolaus Schaller, Aug 12, 2013

I had only applied your patches but not yet tested the driver.
It appears that it does not work completely on the 3.11 kernel and
always reports an empty battery.

I get e.g. these readings:

root@gta04:~# cat /sys/class/power_supply/twl4030_battery/uevent 
POWER_SUPPLY_NAME=twl4030_battery
POWER_SUPPLY_PRESENT=1
POWER_SUPPLY_STATUS=Charging
POWER_SUPPLY_TECHNOLOGY=Li-ion
POWER_SUPPLY_VOLTAGE_NOW=717000
POWER_SUPPLY_CURRENT_NOW=795000
POWER_SUPPLY_CAPACITY=0
POWER_SUPPLY_CHARGE_FULL=1200000
POWER_SUPPLY_CHARGE_NOW=0
POWER_SUPPLY_TEMP=670
POWER_SUPPLY_TIME_TO_EMPTY_NOW=10800
root@gta04:~# 

voltage/current/temp appear to be broken.

But reading the hwmon directly works perfectly:

root@gta04:~# cat /sys/devices/platform/twl4030_madc_hwmon/*_input
481	<- current
0
0
4199	<- vbatt
3
12
12
7
12
14
14
4940	<- vbus
3219	<- vbackup
26	<- temp
root@gta04:~# 

So I think there is something (now) missing with the madc 
initialization.

On the 3.7 kernel it did work.

Comment 1 by Nikolaus Schaller, Aug 12, 2013

Lukas commented in private communication:

I would assume something changed in madc_read(). Compare the drivers 
madc_read with madc_read from drivers/hwmon/twl4030-madc-hwmon.c, 
there are some slight differences (.func_cb VS .type).

Comment 2 by Lukas M, Aug 18, 2013

madc_read was indeed the culprit.

It is now fixed and working again on my 3.11-rc5:

root@gta04:~# cat /sys/class/power_supply/bq27000-battery/uevent 
POWER_SUPPLY_NAME=bq27000-battery
POWER_SUPPLY_STATUS=Charging
POWER_SUPPLY_PRESENT=1
POWER_SUPPLY_VOLTAGE_NOW=3905000
POWER_SUPPLY_CURRENT_NOW=-136731
POWER_SUPPLY_CAPACITY=45
POWER_SUPPLY_CAPACITY_LEVEL=Normal
POWER_SUPPLY_TEMP=271
POWER_SUPPLY_TIME_TO_FULL_NOW=18360
POWER_SUPPLY_TECHNOLOGY=Li-ion
POWER_SUPPLY_CHARGE_FULL=844305
POWER_SUPPLY_CHARGE_NOW=378063
POWER_SUPPLY_CHARGE_FULL_DESIGN=1233792
POWER_SUPPLY_CYCLE_COUNT=358
POWER_SUPPLY_ENERGY_NOW=1251220
POWER_SUPPLY_POWER_AVG=0
POWER_SUPPLY_HEALTH=Good

root@gta04:~# cat /sys/class/power_supply/twl4030_battery/uevent 
POWER_SUPPLY_NAME=twl4030_battery
POWER_SUPPLY_PRESENT=1
POWER_SUPPLY_STATUS=Charging
POWER_SUPPLY_TECHNOLOGY=Li-ion
POWER_SUPPLY_VOLTAGE_NOW=3900000
POWER_SUPPLY_CURRENT_NOW=720000
POWER_SUPPLY_CAPACITY=25
POWER_SUPPLY_CHARGE_FULL=1200000
POWER_SUPPLY_CHARGE_NOW=324000
POWER_SUPPLY_TEMP=250
POWER_SUPPLY_TIME_TO_EMPTY_NOW=2700

The patch can be pulled from here (and is attached):
  https://github.com/slyon/linux/tree/gta04-3.11-twl4030_battery

Comment 3 by Lukas M, Aug 18, 2013

Here comes the patch.

PS: Attachments are being lost, if Indefero's preview function is 
being used.

Comment 4 by Lukas M, Aug 18, 2013

Now for real :)

Comment 5 by Nikolaus Schaller, Aug 28, 2013

Appears to work now :)
Status: Fixed

Comment 6 by Grace Bradley, Aug 10, 2019

Batery driver were wrong they are not showing us any of the 
important message. That message is not important because we just not 
have any of the https://www.topreviewstars.com/ value this time. I 
know this time we will be taking interest in all of these important 
messages all the time.

Comment 7 by Jones Wilson, Dec 4, 2019

There are specific dissertation web-sites by using the online world 
to build safeguarded web saved with your website online.

Regards, 
https://www.office-help-setup.com
https://www.officecommsetup.com
https://ww-woffice.com/setup

Comment 8 by Jones Wilson, Dec 4, 2019

I found so many interesting stuff in your blog especially its 
discussion. From the tons of comments on your articles, I guess I am 
not the only one having all the enjoyment here! keep up the good 
work…
Regards,
http://www.ms-officesetup.com
https://https-www-norton.com/setup
http://https-www-office.com/setup

Comment 9 by Gerry Criston, Dec 26, 2019

I am extremely intrigued with your article. I adore the manner in 
which you compose this article. Much obliged to you for imparting 
this awesome post to us.

http://officecomsetupms.com/office-com-myaccount/ | 
https://officecomsetupms.com/

Comment 10 by Gerry Criston, Dec 26, 2019

This is extremely useful post, exceptionally instructive.
http://office-office.org/

Comment 11 by Michael Smith, Dec 28, 2019

I just wanted to say that I love every time visiting your wonderful 
post! Great information you shared through this blog. Keep it up and 
best of luck for your future blogs and posts.
http://usetupoffice.com/

Comment 12 by sunil kumar, Dec 28, 2019

if you find the best website for deals and Discount, offers here is 
the best website netrockdeals.com is provided the best Discount and 
cashback offers
http://netrockdeals.com/store/100yellow-coupons/
http://netrockdeals.com/store/1mg-coupons/
http://netrockdeals.com/store/aliexpress-coupons/
http://netrockdeals.com/store/adidas-coupons/
http://netrockdeals.com/store/bookmyshow-coupons/
http://netrockdeals.com/store/amazon-coupons/

Comment 14 by ramzi khan, Jan 19, 2020

https://www.mcafee-comm-activates.com

Comment 15 by kesy rim, Jan 22, 2020

I would like to thank you for the informative post with us.
https://www.office-offiicecom.com/
https://www.office-offiicecom.com/office-myaccount/
https://www.office-offiicecom.com/office-365-setup/

Comment 16 by steve moylan, Jan 24, 2020

Get some simple strides for simple downloading, introducing, 
enacting, and re-introducing the Microsoft.
https://officecom-setupoffice.com/
https://officesetup-officecom.com/

Comment 17 by Emma jane, Jan 28, 2020

Office.com/setup is a verifiable suite of different participation 
based organizations and applications.
http://officesetups.uk/
http://officesetups.uk/office-install/
http://officesetupuk.weebly.com
http://officesetups.uk/office-login/

Comment 18 by Emma jane, Jan 28, 2020

Webroot.com/safe is a cloud-based antivirus programming. This 
antivirus programming offers complete security of your gadget from 
malware and infections. It secures you during web surfing sessions 
by blocking destructive destinations. 
http://webroot-safe.me/
http://webroot-safeme.blogspot.com/  
http://webroot-safe.me/disclaimer
http://webroot-safe.me/privacy-policy/
ttp://www.youtube.com/watch?v=EzkVtOpXhHM

Comment 19 by Emma jane, Jan 28, 2020

Rand McNally is an industry head in creative GPS area innovation. It 
gives a broad scope of vanguard and brilliant items that flawlessly 
incorporate best in class GPS innovation. 
http://rand-mcnally-gps-update.com
http://rand-mcnally-gps-update.com/disclaimer
http://rand-mcnally-gps-update.com/privacy-policy/ 
http://randmcnallygps.weebly.com
http://rand-mcnallydock.weebly.com

Comment 20 by Emma jane, Jan 28, 2020

Garmin Express is a device that encourages you to oversee and 
refresh your Garmin gadgets. You are required to keep your gadget 
refreshed with the most recent programming and maps.
http://garmincomexpress.live/
http://garmincomexpress.live/disclaimer
http://garmincomexpress.live/privacy-policy

Comment 22 by Emma jane, Jan 28, 2020

Trend Micro is cloud-based antivirus software that defends your 
system against viruses and other malware. Also, this antivirus 
software safeguards against email scams. It has advanced security 
technology that keeps you secure when shopping or banking online. 
http://trendmicro-logins.com
http://trendmicro-login.blogspot.com/
http://trenmicrologin.tumblr.com/
http://in.pinterest.com/trenmicrologin/
http://medium.com/@trendlogin
http://ask.fm/emmajane3418
http://www.quora.com/profile/Trend-Micro-Login

Comment 23 by Emma jane, Jan 28, 2020

AVG is a well-recognized name in the domain of cybersecurity 
solutions. It offers sophisticated and user-friendly products that 
are undoubtedly the best of the breed. However, such innovative 
products require a user-friendly management platform to allow users 
to experience their full potential.
http://avglogins.com/  
http://loginavgaccount.blogspot.com/
http://www.facebook.com/AVG-Login-102310027925001/
http://twitter.com/LoginAvg
http://in.pinterest.com/myavglogin/
http://avglogins.weebly.com/
http://ask.fm/myavglogin

Comment 24 by Emma jane, Jan 28, 2020

Here is the complete procedure to download Norton.com/setup 
antivirus to secure your data from online threats of viruses and 
malware.
http://nortoncomsetupl.com/
http://nortoncomsetupl.com/privacy-policy/
http://nortoncomsetupl.com/disclasimer/

Comment 25 by Emma jane, Jan 28, 2020

GPS satellites transmit in any event 2 low-power radio signs. The 
signs travel by viewable pathway, which means they will go through 
mists, glass and plastic however won't experience most strong items, 
for example, structures and mountains.
http://gpssupports.blogspot.com/p/garmin-download.html
http://gpssupports.blogspot.com/p/garmincomexpress.html
http://gpssupports.blogspot.com/p/rand-mcnally-gps-update.html
http://gpssupports.blogspot.com/p/rand-mcnally-update.html
http://gpssupports.blogspot.com/p/how-to-update-rand-mcnally-gps.html

http://gpssupports.blogspot.com/

Comment 26 by Emma jane, Jan 28, 2020

AOL Mail provides an easy-to-use interface to connect with millions 
of people around the world. After you create an account, you can 
easily access all the features of AOL-Mail.
http://aolmaill.de
http://aolmaill.de/privacy-policy/
http://aolmaill.de/disclaimer/

Comment 27 by Emma jane, Jan 28, 2020

Norton.com/nu16 is a utility software program that cleans up the PC 
and helps it to run smoothly and quickly. It finds and fixes the 
issues in order to configure, optimize, and maintain your device. 
You can use this application for boosting up to 10 Windows PCs.
http://norton-comnu16.com/
http://norton-comnu16.com/support/cannot-get-rid-of-norton-utilities-
16/
http://norton-comnu16.com/support/trouble-installing-norton-security-
software/
http://norton-comnu16.com/support/error-the-install-file-cannot-be-pr
operly-validated-when-installing-norton-utilities-16-0/

Comment 28 by Sarkari Result, Jan 29, 2020

Thank you so much for this wonderful Post and all the best for your 
future. I happily found this website eventually. Informative and 
inoperative, I hope you and we will be sharing more ideas and keep 
writing more like this one. 
https://sarkariresultonline.info/latest-jobs/       
https://sarkariresultonline.info/admit-card/   
 https://sarkariresultonline.info/latest-results/   
https://sarkariresultonline.info/answer-key/    
 https://sarkariresultonline.info/ssc/     
https://sarkariresultonline.info/ssc-cgl/        
https://sarkariresultonline.info/ssc-chsl/   
https://sarkariresultonline.info/ssc-gd/

Comment 29 by Sarkari Result, Jan 29, 2020

Thankyou For Sharing this information With us. I really Like the 
nature of this blog. i REALLY aPPRECIATE FOR YOUR eFFORT. 
Regards
Tasco
Web Development Company, Ticketmaster bots, ticketmaster bot, mobile 
app development company
https://tas.co.in/

Comment 30 by John Smith, Jan 30, 2020

Webroot.com/safe can protect your devices from slowing down 
performance, erratic computer behavior, frequent computer crashes or 
unexpected data loss. Webroot antivirus is a great option.

http://www.webrootcomsafee.us/

Comment 31 by John Smith, Jan 30, 2020

Magellan GPS Update is easily available for installation on a free 
software application. However, another key point to remember is that 
only a few of these updates are available for free. But, you must 
purchase most of them.

http://magellan-gps-update.com/

Comment 32 by John Smith, Jan 30, 2020

You can use Garmin Express on your Windows and Mac system and easily 
update your Garmin device. To make your work easier, we have 
provided a complete guide of Garmin.com/express.

http://garmincomexpress.online/

Comment 33 by John Smith, Jan 30, 2020

Customers are the king of the market. After-sales TurboTax Support 
professionals play a vital role in providing customer satisfaction 
and retention for long term. Support services help in strengthening 
the bond between the organization and customers. 

http://turbotax-support.us/

Comment 34 by John Smith, Jan 30, 2020

However, such innovative products require a user-friendly management 
platform to allow users to experience their full potential. As such, 
users are provided with the Malwarebytes login account to simplify 
the use of a technical genius.

http://malwarebytesloginn.com/

Comment 35 by John Smith, Jan 30, 2020

Webroot Removal Tool - Facing issues while Reinstalling your 
SecureAnywhere Webroot, learn how you can remove your Webroot 
Antivirus from your devices.

http://www.webrootcomsafee.us/support/webroot-removal-tool

Comment 36 by John Smith, Jan 30, 2020

Office.com/setup – Now Enter Office Setup Product Key which is at 
the bank of Office Retailcard or on your email and Get Started with 
Office Installation.

http://officecom-setupz.com/

Comment 37 by John Smith, Jan 30, 2020

AOL Mail is a free web-based email service that helps the users to 
enjoy personalized email experience. You can connect with your 
family and friends using this email platform.

http://aolmailhelp.com/

Comment 38 by John Smith, Jan 30, 2020

Kaspersky Login - Kaspersky account or My Kaspersky is an ultimate 
portal for managing the protection of your devices. Using your 
account, you can view the information of your subscription, download 
the purchased application, activate your subscription.

http://kaspersky-loginn.com/

Comment 39 by John Smith, Jan 30, 2020

AT&T (American Telephone and Telegraph) is a global leader in 
telecommunication, media, and entertainment industry. It offers 
world-class services that made it a leading telecommunication 
company in the world.

http://attloginn.com/

Comment 40 by james hopes, Jan 30, 2020

Connect with Mcafee Antivirus Support Service by dialing 
+1(888)-575-2585 or you can Visit website wwwmcafeecomactivate or 
mcafeecomactivate. Get Our Instant Support for Mcafee Products, 
Activation,Troubleshooting,Set-up,Installation,Uninstall and Error 
Solution .Our Mcafee 
Antivirus Support is 24/7 available to help you.
Visit-
http://1800customerservicesnumber.com/product/mcafee-com-activate/

Comment 41 by Gvnr Health, Jan 30, 2020

GVNR hospitals where the treatment and care are equivalent to global 
standards. There are numerous branches of medicine in which we 
excel. The modern technology we use, coupled with great Doctors with 
various fields of expertise, gives us a plethora of specialties we 
provide expert treatments in
https://www.gvnrhealth.com/

Created: 6 years 7 months ago by Nikolaus Schaller

Updated: 2 months 2 days ago

Status: Fixed

Followed by: 13 persons

Labels:
Type:Defect
Priority:Medium