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

TOMOYO Linux Cross Reference
Linux/include/linux/power/bq27xxx_battery.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 #ifndef __LINUX_BQ27X00_BATTERY_H__
  3 #define __LINUX_BQ27X00_BATTERY_H__
  4 
  5 #include <linux/power_supply.h>
  6 
  7 enum bq27xxx_chip {
  8         BQ27000 = 1, /* bq27000, bq27200 */
  9         BQ27010, /* bq27010, bq27210 */
 10         BQ2750X, /* bq27500 deprecated alias */
 11         BQ2751X, /* bq27510, bq27520 deprecated alias */
 12         BQ2752X,
 13         BQ27500, /* bq27500/1 */
 14         BQ27510G1, /* bq27510G1 */
 15         BQ27510G2, /* bq27510G2 */
 16         BQ27510G3, /* bq27510G3 */
 17         BQ27520G1, /* bq27520G1 */
 18         BQ27520G2, /* bq27520G2 */
 19         BQ27520G3, /* bq27520G3 */
 20         BQ27520G4, /* bq27520G4 */
 21         BQ27521, /* bq27521 */
 22         BQ27530, /* bq27530, bq27531 */
 23         BQ27531,
 24         BQ27541, /* bq27541, bq27542, bq27546, bq27742 */
 25         BQ27542,
 26         BQ27546,
 27         BQ27742,
 28         BQ27545, /* bq27545 */
 29         BQ27411,
 30         BQ27421, /* bq27421, bq27441, bq27621 */
 31         BQ27425,
 32         BQ27426,
 33         BQ27441,
 34         BQ27621,
 35         BQ27Z561,
 36         BQ28Z610,
 37         BQ34Z100,
 38         BQ78Z100,
 39 };
 40 
 41 struct bq27xxx_device_info;
 42 struct bq27xxx_access_methods {
 43         int (*read)(struct bq27xxx_device_info *di, u8 reg, bool single);
 44         int (*write)(struct bq27xxx_device_info *di, u8 reg, int value, bool single);
 45         int (*read_bulk)(struct bq27xxx_device_info *di, u8 reg, u8 *data, int len);
 46         int (*write_bulk)(struct bq27xxx_device_info *di, u8 reg, u8 *data, int len);
 47 };
 48 
 49 struct bq27xxx_reg_cache {
 50         int capacity;
 51         int flags;
 52 };
 53 
 54 struct bq27xxx_device_info {
 55         struct device *dev;
 56         enum bq27xxx_chip chip;
 57         u32 opts;
 58         const char *name;
 59         struct bq27xxx_dm_reg *dm_regs;
 60         u32 unseal_key;
 61         struct bq27xxx_access_methods bus;
 62         struct bq27xxx_reg_cache cache;
 63         int charge_design_full;
 64         bool removed;
 65         unsigned long last_update;
 66         union power_supply_propval last_status;
 67         struct delayed_work work;
 68         struct power_supply *bat;
 69         struct list_head list;
 70         struct mutex lock;
 71         u8 *regs;
 72 };
 73 
 74 void bq27xxx_battery_update(struct bq27xxx_device_info *di);
 75 int bq27xxx_battery_setup(struct bq27xxx_device_info *di);
 76 void bq27xxx_battery_teardown(struct bq27xxx_device_info *di);
 77 extern const struct dev_pm_ops bq27xxx_battery_battery_pm_ops;
 78 
 79 #endif
 80 

~ [ 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