From 9f757f415210a7c85e2784e4a1733ea78b2e4e88 Mon Sep 17 00:00:00 2001 From: Federico Vaga Date: Tue, 18 Jul 2017 08:32:53 +0200 Subject: drivers/fmc: hide fmc operations behind helpers This gave us more freedom to change/add/remove operations without recompiling all device driver. Typically, Carrier board implement the fmc operations, so they will not use these helpers. Signed-off-by: Federico Vaga Tested-by: Pat Riehecky Acked-by: Alessandro Rubini Signed-off-by: Greg Kroah-Hartman --- include/linux/fmc.h | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'include/linux/fmc.h') diff --git a/include/linux/fmc.h b/include/linux/fmc.h index a5f0aa5c2a8d..8bb4a154bbdc 100644 --- a/include/linux/fmc.h +++ b/include/linux/fmc.h @@ -234,4 +234,22 @@ extern void fmc_free_id_info(struct fmc_device *fmc); extern void fmc_dump_eeprom(const struct fmc_device *fmc); extern void fmc_dump_sdb(const struct fmc_device *fmc); +/* helpers for FMC operations */ +extern int fmc_irq_request(struct fmc_device *fmc, irq_handler_t h, + char *name, int flags); +extern void fmc_irq_free(struct fmc_device *fmc); +extern void fmc_irq_ack(struct fmc_device *fmc); +extern int fmc_validate(struct fmc_device *fmc, struct fmc_driver *drv); +extern int fmc_gpio_config(struct fmc_device *fmc, struct fmc_gpio *gpio, + int ngpio); +extern int fmc_read_ee(struct fmc_device *fmc, int pos, void *d, int l); +extern int fmc_write_ee(struct fmc_device *fmc, int pos, const void *d, int l); + +/* helpers for FMC operations */ +extern int fmc_irq_request(struct fmc_device *fmc, irq_handler_t h, + char *name, int flags); +extern void fmc_irq_free(struct fmc_device *fmc); +extern void fmc_irq_ack(struct fmc_device *fmc); +extern int fmc_validate(struct fmc_device *fmc, struct fmc_driver *drv); + #endif /* __LINUX_FMC_H__ */ -- cgit v1.2.3