#include <linux/bitfield.h>
#include <linux/module.h>
#include <linux/of.h>
#include <linux/of_device.h>
#include <linux/platform_device.h>
#include <linux/mfd/core.h>
#include "mc13xxx.h"
#define MC13XXX_IRQSTAT0 …
#define MC13XXX_IRQMASK0 …
#define MC13XXX_IRQSTAT1 …
#define MC13XXX_IRQMASK1 …
#define MC13XXX_REVISION …
#define MC13XXX_REVISION_REVMETAL …
#define MC13XXX_REVISION_REVFULL …
#define MC13XXX_REVISION_ICID …
#define MC13XXX_REVISION_FIN …
#define MC13XXX_REVISION_FAB …
#define MC13XXX_REVISION_ICIDCODE …
#define MC34708_REVISION_REVMETAL …
#define MC34708_REVISION_REVFULL …
#define MC34708_REVISION_FIN …
#define MC34708_REVISION_FAB …
#define MC13XXX_PWRCTRL …
#define MC13XXX_PWRCTRL_WDIRESET …
#define MC13XXX_ADC1 …
#define MC13XXX_ADC1_ADEN …
#define MC13XXX_ADC1_RAND …
#define MC13XXX_ADC1_ADSEL …
#define MC13XXX_ADC1_ASC …
#define MC13XXX_ADC1_ADTRIGIGN …
#define MC13XXX_ADC2 …
void mc13xxx_lock(struct mc13xxx *mc13xxx)
{ … }
EXPORT_SYMBOL(…);
void mc13xxx_unlock(struct mc13xxx *mc13xxx)
{ … }
EXPORT_SYMBOL(…);
int mc13xxx_reg_read(struct mc13xxx *mc13xxx, unsigned int offset, u32 *val)
{ … }
EXPORT_SYMBOL(…);
int mc13xxx_reg_write(struct mc13xxx *mc13xxx, unsigned int offset, u32 val)
{ … }
EXPORT_SYMBOL(…);
int mc13xxx_reg_rmw(struct mc13xxx *mc13xxx, unsigned int offset,
u32 mask, u32 val)
{ … }
EXPORT_SYMBOL(…);
int mc13xxx_irq_mask(struct mc13xxx *mc13xxx, int irq)
{ … }
EXPORT_SYMBOL(…);
int mc13xxx_irq_unmask(struct mc13xxx *mc13xxx, int irq)
{ … }
EXPORT_SYMBOL(…);
int mc13xxx_irq_status(struct mc13xxx *mc13xxx, int irq,
int *enabled, int *pending)
{ … }
EXPORT_SYMBOL(…);
int mc13xxx_irq_request(struct mc13xxx *mc13xxx, int irq,
irq_handler_t handler, const char *name, void *dev)
{ … }
EXPORT_SYMBOL(…);
int mc13xxx_irq_free(struct mc13xxx *mc13xxx, int irq, void *dev)
{ … }
EXPORT_SYMBOL(…);
static void mc13xxx_print_revision(struct mc13xxx *mc13xxx, u32 revision)
{ … }
static void mc34708_print_revision(struct mc13xxx *mc13xxx, u32 revision)
{ … }
struct mc13xxx_variant mc13xxx_variant_mc13783 = …;
EXPORT_SYMBOL_GPL(…);
struct mc13xxx_variant mc13xxx_variant_mc13892 = …;
EXPORT_SYMBOL_GPL(…);
struct mc13xxx_variant mc13xxx_variant_mc34708 = …;
EXPORT_SYMBOL_GPL(…);
static const char *mc13xxx_get_chipname(struct mc13xxx *mc13xxx)
{ … }
int mc13xxx_get_flags(struct mc13xxx *mc13xxx)
{ … }
EXPORT_SYMBOL(…);
#define MC13XXX_ADC1_CHAN0_SHIFT …
#define MC13XXX_ADC1_CHAN1_SHIFT …
#define MC13783_ADC1_ATO_SHIFT …
#define MC13783_ADC1_ATOX …
struct mc13xxx_adcdone_data { … };
static irqreturn_t mc13xxx_handler_adcdone(int irq, void *data)
{ … }
#define MC13XXX_ADC_WORKING …
int mc13xxx_adc_do_conversion(struct mc13xxx *mc13xxx, unsigned int mode,
unsigned int channel, u8 ato, bool atox,
unsigned int *sample)
{ … }
EXPORT_SYMBOL_GPL(…);
static int mc13xxx_add_subdevice_pdata(struct mc13xxx *mc13xxx,
const char *format, void *pdata, size_t pdata_size)
{ … }
static int mc13xxx_add_subdevice(struct mc13xxx *mc13xxx, const char *format)
{ … }
#ifdef CONFIG_OF
static int mc13xxx_probe_flags_dt(struct mc13xxx *mc13xxx)
{ … }
#else
static inline int mc13xxx_probe_flags_dt(struct mc13xxx *mc13xxx)
{
return -ENODEV;
}
#endif
int mc13xxx_common_init(struct device *dev)
{ … }
EXPORT_SYMBOL_GPL(…);
void mc13xxx_common_exit(struct device *dev)
{ … }
EXPORT_SYMBOL_GPL(…);
MODULE_DESCRIPTION(…) …;
MODULE_AUTHOR(…) …;
MODULE_LICENSE(…) …;