lkml.org 
[lkml]   [2018]   [Feb]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH] max17042: propagate of_node to power supply device
On Tue, Feb 20, 2018 at 5:03 PM, Pierre Bourdon <delroth@google.com> wrote:
> 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.

> + psy_cfg.of_node = dev->of_node;

Perhaps do this in general manner, see how GPIOLIB takes care of it:

$ git grep -n -A4 -w CONFIG_OF_GPIO -- drivers/gpio/gpiolib.c
drivers/gpio/gpiolib.c:1161:#ifdef CONFIG_OF_GPIO
drivers/gpio/gpiolib.c-1162- /* If the gpiochip has an assigned OF
node this takes precedence */
drivers/gpio/gpiolib.c-1163- if (chip->of_node)
drivers/gpio/gpiolib.c-1164- gdev->dev.of_node = chip->of_node;
drivers/gpio/gpiolib.c-1165-#endif
...

--
With Best Regards,
Andy Shevchenko

\
 
 \ /
  Last update: 2018-02-20 18:35    [W:0.054 / U:1.016 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site