From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.2 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_PASS,URIBL_BLOCKED,USER_AGENT_MUTT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9ADACC3279B for ; Fri, 6 Jul 2018 11:23:26 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 59C1424058 for ; Fri, 6 Jul 2018 11:23:26 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 59C1424058 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=atomide.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932625AbeGFLXV convert rfc822-to-8bit (ORCPT ); Fri, 6 Jul 2018 07:23:21 -0400 Received: from muru.com ([72.249.23.125]:50526 "EHLO muru.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932300AbeGFLXT (ORCPT ); Fri, 6 Jul 2018 07:23:19 -0400 Received: from atomide.com (localhost [127.0.0.1]) by muru.com (Postfix) with ESMTPS id B523180B6; Fri, 6 Jul 2018 11:26:17 +0000 (UTC) Date: Fri, 6 Jul 2018 04:23:15 -0700 From: Tony Lindgren To: Sebastian Reichel Cc: Pavel Machek , Ladislav Michl , kernel list , linux-pm@vger.kernel.org, linux-arm-kernel , linux-omap@vger.kernel.org, nekit1000@gmail.com, mpartap@gmx.net, merlijn@wizzup.org Subject: Re: droid 4: connection refused from voltage_now Message-ID: <20180706112315.GD112168@atomide.com> References: <20180704171156.GA3158@amd> <20180704194556.GA9189@lenoch> <20180704195238.GA13932@amd> <20180706111628.mvh46mg6ctqia3iz@earth.universe> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: 8BIT In-Reply-To: <20180706111628.mvh46mg6ctqia3iz@earth.universe> User-Agent: Mutt/1.10.0 (2018-05-17) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org * Sebastian Reichel [180706 11:19]: > Hi, > > On Wed, Jul 04, 2018 at 09:52:38PM +0200, Pavel Machek wrote: > > On Wed 2018-07-04 21:45:56, Ladislav Michl wrote: > > > On Wed, Jul 04, 2018 at 07:11:56PM +0200, Pavel Machek wrote: > > > > Hi! > > > > > > > > I started to use droid 4 as my primary phone... so I have battery > > > > monitor running for hours... Once every few days it dies with > > > > "connection refused" error reading battery's "voltage_now". I restart > > > > it and it continues working... > > > > > > Ha! What exactly that "connection refused" means? Is it ECONNREFUSED (111)? > > > I have custom at91 based board here with few custom power supply drivers > > > and it sometimes ends with voltage_now of my driver being unreadable. > > > (I modified userspace code and waiting what's in errno in case > > > reading fails) > > > > It seems to be -110: > > Jul 4 11:48:29 devuan kernel: [ 2908.602600] cpcap_adc cpcap_adc.0: error reading ADC: -110 > > Jul 4 11:48:29 devuan kernel: [ 2908.608123] cpcap_battery cpcap_battery.0: cpcap_battery_get_current failed: -110 > > Jul 4 11:48:30 devuan kernel: [ 2908.922576] cpcap_adc cpcap_adc.0: error reading ADC: -110 > > Jul 4 11:48:30 devuan kernel: [ 2908.928100] cpcap_battery cpcap_battery.0: cpcap_charger_battery_temperature failed: -110 > > Jul 4 11:48:30 devuan kernel: [ 2908.936340] power_supply battery: driver failed to report `voltage_now' property: -110 > > The error above is obviously generated by cpcap_adc and only > propageted by cpcap_battery. Have a look for -ETIMEDOUT (-110) > in drivers/iio/adc/cpcap-adc.c. Hmm yeah maybe first try to increase the timeout value a bit and see if that helps. If increasing the timeout does not help, try reverting commit 9d965236fe9b ("iio: adc: cpcap: Remove hung interrupt quirk"). Regards, Tony