Received: by 10.223.185.116 with SMTP id b49csp736640wrg; Tue, 20 Feb 2018 07:05:48 -0800 (PST) X-Google-Smtp-Source: AH8x227CP8pb0s+DOshmG+hGOb5qGMzaMNkY/mbbS0rVaw+B8Q046YkKpv48kIKO3abjltl7Qd/d X-Received: by 10.98.206.134 with SMTP id y128mr3465014pfg.34.1519139148470; Tue, 20 Feb 2018 07:05:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519139148; cv=none; d=google.com; s=arc-20160816; b=oJ8SFLmi/+BKD2Du2iQ18Gh4GrC0aOxUWX3x9rWdcx3x1w3Rh3CJyFQF7eobrxyOf/ d0TbhILvfTH5VmELX5JL2DIfThX7wW8XIeqdKfJKABoUWGpOfUbQ8aGG3Ir+OCM1KmoK D4qSYGb0B5cNeaMfnCJ6F5jFbcffvx1zgSeO1Yn49j+s0VSx/ADqQ1pl4WHI4b/shPVz fS9NAbK85lmG5hDHmm9biiP7Yr2FpR4NjnrIwEqUZmBxqCmy61FxJo0iD1byATrozAD0 gxtZpnRdUi+l/Xf5n3H13oZu/dPTp7BBKj0r914uRJVpxYGe+hgRd6fZvwaNcrLMPHLH MGLw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:to:cc:from:subject:message-id:date :mime-version:dkim-signature:arc-authentication-results; bh=v+bey6v1QcaMRa5BOJsywKWlgKf6dtM7WXUXJO/4cNU=; b=tSRNiUDXnWnm4S/+dUzN6RX7b7bGw8DnnbwENXc9CEn7RRkxYmv+CpC56uOV1GOnw7 xARwbp+UirqeORp34pCs97h2t5WpHM3a1bHnRHSsJFWvtOuGHeIDYgW8GPKuURSfne6R BmlUHpo6pPqDWnNHsmeA5ASbdHd7oO/byWaPXQ7qkm45/Bas5ZQIvd9FruZ1y89WkV64 IhkMf+sbHLT4zCkcXOOi7IWYc+rTo9QZ3F0WL7JvCMGRn5OwCoK3XTgIvwU1y8K9+n3M b43Aw5I3X2MNsgBfcUgmH7y2Dp02Hk+9v89cPnSz6fnANPiGPxhnjuuc1sBMuksgAxkY emzA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=j/855TXX; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f11si606298pgp.626.2018.02.20.07.05.34; Tue, 20 Feb 2018 07:05:48 -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=@google.com header.s=20161025 header.b=j/855TXX; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752171AbeBTPDu (ORCPT + 99 others); Tue, 20 Feb 2018 10:03:50 -0500 Received: from mail-it0-f74.google.com ([209.85.214.74]:43981 "EHLO mail-it0-f74.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752116AbeBTPDt (ORCPT ); Tue, 20 Feb 2018 10:03:49 -0500 Received: by mail-it0-f74.google.com with SMTP id k19so11880075ita.8 for ; Tue, 20 Feb 2018 07:03:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:date:message-id:subject:from:cc; bh=v+bey6v1QcaMRa5BOJsywKWlgKf6dtM7WXUXJO/4cNU=; b=j/855TXXiF/uY8JZruRQZvCgeBshQwe4gpCxvhCmwJQa4DgnGmymvgWf1ovvzuZTCn l0RoJelDY2VcJqwRovmzzCKTeJkbepQgYuODNA/sESjpsXuL8pQ7+xgBQHJwG5ozCrcB I4tBSj/RgI2EjPYyg10MSKPq48HTNCg8aVM1AtSQZB3tq7o0aIz6l4f/yHhyS82MgzsO e4oQ8C+mTUQNLt/geZSkG29/x36jhMTDVldiOXQIZ8Fwp9btczE2kT1cbUY/9C6daIvf dmSSi0V5aebO2YOL5cVSVS7+KcSvMDV0tlDVuO2IPuqIg/5Th3zCXusAe8EDIsGZ7xQC HCww== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:date:message-id:subject:from:cc; bh=v+bey6v1QcaMRa5BOJsywKWlgKf6dtM7WXUXJO/4cNU=; b=GQygbBSEcoCYXMBwrsJCuPndFVNSzqLbWMHVonRHuhJpLlp9OVqMrn1cbbNtSmKmcv cJv1AaoMrqE1PIVker5AS0+5ohgFwq6mutoOrwpx716HYAw5C8I7mcsrhyefc3UuzLHu W07rmYu47mlYUPWlmdY892v2jV1rxVo3LnPkd5DSTSDAN+wP7RWC9ojjiUIW132ILgbU PFEKQA+iUJWpOqe75vxcg+88QNkmFEyvRDT1PCWZnbgSnudMO5pK0kBmbyMFzXo9mgI2 e/Ba4AMyTZR400IaOSV8ltOVUIHA16BKnKsfN68Y5XJYza03/qMmrQqfPISkRAko/EgC /XTA== X-Gm-Message-State: APf1xPDrac0a3Wzrpj/AUqwjNzP6qFHhlzBwGyNmRu1hbvXvMa+QmmIv 4M2Jv/X/5knz9shTITwadhX9xeZ22szl MIME-Version: 1.0 X-Received: by 10.36.40.146 with SMTP id h140mr374972ith.44.1519139028637; Tue, 20 Feb 2018 07:03:48 -0800 (PST) Date: Tue, 20 Feb 2018 16:03:18 +0100 Message-Id: <20180220150318.138827-1-delroth@google.com> X-Mailer: git-send-email 2.16.1.291.g4437f3f132-goog Subject: [PATCH] max17042: propagate of_node to power supply device From: Pierre Bourdon Cc: Pierre Bourdon , Andre Heider , Sebastian Reichel , linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" To: unlisted-recipients:; (no To-header on input) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org max17042_get_status uses the core power_supply_am_i_supplied. That function relies on DT properties to figure out the power supply topology, and will error out without DT. Fixes max17042 battery status being reported as "unknown". Signed-off-by: Andre Heider --- drivers/power/supply/max17042_battery.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/power/supply/max17042_battery.c b/drivers/power/supply/max17042_battery.c index 35dde81b1c9b..1a568df383db 100644 --- a/drivers/power/supply/max17042_battery.c +++ b/drivers/power/supply/max17042_battery.c @@ -1053,6 +1053,7 @@ static int max17042_probe(struct i2c_client *client, i2c_set_clientdata(client, chip); psy_cfg.drv_data = chip; + psy_cfg.of_node = dev->of_node; /* When current is not measured, * CURRENT_NOW and CURRENT_AVG properties should be invisible. */ -- 2.16.1.291.g4437f3f132-goog