/* SPDX-License-Identifier: GPL-2.0 */ /* * Device driver for regulators in MAX5970 and MAX5978 IC * * Copyright (c) 2022 9elements GmbH * * Author: Patrick Rudolph */ #ifndef _MFD_MAX5970_H #define _MFD_MAX5970_H #include #define MAX5970_NUM_SWITCHES 2 #define MAX5978_NUM_SWITCHES 1 #define MAX5970_NUM_LEDS 4 #define MAX5970_REG_CURRENT_L(ch) (0x01 + (ch) * 4) #define MAX5970_REG_CURRENT_H(ch) (0x00 + (ch) * 4) #define MAX5970_REG_VOLTAGE_L(ch) (0x03 + (ch) * 4) #define MAX5970_REG_VOLTAGE_H(ch) (0x02 + (ch) * 4) #define MAX5970_REG_MON_RANGE 0x18 #define MAX5970_MON_MASK 0x3 #define MAX5970_MON(reg, ch) (((reg) >> ((ch) * 2)) & MAX5970_MON_MASK) #define MAX5970_MON_MAX_RANGE_UV 16000000 #define MAX5970_REG_CH_UV_WARN_H(ch) (0x1A + (ch) * 10) #define MAX5970_REG_CH_UV_WARN_L(ch) (0x1B + (ch) * 10) #define MAX5970_REG_CH_UV_CRIT_H(ch) (0x1C + (ch) * 10) #define MAX5970_REG_CH_UV_CRIT_L(ch) (0x1D + (ch) * 10) #define MAX5970_REG_CH_OV_WARN_H(ch) (0x1E + (ch) * 10) #define MAX5970_REG_CH_OV_WARN_L(ch) (0x1F + (ch) * 10) #define MAX5970_REG_CH_OV_CRIT_H(ch) (0x20 + (ch) * 10) #define MAX5970_REG_CH_OV_CRIT_L(ch) (0x21 + (ch) * 10) #define MAX5970_VAL2REG_H(x) (((x) >> 2) & 0xFF) #define MAX5970_VAL2REG_L(x) ((x) & 0x3) #define MAX5970_REG_DAC_FAST(ch) (0x2E + (ch)) #define MAX5970_FAST2SLOW_RATIO 200 #define MAX5970_REG_STATUS0 0x31 #define MAX5970_CB_IFAULTF(ch) (1 << (ch)) #define MAX5970_CB_IFAULTS(ch) (1 << ((ch) + 4)) #define MAX5970_REG_STATUS1 0x32 #define STATUS1_PROT_MASK 0x3 #define STATUS1_PROT(reg) \ (((reg) >> 6) & STATUS1_PROT_MASK) #define STATUS1_PROT_SHUTDOWN 0 #define STATUS1_PROT_CLEAR_PG 1 #define STATUS1_PROT_ALERT_ONLY 2 #define MAX5970_REG_STATUS2 0x33 #define MAX5970_IRNG_MASK 0x3 #define MAX5970_IRNG(reg, ch) \ (((reg) >> ((ch) * 2)) & MAX5970_IRNG_MASK) #define MAX5970_REG_STATUS3 0x34 #define MAX5970_STATUS3_ALERT BIT(4) #define MAX5970_STATUS3_PG(ch) BIT(ch) #define MAX5970_REG_FAULT0 0x35 #define UV_STATUS_WARN(ch) (1 << (ch)) #define UV_STATUS_CRIT(ch) (1 << ((ch) + 4)) #define MAX5970_REG_FAULT1 0x36 #define OV_STATUS_WARN(ch) (1 << (ch)) #define OV_STATUS_CRIT(ch) (1 << ((ch) + 4)) #define MAX5970_REG_FAULT2 0x37 #define OC_STATUS_WARN(ch) (1 << (ch)) #define MAX5970_REG_CHXEN 0x3b #define CHXEN(ch) (3 << ((ch) * 2)) #define MAX5970_REG_LED_FLASH 0x43 #define MAX_REGISTERS 0x49 #define ADC_MASK 0x3FF #endif /* _MFD_MAX5970_H */ 'linux-3.0.y'>linux-3.0.y Hosts the 0x221E linux distro kernel.Ubuntu
summaryrefslogtreecommitdiff
AgeCommit message (Expand)Author
2022-03-25xen: don't hang when resuming PCI deviceJakub Kądziołka
2022-03-15xen/grant-table: remove readonly parameter from functionsJuergen Gross
2022-03-15xen/grant-table: remove gnttab_*transfer*() functionsJuergen Gross
2022-03-10drivers/xen: use helper macro __ATTR_RWzhanglianjie
2022-03-10xen: use time_is_before_eq_jiffies() instead of open coding itWang Qing
2022-03-07xen/gnttab: fix gnttab_end_foreign_access() without page specifiedJuergen Gross
2022-03-07xen/pvcalls: use alloc/free_pages_exact()Juergen Gross
2022-03-07xen: remove gnttab_query_foreign_access()Juergen Gross
2022-03-07xen/gntalloc: don't use gnttab_query_foreign_access()Juergen Gross
2022-03-07xen/grant-table: add gnttab_try_end_foreign_access()Juergen Gross
2022-03-07xen/xenbus: don't let xenbus_grant_ring() remove grants in error caseJuergen Gross
2022-02-10xen/pci: Make use of the helper macro LIST_HEAD()Cai Huoqing
2022-01-06arm/xen: Read extended regions from DT and init Xen resourceOleksandr Tyshchenko
2022-01-06xen/unpopulated-alloc: Add mechanism to use Xen resourceOleksandr Tyshchenko
2022-01-06xen/balloon: Bring alloc(free)_xenballooned_pages helpers backOleksandr Tyshchenko
2022-01-06xen/unpopulated-alloc: Drop check for virt_addr_valid() in fill_list()Oleksandr Tyshchenko
2022-01-06xen/gntdev: fix unmap notification orderOleksandr Andrushchenko
2021-12-16xen/console: harden hvc_xen against event channel stormsJuergen Gross
2021-11-24xen: detect uninitialized xenbus in xenbus_initStefano Stabellini
2021-11-23xen: flag pvcalls-front to be not essential for system bootJuergen Gross
2021-11-23xen: add "not_essential" flag to struct xenbus_driverJuergen Gross
2021-11-16xen: don't continue xenstore initialization in case of errorsStefano Stabellini
2021-11-16xen/privcmd: make option visible in KconfigJuergen Gross
2021-11-10Merge tag 'for-linus-5.16b-rc1-tag' of git://git.kernel.org/pub/scm/linux/ker...Linus Torvalds
2021-11-08xen/balloon: fix unused-variable warningArnd Bergmann
2021-11-06Merge branch 'akpm' (patches from Andrew)Linus Torvalds
2021-11-06memblock: use memblock_free for freeing virtual pointersMike Rapoport
2021-11-06memblock: rename memblock_free to memblock_phys_freeMike Rapoport
2021-11-04Merge tag 'iommu-updates-v5.16' of git://git.kernel.org/pub/scm/linux/kernel/...Linus Torvalds
2021-11-04xen/balloon: rename alloc/free_xenballooned_pagesJuergen Gross
2021-11-04xen/balloon: add late_initcall_sync() for initial ballooning doneJuergen Gross
2021-11-02x86/xen: remove 32-bit pv leftoversJuergen Gross
2021-11-02xen-pciback: allow compiling on other archs than x86Oleksandr Andrushchenko
2021-11-02xen: Fix implicit type conversionJiasheng Jiang
2021-11-02xen/pvcalls-back: Remove redundant 'flush_workqueue()' callsChristophe JAILLET
2021-11-02xen-pciback: Fix return in pm_ctrl_init()YueHaibing
2021-10-31Merge branches 'apple/dart', 'arm/mediatek', 'arm/renesas', 'arm/smmu', 'arm/...Joerg Roedel
2021-10-25dma-buf: move dma-buf symbols into the DMA_BUF module namespaceGreg Kroah-Hartman
2021-10-08Merge tag 'for-linus-5.15b-rc5-tag' of git://git.kernel.org/pub/scm/linux/ker...Linus Torvalds