You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07:00
gpio/mxs: move irq_to_gpio() into gpio-mxs driver
As irq_to_gpio() is only being used by gpio-mxs driver, it should be moved from mach/gpio.h into gpio-mxs.c. Signed-off-by: Shawn Guo <shawn.guo@linaro.org> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
This commit is contained in:
@@ -30,6 +30,4 @@
|
|||||||
#define gpio_cansleep __gpio_cansleep
|
#define gpio_cansleep __gpio_cansleep
|
||||||
#define gpio_to_irq __gpio_to_irq
|
#define gpio_to_irq __gpio_to_irq
|
||||||
|
|
||||||
#define irq_to_gpio(irq) ((irq) - MXS_GPIO_IRQ_START)
|
|
||||||
|
|
||||||
#endif /* __MACH_MXS_GPIO_H__ */
|
#endif /* __MACH_MXS_GPIO_H__ */
|
||||||
|
|||||||
@@ -86,6 +86,8 @@
|
|||||||
.type = _type, \
|
.type = _type, \
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#define MXS_GPIO_NR(bank, nr) ((bank) * 32 + (nr))
|
||||||
|
|
||||||
#define MXS_SET_ADDR 0x4
|
#define MXS_SET_ADDR 0x4
|
||||||
#define MXS_CLR_ADDR 0x8
|
#define MXS_CLR_ADDR 0x8
|
||||||
#define MXS_TOG_ADDR 0xc
|
#define MXS_TOG_ADDR 0xc
|
||||||
|
|||||||
@@ -49,6 +49,8 @@
|
|||||||
#define GPIO_INT_LEV_MASK (1 << 0)
|
#define GPIO_INT_LEV_MASK (1 << 0)
|
||||||
#define GPIO_INT_POL_MASK (1 << 1)
|
#define GPIO_INT_POL_MASK (1 << 1)
|
||||||
|
|
||||||
|
#define irq_to_gpio(irq) ((irq) - MXS_GPIO_IRQ_START)
|
||||||
|
|
||||||
struct mxs_gpio_port {
|
struct mxs_gpio_port {
|
||||||
void __iomem *base;
|
void __iomem *base;
|
||||||
int id;
|
int id;
|
||||||
|
|||||||
Reference in New Issue
Block a user