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=-14.6 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, MENTIONS_GIT_HOSTING,SIGNED_OFF_BY,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 9FD9DC43387 for ; Thu, 27 Dec 2018 19:52:50 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 6F1FF214C6 for ; Thu, 27 Dec 2018 19:52:50 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="DhJFgTA5" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 6F1FF214C6 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=ucw.cz Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender:Content-Type: List-Subscribe:List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id: MIME-Version:Message-ID:Subject:To:From:Date:Reply-To:Cc: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To: References:List-Owner; bh=4x6QTAypE3+EANsCJY+tkMvNH88ng/d6TvZ7CiEWZIE=; b=DhJ FgTA5j25A8LvxqtPnT8nYBJbesKLm6v2tjSJTiA3f+KgQRnAiLfLBkndFLRd3YJ+6Uwd5Xz725u8l HG1iLGg22abq+RK6IB0f30+mhgi5fQIkEnmBvHeHLLq62nHYP6crOD2KmJrhUlPINcdDGDEbpDFof IhX701s3HjIJQHkefylFtNP1rQUu/RN48DEqmeqpmeas0tZsJfIxgzPxhswmnxBQUXDNuEln1+sZL b7uD5DYu/f1e8DmTT56EnlsdtsnpxOjWQoJ4olnttyRfM5y5+UMjcelPEMJFaVC2RCd4G5+vXda6X uyL/LuLlfBn9jizw7AAvhBYVZh4BSdA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1gcbhx-0006Ki-J9; Thu, 27 Dec 2018 19:52:41 +0000 Received: from atrey.karlin.mff.cuni.cz ([195.113.26.193]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gcbht-0005jN-Hk for linux-arm-kernel@lists.infradead.org; Thu, 27 Dec 2018 19:52:39 +0000 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 User-Agent: Mutt/1.5.23 (2014-03-12) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181227_115237_802187_FC8A7F6B X-CRM114-Status: UNSURE ( 9.91 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: multipart/mixed; boundary="===============4743704676554073272==" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org --===============4743704676554073272== Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="opJtzjQTFsWo+cga" Content-Disposition: inline --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-- --===============4743704676554073272== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel --===============4743704676554073272==--