~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/include/linux/mfd/gsc.h

Version: ~ [ linux-6.11.5 ] ~ [ linux-6.10.14 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.58 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.114 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.169 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.228 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.284 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.322 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.9 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 /* SPDX-License-Identifier: GPL-2.0
  2  *
  3  * Copyright (C) 2020 Gateworks Corporation
  4  */
  5 #ifndef __LINUX_MFD_GSC_H_
  6 #define __LINUX_MFD_GSC_H_
  7 
  8 #include <linux/regmap.h>
  9 
 10 /* Device Addresses */
 11 #define GSC_MISC        0x20
 12 #define GSC_UPDATE      0x21
 13 #define GSC_GPIO        0x23
 14 #define GSC_HWMON       0x29
 15 #define GSC_EEPROM0     0x50
 16 #define GSC_EEPROM1     0x51
 17 #define GSC_EEPROM2     0x52
 18 #define GSC_EEPROM3     0x53
 19 #define GSC_RTC         0x68
 20 
 21 /* Register offsets */
 22 enum {
 23         GSC_CTRL_0      = 0x00,
 24         GSC_CTRL_1      = 0x01,
 25         GSC_TIME        = 0x02,
 26         GSC_TIME_ADD    = 0x06,
 27         GSC_IRQ_STATUS  = 0x0A,
 28         GSC_IRQ_ENABLE  = 0x0B,
 29         GSC_FW_CRC      = 0x0C,
 30         GSC_FW_VER      = 0x0E,
 31         GSC_WP          = 0x0F,
 32 };
 33 
 34 /* Bit definitions */
 35 #define GSC_CTRL_0_PB_HARD_RESET        0
 36 #define GSC_CTRL_0_PB_CLEAR_SECURE_KEY  1
 37 #define GSC_CTRL_0_PB_SOFT_POWER_DOWN   2
 38 #define GSC_CTRL_0_PB_BOOT_ALTERNATE    3
 39 #define GSC_CTRL_0_PERFORM_CRC          4
 40 #define GSC_CTRL_0_TAMPER_DETECT        5
 41 #define GSC_CTRL_0_SWITCH_HOLD          6
 42 
 43 #define GSC_CTRL_1_SLEEP_ENABLE         0
 44 #define GSC_CTRL_1_SLEEP_ACTIVATE       1
 45 #define GSC_CTRL_1_SLEEP_ADD            2
 46 #define GSC_CTRL_1_SLEEP_NOWAKEPB       3
 47 #define GSC_CTRL_1_WDT_TIME             4
 48 #define GSC_CTRL_1_WDT_ENABLE           5
 49 #define GSC_CTRL_1_SWITCH_BOOT_ENABLE   6
 50 #define GSC_CTRL_1_SWITCH_BOOT_CLEAR    7
 51 
 52 #define GSC_IRQ_PB                      0
 53 #define GSC_IRQ_KEY_ERASED              1
 54 #define GSC_IRQ_EEPROM_WP               2
 55 #define GSC_IRQ_RESV                    3
 56 #define GSC_IRQ_GPIO                    4
 57 #define GSC_IRQ_TAMPER                  5
 58 #define GSC_IRQ_WDT_TIMEOUT             6
 59 #define GSC_IRQ_SWITCH_HOLD             7
 60 
 61 int gsc_read(void *context, unsigned int reg, unsigned int *val);
 62 int gsc_write(void *context, unsigned int reg, unsigned int val);
 63 
 64 struct gsc_dev {
 65         struct device *dev;
 66 
 67         struct i2c_client *i2c;         /* 0x20: interrupt controller, WDT */
 68         struct i2c_client *i2c_hwmon;   /* 0x29: hwmon, fan controller */
 69 
 70         struct regmap *regmap;
 71 
 72         unsigned int fwver;
 73         unsigned short fwcrc;
 74 };
 75 
 76 #endif /* __LINUX_MFD_GSC_H_ */
 77 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

sflogo.php