lkml.org 
[lkml]   [2014]   [Sep]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 4/4 v3] GPIO: gpio-dwapb: Suspend & Resume PM enabling
On Tue, 9 Sep 2014, Weike Chen wrote:

>
> struct dwapb_gpio;
> +struct dwapb_context;
>
> struct dwapb_gpio_port {
> struct bgpio_chip bgc;
> bool is_registered;
> struct dwapb_gpio *gpio;
> + struct dwapb_context *ctx;

Alvin,

Will this build if CONFIG_PM_SLEEP is not defined?

Alan

> + unsigned int idx;
> };
>

> struct dwapb_gpio {
> @@ -377,6 +380,7 @@ static int dwapb_gpio_add_port(struct dwapb_gpio *gpio,
>
> port = &gpio->ports[offs];
> port->gpio = gpio;
> + port->idx = pp->idx;
>
> dat = gpio->regs + GPIO_EXT_PORTA + (pp->idx * GPIO_EXT_PORT_SIZE);
> set = gpio->regs + GPIO_SWPORTA_DR + (pp->idx * GPIO_SWPORT_DR_SIZE);
> @@ -584,10 +588,115 @@ static const struct of_device_id dwapb_of_match[] = {
> };
> MODULE_DEVICE_TABLE(of, dwapb_of_match);
>
> +#ifdef CONFIG_PM_SLEEP
> +/* Store GPIO context across system-wide suspend/resume transitions */
> +struct dwapb_context {
> + u32 data;
> + u32 dir;
> + u32 ext;
> + u32 int_en;
> + u32 int_mask;
> + u32 int_type;
> + u32 int_pol;
> + u32 int_deb;
> +};
> +


\
 
 \ /
  Last update: 2014-09-11 19:41    [W:0.163 / U:0.400 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site