Thread (72 messages) 72 messages, 8 authors, 2017-01-29

[PATCH 17/22] power: supply: add battery driver for AXP20X and AXP22X PMICs

From: sre@kernel.org (Sebastian Reichel)
Date: 2017-01-06 02:47:40
Also in: linux-devicetree, linux-iio, linux-pm, lkml

Hi,

On Thu, Jan 05, 2017 at 02:34:48PM -0300, Ezequiel Garcia wrote:
quoted
+static int axp20x_power_probe(struct platform_device *pdev)
+{
+       struct axp20x_dev *axp20x = dev_get_drvdata(pdev->dev.parent);
+       struct axp20x_batt_ps *axp20x_batt;
+       struct power_supply_config psy_cfg = {};
+
To be consistent with the AC power supply and USB power supply,
you might want to call of_device_is_available() here.
Otherwise, the device probes even if "disabled" in the DTS.
I would expect that check in the mfd code. Probe should not be
called at all if the sub-device is disabled.

-- Sebastian
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20170106/306245c1/attachment.sig>
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help