Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp7496363imu; Thu, 27 Dec 2018 22:37:33 -0800 (PST) X-Google-Smtp-Source: ALg8bN6op5PoZmSmNVh3oP5tequnm89upPxB59yKjogzbMLOmGDH0fHA/VcVq4Nq30bxa9Y7JAsz X-Received: by 2002:a63:bc02:: with SMTP id q2mr25423036pge.116.1545979053516; Thu, 27 Dec 2018 22:37:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1545979053; cv=none; d=google.com; s=arc-20160816; b=six/UNXyksplg2WC5ExKlPbnfFD3KCqpkvFvJj9y5n17PcLIppVF7ExcgsPoSUQTR2 ywpXwk0CKkU0BxNMCQQQ/1VBVuEgCD1bs9nyO721QNwvamuG2iCNzV8VDKPkYg5XXr2X euON5NQwV4rtCd3iIUI0nS1Sfz+efd9iVFaVscLk2SIAVwzD+lCJLYI2GHdGA2vmnEs8 DIbR9yrTmol/JkBBqssSoc1qITSQKW83AD0jfOmc14UCaMnAESdqXCFsGXnzk1xbOXIa xNA2Uw/0B9PtIQQjKQu8m28IxEdqH9DNGPQPqOZXOnAIMhMVv4utr5PO5ZU70f6+0bIh 4QIA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:content-disposition :mime-version:message-id:subject:to:from:date; bh=I1sJFwLJWrOWYRk/CAdvavRk7nFyteVEWZi1Gc7dsSo=; b=XKdriOFTQvnYmMWQMERpo7ZaF6GvXLXuoECTFJWF97GvK6hW4/lXFvwAuClWOl1xd6 srzO3lQ5H6I/WngatTf7ACut6g4aa0fcwyI8WvGXYCVwbTp+HIHU/U7EFD5ngok9jMx/ HYfURAk+RuNEISZAXqRWzCk3Z7629gJUkRHeGxmqaamOPVrB/aNSrc72sxtgNFVBWxOe VDfhUT3cqGiDF99DixucrnNuBid4z1z1wh/i7cLR7+y8ooMbTmsdqwCUgebB2pO8wyI2 fSKimM4S5yhWjMixkUuV7YEsxmo56IDraz3W+hFnJbKSzxzdNM7Km3H77MwsXqnAK9W+ Nk0w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m1si38939710pfi.286.2018.12.27.22.37.18; Thu, 27 Dec 2018 22:37:33 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729321AbeL0TwZ (ORCPT + 99 others); Thu, 27 Dec 2018 14:52:25 -0500 Received: from atrey.karlin.mff.cuni.cz ([195.113.26.193]:59258 "EHLO atrey.karlin.mff.cuni.cz" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729123AbeL0TwZ (ORCPT ); Thu, 27 Dec 2018 14:52:25 -0500 Received: by atrey.karlin.mff.cuni.cz (Postfix, from userid 512) id 5D4DF806DE; Thu, 27 Dec 2018 20:52:18 +0100 (CET) Date: Thu, 27 Dec 2018 20:52:21 +0100 From: Pavel Machek To: Sebastian Reichel , linux-pm@vger.kernel.org, kernel list , linux-arm-kernel , linux-omap@vger.kernel.org, tony@atomide.com, nekit1000@gmail.com, mpartap@gmx.net, merlijn@wizzup.org Subject: cpcap-charger: generate events for userspace Message-ID: <20181227195221.GA11920@amd> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="opJtzjQTFsWo+cga" Content-Disposition: inline User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --opJtzjQTFsWo+cga Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable =20 The driver doesn't generate uevents on charger connect/disconnect. This leads to UPower not detecting when AC is on or off... and that is bad. =20 Reported by Arthur D. on github ( https://github.com/maemo-leste/bugtracker/issues/206 ), thanks to Merlijn Wajer for suggesting a fix. =20 Cc: stable@kernel.org Signed-off-by: Pavel Machek diff --git a/drivers/power/supply/cpcap-charger.c b/drivers/power/supply/cp= cap-charger.c index 9e8ff5c..7d8b4d5 100644 --- a/drivers/power/supply/cpcap-charger.c +++ b/drivers/power/supply/cpcap-charger.c @@ -576,6 +576,7 @@ static void cpcap_usb_detect(struct work_struct *work) goto out_err; } =20 + power_supply_changed(ddata->usb); return; =20 out_err: --=20 (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blo= g.html --opJtzjQTFsWo+cga Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iEYEARECAAYFAlwlLXUACgkQMOfwapXb+vLYPgCdGSb1Xix0v8c/98jQt4q0SjNl aaYAnjX5359IdWTVGczs4aF+UtxlGfeH =VwT6 -----END PGP SIGNATURE----- --opJtzjQTFsWo+cga--