Received: by 2002:ac0:946b:0:0:0:0:0 with SMTP id j40csp3548764imj; Tue, 12 Feb 2019 00:07:12 -0800 (PST) X-Google-Smtp-Source: AHgI3IZaDZKhmqSxWqHFsZ3QSUuY5WHn8gDWvVXgK95yjEl8l7m3KvfuP/4LIxTrI3p/xIqvzIWf X-Received: by 2002:a17:902:8695:: with SMTP id g21mr2750840plo.83.1549958832852; Tue, 12 Feb 2019 00:07:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1549958832; cv=none; d=google.com; s=arc-20160816; b=gtegZ48RfmSw2W5jyhDrP3Kd5PzsG29zY97Gn9WHEe1BFDyTjFtG2PyazpaUxp3zos p2K5y6F5OEn6Mq8h1/MEzqzPA1M7vXcYMGyLpM1mMufHBs10Q72VLHwnXaB3wi0oHbjn Fc6ZB4Oe0LB4owr8I/4Y0Y1TKsVz7HAYBFNYOFD2awStAjQsU2oSBrNNVTYegfYwlxpt eVjUEVasv9ewzkUPbvKcmy58+Jc8endpNCk1+xTcwFIKG7JCjtAHzwKb5GWyOCU3wWHm 9OYTGhON0t5gBPcYMZ+j4ml6nhPG4+qVbGbKbXAImxTpgrPK13U6v/c6xdm8I7Qt/g0i a44A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=eHJkSX0fZXk9ABC8wJBTZEetst3yQeVYI3nsA3YALSs=; b=ggCNgCBEwQxHt7kyPZjaM/PAdpTp5XYdHnnWHlDkYjmEO5MQscXnzaoairA67iCt5d Rfklzt0SPbcYzmDhl184chn9EiN6tSL4Hwl/9DsS17k0TqLgTkpezxNVl7xBRjvAfy/F rssK6D+B7buMDBOWp86AXu5Jj1LHzZ0pWfcJ7Kfbi5G7f7HwyVJEOHNQvd8S+CIQhKya AMFmNuAjK3c4eShVXXC5nWfvuAspPFUHTFWOj0NZebG7YCzH2MfxIpUIPXZpbhcyH+jJ Ktw8YXL5UI1SaMkBAcH4MNSdVITKagDR15s/58xOyN8P7BE8/2udO/wT1aIxiZvsYZIX zm5g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ayQegR8o; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u8si12973833plh.385.2019.02.12.00.06.55; Tue, 12 Feb 2019 00:07:12 -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; dkim=pass header.i=@linaro.org header.s=google header.b=ayQegR8o; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728291AbfBLIFC (ORCPT + 99 others); Tue, 12 Feb 2019 03:05:02 -0500 Received: from mail-wr1-f67.google.com ([209.85.221.67]:32933 "EHLO mail-wr1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728165AbfBLIFB (ORCPT ); Tue, 12 Feb 2019 03:05:01 -0500 Received: by mail-wr1-f67.google.com with SMTP id i12so1607107wrw.0 for ; Tue, 12 Feb 2019 00:05:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=eHJkSX0fZXk9ABC8wJBTZEetst3yQeVYI3nsA3YALSs=; b=ayQegR8oQ7EhljFSSaOU9zzHliIVjm15DnGnbc1m7oxEnKNo5BFG5ZpVeibVjxOdnq 2rm3UgvVuKjsAz7kdVbTgX2vMBVQoTFhPu6oMx/Qdi26CSm6lJim5v1Td4IatH8GA2ol arJF3y6EyD1f2fgGf1HE6reNnwPwYsmC81HKTKsAHBqRLR24orNFaK4xCQRdx5/k7hK/ GJaqfcuY0zXdGueo4VtZ8GGTtbPN8bmReT/LxJ8PrzQ5ZOMOsi7PP06jG3wy9Wc4WgPA FMhVP1gDDN2cCPGCuYwGh97C8yUHGEQ363fCfZNiy/YFLDP4OfhXlJQHTjdYljjXPoPj Q/Zg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to:user-agent; bh=eHJkSX0fZXk9ABC8wJBTZEetst3yQeVYI3nsA3YALSs=; b=ZQSfZhqIWXYZxXzSF+IyPwFW7eudN8yW7o18NfIS3kOJl8N5KXIHkqAWypoId0Hd1O vUj2OWAnfCAn450HqE4Eh0LziFYrbsl9BH2uM1vPLTybAVFDH4zTZBN5OHp5So/CFYi2 qfWiY7KfqzneSNIDba9tAyXlhNtyawiO96hSvvnHJ1gXayNj61vlhoLDjiczw8EWlxEj ssbqcxBnJmNbJgBwvMUh3tdG944zFTM4GopEg3W12xfhROu2GJ3GHOly4ZEhO1sAEx1M 6rfPDiP6AEyJrS4Xkrcfrb9ArnPUXi62OuZCXe8K9/ij4V+lZyqgd/ynCQHYSOTh4fVK SgoQ== X-Gm-Message-State: AHQUAuZdeDisdzc7Ac1F8qol5jRwZ4W2hSkGA55zmiq2YizXc/TLBrHQ sXcnwwAvlMwRoDcFJ5JDimD4zQ== X-Received: by 2002:adf:e8d2:: with SMTP id k18mr1870350wrn.262.1549958700005; Tue, 12 Feb 2019 00:05:00 -0800 (PST) Received: from dell ([2.27.35.171]) by smtp.gmail.com with ESMTPSA id p6sm4271293wre.63.2019.02.12.00.04.58 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 12 Feb 2019 00:04:59 -0800 (PST) Date: Tue, 12 Feb 2019 08:04:57 +0000 From: Lee Jones To: Mark Zhang Cc: blaws05@gmail.com, robh+dt@kernel.org, mark.rutland@arm.com, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-tegra@vger.kernel.org Subject: Re: [PATCH v2 0/4] Add max77620 charging & low battery support Message-ID: <20190212080457.GL20638@dell> References: <20190129085531.32364-1-markz@nvidia.com> <20190207084836.GF4672@dell> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.9.4 (2018-02-28) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 12 Feb 2019, Mark Zhang wrote: > On 2/7/2019 4:48 PM, Lee Jones wrote: > > On Tue, 29 Jan 2019, Mark Zhang wrote: > > > >> This patch set adds support for max77620 backup battery charging and > >> low battery monitoring. > >> > >> Changes in v2: > >> - Add devicetree binding documentation > >> > >> Mark Zhang (4): > >> mfd: max77620: Add backup battery charger support > >> mfd: max77620: add documentation for backup battery charging > >> mfd: max77620: Add low battery monitor support > >> mfd: max77620: add documentation for low battery monitoring > >> > >> .../devicetree/bindings/mfd/max77620.txt | 34 +++++ > >> drivers/mfd/max77620.c | 137 +++++++++++++++++- > > > > All of this needs moving out to the correct subsystem. > > > > drivers/power/supply/max77620-battery.c looks right. > > Actually max77620 is not a power supply device. This patch set adds 2 > features: > - Backup battery charger. The RTC in max77620 is supplied from a backup > battery and consumes 2.0uA when no other power sources are available. So > basically this is not a system battery charger, it's just for RTC. > - Low battery monitoring. This is for monitoring the system main battery > voltage, so max77620 can shutdown or reset the SoC accordingly. But I > think this doesn't conform the idea of "power supply" driver as well. Most other battery handling seems to happen in drivers/power/supply/*.battery*. If that's not the right location, then you need to find a place for it to go. MFDs do not provide useful functionality per say - that is the role of the child devices. -- Lee Jones [李琼斯] Linaro Services Technical Lead Linaro.org │ Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog