lkml.org 
[lkml]   [2013]   [Nov]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH 1/2] isp1704_charger: Add DT support
Date
On Thursday 14 November 2013 13:38:53 Sebastian Reichel wrote:
> diff --git a/drivers/power/isp1704_charger.c
> b/drivers/power/isp1704_charger.c index fc04d19..db96778
> 100644
> --- a/drivers/power/isp1704_charger.c
> +++ b/drivers/power/isp1704_charger.c
> @@ -28,6 +28,8 @@
> #include <linux/platform_device.h>
> #include <linux/power_supply.h>
> #include <linux/delay.h>
> +#include <linux/of.h>
> +#include <linux/of_gpio.h>
>
> #include <linux/usb/otg.h>
> #include <linux/usb/ulpi.h>
> @@ -89,8 +91,8 @@ static void isp1704_charger_set_power(struct
> isp1704_charger *isp, bool on) {
> struct isp1704_charger_data *board =
> isp->dev->platform_data;
>
> - if (board && board->set_power)
> - board->set_power(on);
> + if (board)
> + gpio_set_value(board->enable_gpio, on);
> }
>

You need to check if enable_gpio in board data was defined or not.

--
Pali Rohár
pali.rohar@gmail.com
[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2013-11-14 19:41    [W:2.762 / U:0.396 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site