Received: by 2002:a25:683:0:0:0:0:0 with SMTP id 125csp372037ybg; Mon, 1 Jun 2020 03:43:07 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwoc5cZYzgXZtZL6DA2iu9lOzqlOkf2wGFs6SdglENIBAsvLZUdsVPv57FC9TdYzl39xTpE X-Received: by 2002:a50:dac4:: with SMTP id s4mr21664629edj.84.1591008187015; Mon, 01 Jun 2020 03:43:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591008187; cv=none; d=google.com; s=arc-20160816; b=dTwx8mghGYA62Tw7JOF+KbyhPNtwTvTflfBi26pADl0VFP2rYS5jP5Fe3pgf9a3uuB kK6Y47SdYMCJwFrQF+87aLmlwmQMWRLqnHGntUYCDvtjLiM+u1Nq846wtjqOJ4Xx/Nna rqXKMdT7y68RgvsQWDF/m7kD7hs5K4acfAIj6VPwVzdr+DnAcUyiHgvLEqiUjI/isdbK 9cXSylZBwTd6tmdadJHdH7SQUA6Rj6kLY2aq89d7xSDgJtfUd3TYE5JOSp157hGfD20h GM1JaRhkC35DMKXcopN/P2wcF7YDEywtXPWeX7JmCNJv98sMgCncCwS1NEUQu1HTYE2q V/fA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:cms-type:content-language :content-transfer-encoding:in-reply-to:mime-version:user-agent:date :message-id:from:cc:to:subject:dkim-signature:dkim-filter; bh=/Gdbip4R8JUAfQa6cujlq0e0Q4h2fBOUhAoNV4LwAeo=; b=lJY5Ni1m46/IJlYJRcuFkaWVWsxbTpdYyicaLgr5WYFWeN6vbIHjPKCq2SFyokxtby jkoi36FmS0pdq6hAZTXeF+3m5C/eScSfqNgDoqNii2lD7CLZ0Co5TdgSb0BoWDLkfxya AbFqq/0rZrVk68fueJzPbZHc5qXOWNPcwk5MtdM9FAu/DC/kL2CnXfHjb9Ubf18zAO4G 4ExiNoqJSSsoBIXPQ/6W4w0R0QhcDVymwYaNKlj76GjTOnF0DRySd+1Z5TDpQiMjwwyF RocPmyXdzP8tq08UqE2u9E0MaK/lzNtI/AeervYVWhbbUiaAkVlO/Af9E9/k356kqrG3 UxSw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=VqZYir9k; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id v26si3763719ejb.491.2020.06.01.03.42.43; Mon, 01 Jun 2020 03:43:07 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=VqZYir9k; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726133AbgFAKkc (ORCPT + 99 others); Mon, 1 Jun 2020 06:40:32 -0400 Received: from mailout1.w1.samsung.com ([210.118.77.11]:45180 "EHLO mailout1.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726075AbgFAKka (ORCPT ); Mon, 1 Jun 2020 06:40:30 -0400 Received: from eucas1p2.samsung.com (unknown [182.198.249.207]) by mailout1.w1.samsung.com (KnoxPortal) with ESMTP id 20200601104028euoutp0113e9a56b32949e8e053df13566f2738a~UZV9vqnzs2027720277euoutp01C for ; Mon, 1 Jun 2020 10:40:28 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.w1.samsung.com 20200601104028euoutp0113e9a56b32949e8e053df13566f2738a~UZV9vqnzs2027720277euoutp01C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1591008028; bh=/Gdbip4R8JUAfQa6cujlq0e0Q4h2fBOUhAoNV4LwAeo=; h=Subject:To:Cc:From:Date:In-Reply-To:References:From; b=VqZYir9kppvdPXw6Bbip7iz3RaeY/1E9izZyW1Mt7WUOnEmQd0XkDyCFXB1iSZsv3 VYsvblNFL7er/ORRMEn+5jhtosAixDAm1eE2DIV5jGEMC09BhgtFQ8MJUNRvRa1AsY tsedVhOblA2VPkIB5/hKOYM/josL9F37NM3XmiMc= Received: from eusmges3new.samsung.com (unknown [203.254.199.245]) by eucas1p1.samsung.com (KnoxPortal) with ESMTP id 20200601104028eucas1p18a9b6c867e9c4cb90d5a9a9ad0212728~UZV9f-sJg2526625266eucas1p13; Mon, 1 Jun 2020 10:40:28 +0000 (GMT) Received: from eucas1p1.samsung.com ( [182.198.249.206]) by eusmges3new.samsung.com (EUCPMTA) with SMTP id 27.93.60698.C1BD4DE5; Mon, 1 Jun 2020 11:40:28 +0100 (BST) Received: from eusmtrp2.samsung.com (unknown [182.198.249.139]) by eucas1p2.samsung.com (KnoxPortal) with ESMTPA id 20200601104027eucas1p2b076ee860520d709e8178c41550653f7~UZV8wqHUV1744917449eucas1p2J; Mon, 1 Jun 2020 10:40:27 +0000 (GMT) Received: from eusmgms1.samsung.com (unknown [182.198.249.179]) by eusmtrp2.samsung.com (KnoxPortal) with ESMTP id 20200601104027eusmtrp2b227ba4119a30344c41228ead9a83b91~UZV8v9bf90787807878eusmtrp2b; Mon, 1 Jun 2020 10:40:27 +0000 (GMT) X-AuditID: cbfec7f5-a29ff7000001ed1a-82-5ed4db1c01cf Received: from eusmtip1.samsung.com ( [203.254.199.221]) by eusmgms1.samsung.com (EUCPMTA) with SMTP id 2E.7A.08375.B1BD4DE5; Mon, 1 Jun 2020 11:40:27 +0100 (BST) Received: from [106.210.88.143] (unknown [106.210.88.143]) by eusmtip1.samsung.com (KnoxPortal) with ESMTPA id 20200601104027eusmtip1adaa625ff84700328004b3295bca4bce~UZV8NBDXU0602606026eusmtip1Y; Mon, 1 Jun 2020 10:40:27 +0000 (GMT) Subject: Re: [PATCHv1 00/19] Improve SBS battery support To: Sebastian Reichel , Sebastian Reichel , Rob Herring , Greg Kroah-Hartman , "Rafael J . Wysocki" Cc: linux-pm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, kernel@collabora.com, 'Linux Samsung SOC' From: Marek Szyprowski Message-ID: <15933a91-dd89-1f94-c2f2-79be4395f4c1@samsung.com> Date: Mon, 1 Jun 2020 12:40:27 +0200 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.8.1 MIME-Version: 1.0 In-Reply-To: <20200513185615.508236-1-sebastian.reichel@collabora.com> Content-Transfer-Encoding: 8bit Content-Language: en-US X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFtrKKsWRmVeSWpSXmKPExsWy7djPc7oyt6/EGbz7rGIx/8g5VovmxevZ LDaf62G1uLxrDpvF594jjBYzzu9jspj7ZSqzReveI+wWd1/7WZzeXeLA5bHj7hJGj02rOtk8 9s9dw+7xeZNcAEsUl01Kak5mWWqRvl0CV8a3D1OYChqkKp5MPsPUwHhQrIuRk0NCwETi/cMr 7F2MXBxCAisYJdYdvcwI4XxhlDh94j5U5jOjxJp3SxhhWj62XmeCSCxnlHj77ycrhPOeUWLl t/1sIFXCAhYSXxb9BmsXEbjDKHHnzCtWkASzwEpGiS/9ISA2m4ChRNfbLrAGXgE7iUW/T4LV sAioSPw9vBJsnahArETP/VfMEDWCEidnPmEBsTkF3CSmTX3ICDFTXqJ562xmCFtc4taT+WDn SQgcYpeYvvA0K8TdLhJXjtyAsoUlXh3fwg5hy0j83wnT0Mwo8fDcWnYIp4dR4nLTDKivrSXu nPsFdCoH0ApNifW79CHCjhITD+9mBglLCPBJ3HgrCHEEn8SkbdOhwrwSHW1CEN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vh8DBGCGB9MSS1OzU1ILUIpg+Jg5OqQZG3zizWy8y5my6oz9LIp/n4TPX r8o/qqcymCh/Xf8iof4m97m+4y777CM23ti2yXHio8YCbhHrAyWFPEvuG007Hpf/5siqZ8pJ fk9f/57y8r3R6ZDr27nyXe6c4jLjkbK4yZxr9qyf4c6a450HZVd+C1t+Z55ymkekcuquyQ9y 7UKDzsTJGug4KbEUZyQaajEXFScCAFjiS2TXAgAA X-CMS-MailID: 20200601104027eucas1p2b076ee860520d709e8178c41550653f7 X-Msg-Generator: CA Content-Type: text/plain; charset="utf-8" X-RootMTR: 20200601104027eucas1p2b076ee860520d709e8178c41550653f7 X-EPHeader: CA CMS-TYPE: 201P X-CMS-RootMailID: 20200601104027eucas1p2b076ee860520d709e8178c41550653f7 References: <20200513185615.508236-1-sebastian.reichel@collabora.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Sebastian, On 13.05.2020 20:55, Sebastian Reichel wrote: > This patchset improves support for SBS compliant batteries. Due to > the changes, the battery now exposes 32 power supply properties and > (un)plugging it generates a backtrace containing the following message > without the first patch in this series: > > --------------------------- > WARNING: CPU: 0 PID: 20 at lib/kobject_uevent.c:659 add_uevent_var+0xd4/0x104 > add_uevent_var: too many keys > --------------------------- > > For references this is what an SBS battery status looks like after > the patch series has been applied: > > cat /sys/class/power_supply/sbs-0-000b/uevent > POWER_SUPPLY_NAME=sbs-0-000b > POWER_SUPPLY_TYPE=Battery > POWER_SUPPLY_STATUS=Discharging > POWER_SUPPLY_CAPACITY_LEVEL=Normal > POWER_SUPPLY_HEALTH=Good > POWER_SUPPLY_PRESENT=1 > POWER_SUPPLY_TECHNOLOGY=Li-ion > POWER_SUPPLY_CYCLE_COUNT=12 > POWER_SUPPLY_VOLTAGE_NOW=11441000 > POWER_SUPPLY_CURRENT_NOW=-26000 > POWER_SUPPLY_CURRENT_AVG=-24000 > POWER_SUPPLY_CAPACITY=76 > POWER_SUPPLY_CAPACITY_ERROR_MARGIN=1 > POWER_SUPPLY_TEMP=198 > POWER_SUPPLY_TIME_TO_EMPTY_AVG=438600 > POWER_SUPPLY_TIME_TO_FULL_AVG=3932100 > POWER_SUPPLY_SERIAL_NUMBER=0000 > POWER_SUPPLY_VOLTAGE_MIN_DESIGN=10800000 > POWER_SUPPLY_VOLTAGE_MAX_DESIGN=10800000 > POWER_SUPPLY_ENERGY_NOW=31090000 > POWER_SUPPLY_ENERGY_FULL=42450000 > POWER_SUPPLY_ENERGY_FULL_DESIGN=41040000 > POWER_SUPPLY_CHARGE_NOW=2924000 > POWER_SUPPLY_CHARGE_FULL=3898000 > POWER_SUPPLY_CHARGE_FULL_DESIGN=3800000 > POWER_SUPPLY_CONSTANT_CHARGE_CURRENT_MAX=3000000 > POWER_SUPPLY_CONSTANT_CHARGE_VOLTAGE_MAX=12300000 > POWER_SUPPLY_MANUFACTURE_YEAR=2017 > POWER_SUPPLY_MANUFACTURE_MONTH=7 > POWER_SUPPLY_MANUFACTURE_DAY=3 > POWER_SUPPLY_MANUFACTURER=UR18650A > POWER_SUPPLY_MODEL_NAME=GEHC This patch landed in linux-next dated 20200529. Sadly it causes a regression on Samsung Exynos-based Chromebooks (Exynos5250 Snow, Exynos5420 Peach-Pi and Exynos5800 Peach-Pit). System boots to userspace, but then, when udev populates /dev, booting hangs: [    4.435167] VFS: Mounted root (ext4 filesystem) readonly on device 179:51. [    4.457477] devtmpfs: mounted [    4.460235] Freeing unused kernel memory: 1024K [    4.464022] Run /sbin/init as init process INIT: version 2.88 booting [info] Using makefile-style concurrent boot in runlevel S. [    5.102096] random: crng init done [....] Starting the hotplug events dispatcher: systemd-udevdstarting version 236 [ ok . [....] Synthesizing the initial hotplug events...[ ok done. [....] Waiting for /dev to be fully populated...[   34.409914] TPS65090_RAILSDCDC1: disabling [   34.412977] TPS65090_RAILSDCDC2: disabling [   34.417021] TPS65090_RAILSDCDC3: disabling [   34.423848] TPS65090_RAILSLDO1: disabling [   34.429068] TPS65090_RAILSLDO2: disabling Bisect between v5.7-rc1 and next-20200529 pointed me to the first bad commit: [c4b12a2f3f3de670f6be5e96092a2cab0b877f1a] power: supply: sbs-battery: simplify read_read_string_data. However reverting it in linux-next doesn't fix the issue, so the next commits are also relevant to this issue. Let me know how can I help debugging it. Best regards -- Marek Szyprowski, PhD Samsung R&D Institute Poland