gpio: Cleanup DW gpio driver
This patch addresses the following issues: * Aligns the Kconfig code style with Zephyr projects requirements. * Removes redundant "depends on" from Kconfig. * Adds static to the gpio_dw_isr declaration. * Adds guards to the header files. Change-Id: I1ae70868f0bda97891cbeb494e5efba1bd537aa1 Signed-off-by: Vincenzo Frascino <vincenzo.frascino@linaro.org>
This commit is contained in:
parent
0ff548a0e0
commit
add1b55dca
4 changed files with 18 additions and 15 deletions
|
@ -29,19 +29,16 @@ if GPIO_DW
|
|||
config GPIO_DW_SHARED_IRQ
|
||||
bool
|
||||
default n
|
||||
depends on GPIO_DW
|
||||
|
||||
config GPIO_DW_INIT_PRIORITY
|
||||
int
|
||||
default 60
|
||||
depends on GPIO_DW
|
||||
prompt "Init priority"
|
||||
help
|
||||
Device driver initialization priority.
|
||||
|
||||
config GPIO_DW_CLOCK_GATE
|
||||
bool "Enable glock gating"
|
||||
depends on GPIO_DW
|
||||
select CLOCK_CONTROL
|
||||
default n
|
||||
|
||||
|
@ -52,10 +49,9 @@ config GPIO_DW_CLOCK_GATE_DRV_NAME
|
|||
|
||||
config GPIO_DW_0
|
||||
bool "Designware GPIO block 0"
|
||||
depends on GPIO_DW
|
||||
default n
|
||||
help
|
||||
Include Designware GPIO driver
|
||||
Include Designware GPIO driver
|
||||
|
||||
config GPIO_DW_0_NAME
|
||||
string "Driver name"
|
||||
|
@ -98,14 +94,13 @@ config GPIO_DW_0_IRQ_PRI
|
|||
int "Controller interrupt priority"
|
||||
depends on GPIO_DW_0 && GPIO_DW_0_IRQ_DIRECT
|
||||
help
|
||||
IRQ priority
|
||||
IRQ priority
|
||||
|
||||
config GPIO_DW_1
|
||||
bool "Designware GPIO block 1"
|
||||
depends on GPIO_DW
|
||||
default n
|
||||
help
|
||||
Include Designware GPIO driver
|
||||
Include Designware GPIO driver
|
||||
|
||||
config GPIO_DW_1_NAME
|
||||
string "Driver name"
|
||||
|
@ -148,14 +143,13 @@ config GPIO_DW_1_IRQ_PRI
|
|||
int "Controller interrupt priority"
|
||||
depends on GPIO_DW_1 && GPIO_DW_1_IRQ_DIRECT
|
||||
help
|
||||
IRQ priority
|
||||
IRQ priority
|
||||
|
||||
config GPIO_DW_2
|
||||
bool "Designware GPIO block 1"
|
||||
depends on GPIO_DW
|
||||
default n
|
||||
help
|
||||
Include Designware GPIO driver
|
||||
Include Designware GPIO driver
|
||||
|
||||
config GPIO_DW_2_NAME
|
||||
string "Driver name"
|
||||
|
@ -198,14 +192,13 @@ config GPIO_DW_2_IRQ_PRI
|
|||
int "Controller interrupt priority"
|
||||
depends on GPIO_DW_2 && GPIO_DW_2_IRQ_DIRECT
|
||||
help
|
||||
IRQ priority
|
||||
IRQ priority
|
||||
|
||||
config GPIO_DW_3
|
||||
bool "Designware GPIO block 1"
|
||||
depends on GPIO_DW
|
||||
default n
|
||||
help
|
||||
Include Designware GPIO driver
|
||||
Include Designware GPIO driver
|
||||
|
||||
config GPIO_DW_3_NAME
|
||||
string "Driver name"
|
||||
|
|
|
@ -407,7 +407,7 @@ static inline void gpio_dw_unmask_int(uint32_t mask_addr)
|
|||
#define gpio_dw_unmask_int(...)
|
||||
#endif
|
||||
|
||||
void gpio_dw_isr(void *arg)
|
||||
static void gpio_dw_isr(void *arg)
|
||||
{
|
||||
struct device *port = (struct device *)arg;
|
||||
struct gpio_dw_runtime *context = port->driver_data;
|
||||
|
|
|
@ -14,6 +14,9 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef _GPIO_DW_H_
|
||||
#define _GPIO_DW_H_
|
||||
|
||||
#include <stdint.h>
|
||||
#include <gpio.h>
|
||||
#include "gpio_dw_registers.h"
|
||||
|
@ -61,3 +64,5 @@ struct gpio_dw_runtime {
|
|||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _GPIO_DW_H_ */
|
||||
|
|
|
@ -16,6 +16,9 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef _GPIO_DW_REGISTERS_H_
|
||||
#define _GPIO_DW_REGISTERS_H_
|
||||
|
||||
#ifdef CONFIG_SOC_QUARK_SE_C1000_SS
|
||||
#define SWPORTA_DR 0x00
|
||||
#define SWPORTA_DDR 0x01
|
||||
|
@ -67,3 +70,5 @@
|
|||
#endif
|
||||
|
||||
#define LS_SYNC_POS (0)
|
||||
|
||||
#endif /* _GPIO_DW_REGISTERS_H_ */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue