/* * include/linux/mfd/ac100/core.h -- Core interface for AC100 * * Copyright 2009 Wolfson Microelectronics PLC. * * Author: Mark Brown * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the * Free Software Foundation; either version 2 of the License, or (at your * option) any later version. * */ #ifndef __MFD_AC100_CORE_H__ #define __MFD_AC100_CORE_H__ #include #include /* GPIOs in the chip are numbered from 1-11 */ #define AC100_IRQ_GPIO(x) (x + AC100_IRQ_TEMP_WARN) struct ac100 { struct mutex irq_lock; struct device *dev; struct regmap *regmap; int irq; }; /* Device I/O API */ int ac100_reg_read(struct ac100 *ac100, unsigned short reg); int ac100_reg_write(struct ac100 *ac100, unsigned short reg, unsigned short val); int ac100_set_bits(struct ac100 *ac100, unsigned short reg, unsigned short mask, unsigned short val); #endif