From patchwork Thu Apr 7 10:40:05 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Oliver Neukum X-Patchwork-Id: 558733 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9A45FC433F5 for ; Thu, 7 Apr 2022 10:40:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237767AbiDGKmO (ORCPT ); Thu, 7 Apr 2022 06:42:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34672 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231703AbiDGKmN (ORCPT ); Thu, 7 Apr 2022 06:42:13 -0400 Received: from de-smtp-delivery-102.mimecast.com (de-smtp-delivery-102.mimecast.com [194.104.109.102]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6AC37F1AFE for ; Thu, 7 Apr 2022 03:40:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=mimecast20200619; t=1649328011; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type; bh=L9V7DKIB/3q0ENvfp4Vqnv4uYlRNxB4FWArfwBpV3uI=; b=GnPwk71+hbE2CKgLvhxViUB1AijJAOIyHbftw7ElxGcNnWERvaMsaCltWFswkOg0pngP5q JY4ckwjZ4tsaK7Cjr15NZd3UJ9G83RxE+fUn+xkoNbNq5htUYA9M00XEGg1sRpVjnj/efU oMe1OH7H13oTWkXooeK7AVBdGwRwhnI= Received: from EUR04-VI1-obe.outbound.protection.outlook.com (mail-vi1eur04lp2059.outbound.protection.outlook.com [104.47.14.59]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id de-mta-31-PC_fk8xKNJSrV4C5VwNALQ-1; Thu, 07 Apr 2022 12:40:09 +0200 X-MC-Unique: PC_fk8xKNJSrV4C5VwNALQ-1 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=oA/+ljqkfxGT0bnHekO6Pp0sTbxKgL9Ts8YUSeu3TXY38o9u+gQuJkct8fo3swy5qkmG0K9bv8PpLSSwSoBMXBkYjewL6hWsrbmcIUYV5nC4Dup4f/aiSfwW9MUqdNkqGiSniCRLrCySHyjek1OAfciBShzhiZEKenaxdKq5I7LsQ07GuUeY3AiyY0Xe3SMxV/ihBFq85UCpjMvmE3kbxrPUaXNgN1FytfVG12wDecPTZcMI2XdzGAb1biLucS3iPbOxwdeYwvNkzXkem9cs8ql0mDMdZu1MbseHdZQ/KgnE2zqjSZ3YaNXYWA99yxhtGuGAf0+mKSIMxpY6EaJAwQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=L9V7DKIB/3q0ENvfp4Vqnv4uYlRNxB4FWArfwBpV3uI=; b=bsdEPlbdyVXeYKlC2gh8zjv6AcdwTMcGu/nDczbovXi7BoFqUyQHHvSqMQXEiQ+NJeA6oZbu0TWuvfVyd2+jpvH4Kn+Zpl5EeZ211IOOqh/x2okTTCaciYJV1ZgGv4UzU9uW8WFkNhjqo2un4iKlWpxMsb9NcSB/XkmIGHaE86AmKuLfCqR2vCuFO0DwW3vH3Cpu81q8qOyu6k7bNSJ7ltKB0M0sK7JbTw5MRJUEVx6KGu0MvAybb3G9Xfh3lpqECwAsF2m+RmlOK26CpsI04igBWydfbILAaOcHQya5bDK1epgh2fzHuh2uTENetWU5gZ35s0Qw3bXVlOXZej3pfw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.com; arc=none Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com; Received: from VI1PR0401MB2526.eurprd04.prod.outlook.com (2603:10a6:800:58::16) by AS8PR04MB7831.eurprd04.prod.outlook.com (2603:10a6:20b:2a8::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5144.22; Thu, 7 Apr 2022 10:40:08 +0000 Received: from VI1PR0401MB2526.eurprd04.prod.outlook.com ([fe80::8c82:19c5:ce96:491b]) by VI1PR0401MB2526.eurprd04.prod.outlook.com ([fe80::8c82:19c5:ce96:491b%4]) with mapi id 15.20.5144.022; Thu, 7 Apr 2022 10:40:08 +0000 Message-ID: Date: Thu, 7 Apr 2022 12:40:05 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.7.0 Content-Language: en-US To: hadess@hadess.net Cc: USB list From: Oliver Neukum Subject: device type in apple-mfi-fastcharfe X-ClientProxiedBy: AS9P194CA0011.EURP194.PROD.OUTLOOK.COM (2603:10a6:20b:46d::16) To VI1PR0401MB2526.eurprd04.prod.outlook.com (2603:10a6:800:58::16) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: adb6b972-9f42-4705-b6fd-08da1882fbee X-MS-TrafficTypeDiagnostic: AS8PR04MB7831:EE_ X-Microsoft-Antispam-PRVS: X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: NW5583LqFQ5fK/ngWTjbGdo7njeB57OgNW5ic+wWrYkDCvHy0mfJd2EhWoQ41o43rA0gLlNFJbOmM77NfzyCqr3HaH35RUdC3+OJ0jLp0p+NYwWpZlHbIeTGrOx0uo8ze+JQpGBH5ZD5NpVjl5u3xU/3/ucrRfbyMC/0abaACItisgw52E9awOD/0cXwsYqnqeGIcQbKy8lIrtWOlnLf9xp3q/cbvB08sbE1ssRGxaAxZx97iH9n3YX7LseE90KmfpLcIjo+9Qs6G9glckNfi630/LazlmXE2whEX1neUCoD1AbjBUenn0H6ZmX4xT0ss3/Y9c5Xe2b7Q66hvb4/yx0A5ASjx580+Xklo3maL+hhLiPKhDGYswdZyjCW4Bw5pznoZIr39NpkWNeoM/H5L7t7Md3trkI3p3kLlFKsZU6S269JbS3YjiHwMA0dXRP9lA8+N+dp9C2Snd5sg+nPAPOvZcBS60OM8BCBySaU5pHSV3SXJLuz40NjaxjJEINuTDafvGUILV8dnQqr9sAChjFBOfXGzNRmSkJNk2i9LCuV9Gk1EiyRoGLsSiZq6QUhOk1wXcgtKES8C6Oqfncrl5PijA0Y8xxhv6+5ykDWBanFnmv7yHZzZ+5n6Qnw6KJgJbRIUk5xbjVKBKIP994li8lRG3LeiMgKWtXRMi9OrBFAKKsenSuQY/YytW1NtHgDI//i1E7bpS3TDDoSmyHsmfBDfHIbjhHmb97r861f6pD5paS6RlhcWWyKEUhIM3t23UK9Gsjus6UE/euXbVoSSwTcWyY42pzpm8BIRSX0YifPvCnDrwjxoVX5GaKUqk6I6RJ8+PJaQ5Uax/EkZFt5iuvO1PbQkvPw9HpU+5lKW8k= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:VI1PR0401MB2526.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230001)(366004)(47660400002)(235185007)(186003)(36756003)(508600001)(966005)(6916009)(8936002)(6666004)(5660300002)(6486002)(2616005)(31686004)(2906002)(66946007)(66476007)(66556008)(4326008)(8676002)(6506007)(38100700002)(316002)(6512007)(31696002)(33964004)(86362001)(46800400005)(45980500001)(43740500002); DIR:OUT; SFP:1101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=?utf-8?q?iZ7LEMnK5RnziH3FN?= X-MS-Exchange-AntiSpam-MessageData-1: FnSky8Qlf+io/A== X-OriginatorOrg: suse.com X-MS-Exchange-CrossTenant-Network-Message-Id: adb6b972-9f42-4705-b6fd-08da1882fbee X-MS-Exchange-CrossTenant-AuthSource: VI1PR0401MB2526.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Apr 2022 10:40:07.9293 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: f7a17af6-1c5c-4a36-aa8b-f5be247aa4ba X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: edEcaXlSWXYei0knrQoFiXlunvpTH69eixmYLPtpVvnGfXknhc+uYR6aojWC4NjBN4O0BzGyjtUXvApzX79B6w== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8PR04MB7831 Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org Hi, looking at this bug report: https://bugzilla.kernel.org/show_bug.cgi?id=215799 I had an occasion to look at the way it registers the charger. In particular:  .type                   = POWER_SUPPLY_TYPE_BATTERY, That seems kind of wrong. It does not contain a battery, does it? The type seems to confound user space. Is there some deeper reason? If not how about the attached patch? Regards Oliver >From e1e7805585a979f74ba86a407ca8246a51c47a97 Mon Sep 17 00:00:00 2001 From: Oliver Neukum Date: Tue, 5 Apr 2022 11:40:39 +0200 Subject: [PATCH] apple-mfi-fastcharge: correct type This is a charger, not a battery. Signed-off-by: Oliver Neukum --- drivers/usb/misc/apple-mfi-fastcharge.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/misc/apple-mfi-fastcharge.c b/drivers/usb/misc/apple-mfi-fastcharge.c index ac8695195c13..b8b394df622f 100644 --- a/drivers/usb/misc/apple-mfi-fastcharge.c +++ b/drivers/usb/misc/apple-mfi-fastcharge.c @@ -157,7 +157,7 @@ static enum power_supply_property apple_mfi_fc_properties[] = { static const struct power_supply_desc apple_mfi_fc_desc = { .name = "apple_mfi_fastcharge", - .type = POWER_SUPPLY_TYPE_BATTERY, + .type = POWER_SUPPLY_TYPE_USB, .properties = apple_mfi_fc_properties, .num_properties = ARRAY_SIZE(apple_mfi_fc_properties), .get_property = apple_mfi_fc_get_property, -- 2.34.1