/Linux-v6.6/drivers/power/supply/ |
D | wm8350_power.c | 20 static int wm8350_read_battery_uvolts(struct wm8350 *wm8350) in wm8350_read_battery_uvolts() argument 22 return wm8350_read_auxadc(wm8350, WM8350_AUXADC_BATT, 0, 0) in wm8350_read_battery_uvolts() 26 static int wm8350_read_line_uvolts(struct wm8350 *wm8350) in wm8350_read_line_uvolts() argument 28 return wm8350_read_auxadc(wm8350, WM8350_AUXADC_LINE, 0, 0) in wm8350_read_line_uvolts() 32 static int wm8350_read_usb_uvolts(struct wm8350 *wm8350) in wm8350_read_usb_uvolts() argument 34 return wm8350_read_auxadc(wm8350, WM8350_AUXADC_USB, 0, 0) in wm8350_read_usb_uvolts() 42 static inline int wm8350_charge_time_min(struct wm8350 *wm8350, int min) in wm8350_charge_time_min() argument 44 if (!wm8350->power.rev_g_coeff) in wm8350_charge_time_min() 50 static int wm8350_get_supplies(struct wm8350 *wm8350) in wm8350_get_supplies() argument 55 sm = wm8350_reg_read(wm8350, WM8350_STATE_MACHINE_STATUS); in wm8350_get_supplies() [all …]
|
/Linux-v6.6/drivers/mfd/ |
D | wm8350-core.c | 63 int wm8350_clear_bits(struct wm8350 *wm8350, u16 reg, u16 mask) in wm8350_clear_bits() argument 65 return regmap_update_bits(wm8350->regmap, reg, mask, 0); in wm8350_clear_bits() 69 int wm8350_set_bits(struct wm8350 *wm8350, u16 reg, u16 mask) in wm8350_set_bits() argument 71 return regmap_update_bits(wm8350->regmap, reg, mask, mask); in wm8350_set_bits() 75 u16 wm8350_reg_read(struct wm8350 *wm8350, int reg) in wm8350_reg_read() argument 80 err = regmap_read(wm8350->regmap, reg, &data); in wm8350_reg_read() 82 dev_err(wm8350->dev, "read from reg R%d failed\n", reg); in wm8350_reg_read() 88 int wm8350_reg_write(struct wm8350 *wm8350, int reg, u16 val) in wm8350_reg_write() argument 92 ret = regmap_write(wm8350->regmap, reg, val); in wm8350_reg_write() 95 dev_err(wm8350->dev, "write to reg R%d failed\n", reg); in wm8350_reg_write() [all …]
|
D | wm8350-gpio.c | 18 static int gpio_set_dir(struct wm8350 *wm8350, int gpio, int dir) in gpio_set_dir() argument 22 wm8350_reg_unlock(wm8350); in gpio_set_dir() 24 ret = wm8350_clear_bits(wm8350, in gpio_set_dir() 28 ret = wm8350_set_bits(wm8350, in gpio_set_dir() 31 wm8350_reg_lock(wm8350); in gpio_set_dir() 35 static int wm8350_gpio_set_debounce(struct wm8350 *wm8350, int gpio, int db) in wm8350_gpio_set_debounce() argument 38 return wm8350_set_bits(wm8350, WM8350_GPIO_DEBOUNCE, in wm8350_gpio_set_debounce() 41 return wm8350_clear_bits(wm8350, in wm8350_gpio_set_debounce() 45 static int gpio_set_func(struct wm8350 *wm8350, int gpio, int func) in gpio_set_func() argument 49 wm8350_reg_unlock(wm8350); in gpio_set_func() [all …]
|
D | wm8350-irq.c | 361 static inline struct wm8350_irq_data *irq_to_wm8350_irq(struct wm8350 *wm8350, in irq_to_wm8350_irq() argument 364 return &wm8350_irqs[irq - wm8350->irq_base]; in irq_to_wm8350_irq() 378 struct wm8350 *wm8350 = irq_data; in wm8350_irq() local 385 level_one = wm8350_reg_read(wm8350, WM8350_SYSTEM_INTERRUPTS) in wm8350_irq() 386 & ~wm8350_reg_read(wm8350, WM8350_SYSTEM_INTERRUPTS_MASK); in wm8350_irq() 401 wm8350_reg_read(wm8350, WM8350_INT_STATUS_1 + in wm8350_irq() 403 sub_reg[data->reg] &= ~wm8350->irq_masks[data->reg]; in wm8350_irq() 408 handle_nested_irq(wm8350->irq_base + i); in wm8350_irq() 416 struct wm8350 *wm8350 = irq_data_get_irq_chip_data(data); in wm8350_irq_lock() local 418 mutex_lock(&wm8350->irq_lock); in wm8350_irq_lock() [all …]
|
D | wm8350-i2c.c | 21 struct wm8350 *wm8350; in wm8350_i2c_probe() local 25 wm8350 = devm_kzalloc(&i2c->dev, sizeof(struct wm8350), GFP_KERNEL); in wm8350_i2c_probe() 26 if (wm8350 == NULL) in wm8350_i2c_probe() 29 wm8350->regmap = devm_regmap_init_i2c(i2c, &wm8350_regmap); in wm8350_i2c_probe() 30 if (IS_ERR(wm8350->regmap)) { in wm8350_i2c_probe() 31 ret = PTR_ERR(wm8350->regmap); in wm8350_i2c_probe() 37 i2c_set_clientdata(i2c, wm8350); in wm8350_i2c_probe() 38 wm8350->dev = &i2c->dev; in wm8350_i2c_probe() 40 return wm8350_device_init(wm8350, i2c->irq, pdata); in wm8350_i2c_probe()
|
D | wm8350-regmap.c | 288 struct wm8350 *wm8350 = dev_get_drvdata(dev); in wm8350_writeable() local 290 if (!wm8350->unlocked) { in wm8350_writeable()
|
D | Makefile | 63 wm8350-objs := wm8350-core.o wm8350-regmap.o wm8350-gpio.o 64 wm8350-objs += wm8350-irq.o 65 obj-$(CONFIG_MFD_WM8350) += wm8350.o 66 obj-$(CONFIG_MFD_WM8350_I2C) += wm8350-i2c.o
|
/Linux-v6.6/drivers/regulator/ |
D | wm8350-regulator.c | 96 struct wm8350 *wm8350 = rdev_get_drvdata(rdev); in wm8350_isink_enable() local 101 switch (wm8350->pmic.isink_A_dcdc) { in wm8350_isink_enable() 104 wm8350_set_bits(wm8350, WM8350_POWER_MGMT_7, in wm8350_isink_enable() 106 wm8350_set_bits(wm8350, WM8350_CSA_FLASH_CONTROL, in wm8350_isink_enable() 108 wm8350_set_bits(wm8350, WM8350_DCDC_LDO_REQUESTED, in wm8350_isink_enable() 109 1 << (wm8350->pmic.isink_A_dcdc - in wm8350_isink_enable() 117 switch (wm8350->pmic.isink_B_dcdc) { in wm8350_isink_enable() 120 wm8350_set_bits(wm8350, WM8350_POWER_MGMT_7, in wm8350_isink_enable() 122 wm8350_set_bits(wm8350, WM8350_CSB_FLASH_CONTROL, in wm8350_isink_enable() 124 wm8350_set_bits(wm8350, WM8350_DCDC_LDO_REQUESTED, in wm8350_isink_enable() [all …]
|
D | Makefile | 195 obj-$(CONFIG_REGULATOR_WM8350) += wm8350-regulator.o
|
/Linux-v6.6/drivers/rtc/ |
D | rtc-wm8350.c | 33 struct wm8350 *wm8350 = dev_get_drvdata(dev); in wm8350_rtc_readtime() local 42 ret = wm8350_block_read(wm8350, WM8350_RTC_SECONDS_MINUTES, in wm8350_rtc_readtime() 46 ret = wm8350_block_read(wm8350, WM8350_RTC_SECONDS_MINUTES, in wm8350_rtc_readtime() 92 struct wm8350 *wm8350 = dev_get_drvdata(dev); in wm8350_rtc_settime() local 110 ret = wm8350_set_bits(wm8350, WM8350_RTC_TIME_CONTROL, WM8350_RTC_SET); in wm8350_rtc_settime() 116 rtc_ctrl = wm8350_reg_read(wm8350, WM8350_RTC_TIME_CONTROL); in wm8350_rtc_settime() 126 ret = wm8350_block_write(wm8350, WM8350_RTC_SECONDS_MINUTES, 4, time); in wm8350_rtc_settime() 131 ret = wm8350_clear_bits(wm8350, WM8350_RTC_TIME_CONTROL, in wm8350_rtc_settime() 141 struct wm8350 *wm8350 = dev_get_drvdata(dev); in wm8350_rtc_readalarm() local 146 ret = wm8350_block_read(wm8350, WM8350_ALARM_SECONDS_MINUTES, 4, time); in wm8350_rtc_readalarm() [all …]
|
D | Makefile | 183 obj-$(CONFIG_RTC_DRV_WM8350) += rtc-wm8350.o
|
/Linux-v6.6/drivers/gpio/ |
D | gpio-wm8350.c | 22 struct wm8350 *wm8350; member 29 struct wm8350 *wm8350 = wm8350_gpio->wm8350; in wm8350_gpio_direction_in() local 31 return wm8350_set_bits(wm8350, WM8350_GPIO_CONFIGURATION_I_O, in wm8350_gpio_direction_in() 38 struct wm8350 *wm8350 = wm8350_gpio->wm8350; in wm8350_gpio_get() local 41 ret = wm8350_reg_read(wm8350, WM8350_GPIO_LEVEL); in wm8350_gpio_get() 54 struct wm8350 *wm8350 = wm8350_gpio->wm8350; in wm8350_gpio_set() local 57 wm8350_set_bits(wm8350, WM8350_GPIO_LEVEL, 1 << offset); in wm8350_gpio_set() 59 wm8350_clear_bits(wm8350, WM8350_GPIO_LEVEL, 1 << offset); in wm8350_gpio_set() 66 struct wm8350 *wm8350 = wm8350_gpio->wm8350; in wm8350_gpio_direction_out() local 69 ret = wm8350_clear_bits(wm8350, WM8350_GPIO_CONFIGURATION_I_O, in wm8350_gpio_direction_out() [all …]
|
D | Makefile | 186 obj-$(CONFIG_GPIO_WM8350) += gpio-wm8350.o
|
/Linux-v6.6/sound/soc/codecs/ |
D | wm8350.c | 60 struct wm8350 *wm8350; member 78 struct wm8350 *wm8350 = wm8350_data->wm8350; in wm8350_out1_ramp_step() local 83 reg = wm8350_reg_read(wm8350, WM8350_LOUT1_VOLUME); in wm8350_out1_ramp_step() 91 wm8350_reg_write(wm8350, WM8350_LOUT1_VOLUME, in wm8350_out1_ramp_step() 100 wm8350_reg_write(wm8350, WM8350_LOUT1_VOLUME, in wm8350_out1_ramp_step() 108 reg = wm8350_reg_read(wm8350, WM8350_ROUT1_VOLUME); in wm8350_out1_ramp_step() 115 wm8350_reg_write(wm8350, WM8350_ROUT1_VOLUME, in wm8350_out1_ramp_step() 124 wm8350_reg_write(wm8350, WM8350_ROUT1_VOLUME, in wm8350_out1_ramp_step() 132 wm8350_set_bits(wm8350, WM8350_LOUT1_VOLUME, WM8350_OUT1_VU); in wm8350_out1_ramp_step() 143 struct wm8350 *wm8350 = wm8350_data->wm8350; in wm8350_out2_ramp_step() local [all …]
|
/Linux-v6.6/drivers/watchdog/ |
D | wm8350_wdt.c | 39 struct wm8350 *wm8350 = watchdog_get_drvdata(wdt_dev); in wm8350_wdt_set_timeout() local 50 wm8350_reg_unlock(wm8350); in wm8350_wdt_set_timeout() 52 reg = wm8350_reg_read(wm8350, WM8350_SYSTEM_CONTROL_2); in wm8350_wdt_set_timeout() 55 ret = wm8350_reg_write(wm8350, WM8350_SYSTEM_CONTROL_2, reg); in wm8350_wdt_set_timeout() 57 wm8350_reg_lock(wm8350); in wm8350_wdt_set_timeout() 66 struct wm8350 *wm8350 = watchdog_get_drvdata(wdt_dev); in wm8350_wdt_start() local 71 wm8350_reg_unlock(wm8350); in wm8350_wdt_start() 73 reg = wm8350_reg_read(wm8350, WM8350_SYSTEM_CONTROL_2); in wm8350_wdt_start() 76 ret = wm8350_reg_write(wm8350, WM8350_SYSTEM_CONTROL_2, reg); in wm8350_wdt_start() 78 wm8350_reg_lock(wm8350); in wm8350_wdt_start() [all …]
|
/Linux-v6.6/include/linux/mfd/wm8350/ |
D | core.h | 586 struct wm8350; 593 struct wm8350 { struct 629 int (*init)(struct wm8350 *wm8350); argument 639 int wm8350_device_init(struct wm8350 *wm8350, int irq, 645 int wm8350_clear_bits(struct wm8350 *wm8350, u16 reg, u16 mask); 646 int wm8350_set_bits(struct wm8350 *wm8350, u16 reg, u16 mask); 647 u16 wm8350_reg_read(struct wm8350 *wm8350, int reg); 648 int wm8350_reg_write(struct wm8350 *wm8350, int reg, u16 val); 649 int wm8350_reg_lock(struct wm8350 *wm8350); 650 int wm8350_reg_unlock(struct wm8350 *wm8350); [all …]
|
D | pmic.h | 698 struct wm8350; 750 int wm8350_register_regulator(struct wm8350 *wm8350, int reg, 752 int wm8350_register_led(struct wm8350 *wm8350, int lednum, int dcdc, int isink, 758 int wm8350_dcdc_set_slot(struct wm8350 *wm8350, int dcdc, u16 start, 760 int wm8350_dcdc25_set_mode(struct wm8350 *wm8350, int dcdc, u16 mode, 766 int wm8350_ldo_set_slot(struct wm8350 *wm8350, int ldo, u16 start, u16 stop); 771 int wm8350_isink_set_flash(struct wm8350 *wm8350, int isink, u16 mode,
|
D | comparator.h | 163 struct wm8350; 168 int wm8350_read_auxadc(struct wm8350 *wm8350, int channel, int scale,
|
D | gpio.h | 342 struct wm8350; 344 int wm8350_gpio_config(struct wm8350 *wm8350, int gpio, int dir, int func,
|
/Linux-v6.6/drivers/hwmon/ |
D | wm8350-hwmon.c | 28 struct wm8350 *wm8350 = dev_get_drvdata(dev); in show_voltage() local 32 val = wm8350_read_auxadc(wm8350, channel, 0, 0) * WM8350_AUX_COEFF; in show_voltage() 67 ATTRIBUTE_GROUPS(wm8350); 71 struct wm8350 *wm8350 = platform_get_drvdata(pdev); in wm8350_hwmon_probe() local 75 wm8350, in wm8350_hwmon_probe()
|
D | Makefile | 221 obj-$(CONFIG_SENSORS_WM8350) += wm8350-hwmon.o
|
/Linux-v6.6/Documentation/hwmon/ |
D | wm8350.rst | 1 Kernel driver wm8350-hwmon 8 Prefix: 'wm8350'
|
D | index.rst | 237 wm8350
|
/Linux-v6.6/Documentation/translations/zh_CN/scheduler/ |
D | completion.rst | 194 (例如,见drivers/mfd/wm8350-core.c wm8350_read_auxadc()::
|
/Linux-v6.6/drivers/leds/ |
D | Makefile | 89 obj-$(CONFIG_LEDS_WM8350) += leds-wm8350.o
|