Source
x
static struct dwapb_gpio_port *dwapb_offs_to_port(struct dwapb_gpio *gpio, unsigned int offs)
/*
* Copyright (c) 2011 Jamie Iles
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*
* All enquiries to support@picochip.com
*/
/* register stride 32 bits */
/* register stride 3*32 bits */
/* register stride 3*32 bits */
struct dwapb_gpio;
/* 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;
u32 wake_en;
};
struct dwapb_gpio_port {
struct gpio_chip gc;
bool is_registered;
struct dwapb_gpio *gpio;
struct dwapb_context *ctx;
unsigned int idx;
};