/drivers/power/ |
D | wm8350_power.c | 23 static int wm8350_read_battery_uvolts(struct wm8350 *wm8350) in wm8350_read_battery_uvolts() argument 25 return wm8350_read_auxadc(wm8350, WM8350_AUXADC_BATT, 0, 0) in wm8350_read_battery_uvolts() 29 static int wm8350_read_line_uvolts(struct wm8350 *wm8350) in wm8350_read_line_uvolts() argument 31 return wm8350_read_auxadc(wm8350, WM8350_AUXADC_LINE, 0, 0) in wm8350_read_line_uvolts() 35 static int wm8350_read_usb_uvolts(struct wm8350 *wm8350) in wm8350_read_usb_uvolts() argument 37 return wm8350_read_auxadc(wm8350, WM8350_AUXADC_USB, 0, 0) in wm8350_read_usb_uvolts() 45 static inline int wm8350_charge_time_min(struct wm8350 *wm8350, int min) in wm8350_charge_time_min() argument 47 if (!wm8350->power.rev_g_coeff) in wm8350_charge_time_min() 53 static int wm8350_get_supplies(struct wm8350 *wm8350) in wm8350_get_supplies() argument 58 sm = wm8350_reg_read(wm8350, WM8350_STATE_MACHINE_STATUS); in wm8350_get_supplies() [all …]
|
/drivers/mfd/ |
D | wm8350-core.c | 70 static int wm8350_phys_read(struct wm8350 *wm8350, u8 reg, int num_regs, in wm8350_phys_read() argument 76 dev_dbg(wm8350->dev, "volatile read\n"); in wm8350_phys_read() 77 ret = wm8350->read_dev(wm8350, reg, bytes, (char *)dest); in wm8350_phys_read() 92 static int wm8350_read(struct wm8350 *wm8350, u8 reg, int num_regs, u16 *dest) in wm8350_read() argument 99 if (wm8350->read_dev == NULL) in wm8350_read() 103 dev_err(wm8350->dev, "invalid reg %x\n", in wm8350_read() 108 dev_dbg(wm8350->dev, in wm8350_read() 115 dev_warn(wm8350->dev, in wm8350_read() 123 return wm8350_phys_read(wm8350, reg, num_regs, dest); in wm8350_read() 126 dev_dbg(wm8350->dev, "cache read\n"); in wm8350_read() [all …]
|
D | wm8350-gpio.c | 23 static int gpio_set_dir(struct wm8350 *wm8350, int gpio, int dir) in gpio_set_dir() argument 27 wm8350_reg_unlock(wm8350); in gpio_set_dir() 29 ret = wm8350_clear_bits(wm8350, in gpio_set_dir() 33 ret = wm8350_set_bits(wm8350, in gpio_set_dir() 36 wm8350_reg_lock(wm8350); in gpio_set_dir() 40 static int wm8350_gpio_set_debounce(struct wm8350 *wm8350, int gpio, int db) in wm8350_gpio_set_debounce() argument 43 return wm8350_set_bits(wm8350, WM8350_GPIO_DEBOUNCE, in wm8350_gpio_set_debounce() 46 return wm8350_clear_bits(wm8350, in wm8350_gpio_set_debounce() 50 static int gpio_set_func(struct wm8350 *wm8350, int gpio, int func) in gpio_set_func() argument 54 wm8350_reg_unlock(wm8350); in gpio_set_func() [all …]
|
D | wm8350-irq.c | 367 static inline struct wm8350_irq_data *irq_to_wm8350_irq(struct wm8350 *wm8350, in irq_to_wm8350_irq() argument 370 return &wm8350_irqs[irq - wm8350->irq_base]; in irq_to_wm8350_irq() 384 struct wm8350 *wm8350 = irq_data; in wm8350_irq() local 391 level_one = wm8350_reg_read(wm8350, WM8350_SYSTEM_INTERRUPTS) in wm8350_irq() 392 & ~wm8350_reg_read(wm8350, WM8350_SYSTEM_INTERRUPTS_MASK); in wm8350_irq() 407 wm8350_reg_read(wm8350, WM8350_INT_STATUS_1 + in wm8350_irq() 409 sub_reg[data->reg] &= ~wm8350->irq_masks[data->reg]; in wm8350_irq() 414 handle_nested_irq(wm8350->irq_base + i); in wm8350_irq() 422 struct wm8350 *wm8350 = irq_data_get_irq_chip_data(data); in wm8350_irq_lock() local 424 mutex_lock(&wm8350->irq_lock); in wm8350_irq_lock() [all …]
|
D | wm8350-i2c.c | 24 static int wm8350_i2c_read_device(struct wm8350 *wm8350, char reg, in wm8350_i2c_read_device() argument 29 ret = i2c_master_send(wm8350->i2c_client, ®, 1); in wm8350_i2c_read_device() 32 ret = i2c_master_recv(wm8350->i2c_client, dest, bytes); in wm8350_i2c_read_device() 40 static int wm8350_i2c_write_device(struct wm8350 *wm8350, char reg, in wm8350_i2c_write_device() argument 52 ret = i2c_master_send(wm8350->i2c_client, msg, bytes + 1); in wm8350_i2c_write_device() 63 struct wm8350 *wm8350; in wm8350_i2c_probe() local 66 wm8350 = devm_kzalloc(&i2c->dev, sizeof(struct wm8350), GFP_KERNEL); in wm8350_i2c_probe() 67 if (wm8350 == NULL) in wm8350_i2c_probe() 70 i2c_set_clientdata(i2c, wm8350); in wm8350_i2c_probe() 71 wm8350->dev = &i2c->dev; in wm8350_i2c_probe() [all …]
|
D | Makefile | 32 wm8350-objs := wm8350-core.o wm8350-regmap.o wm8350-gpio.o 33 wm8350-objs += wm8350-irq.o 34 obj-$(CONFIG_MFD_WM8350) += wm8350.o 35 obj-$(CONFIG_MFD_WM8350_I2C) += wm8350-i2c.o
|
/drivers/regulator/ |
D | wm8350-regulator.c | 141 struct wm8350 *wm8350 = rdev_get_drvdata(rdev); in wm8350_isink_set_current() local 152 val = wm8350_reg_read(wm8350, WM8350_CURRENT_SINK_DRIVER_A) & in wm8350_isink_set_current() 154 wm8350_reg_write(wm8350, WM8350_CURRENT_SINK_DRIVER_A, in wm8350_isink_set_current() 158 val = wm8350_reg_read(wm8350, WM8350_CURRENT_SINK_DRIVER_B) & in wm8350_isink_set_current() 160 wm8350_reg_write(wm8350, WM8350_CURRENT_SINK_DRIVER_B, in wm8350_isink_set_current() 172 struct wm8350 *wm8350 = rdev_get_drvdata(rdev); in wm8350_isink_get_current() local 178 val = wm8350_reg_read(wm8350, WM8350_CURRENT_SINK_DRIVER_A) & in wm8350_isink_get_current() 182 val = wm8350_reg_read(wm8350, WM8350_CURRENT_SINK_DRIVER_B) & in wm8350_isink_get_current() 195 struct wm8350 *wm8350 = rdev_get_drvdata(rdev); in wm8350_isink_enable() local 200 switch (wm8350->pmic.isink_A_dcdc) { in wm8350_isink_enable() [all …]
|
D | Makefile | 52 obj-$(CONFIG_REGULATOR_WM8350) += wm8350-regulator.o
|
/drivers/rtc/ |
D | rtc-wm8350.c | 33 #define to_wm8350_from_rtc_dev(d) container_of(d, struct wm8350, rtc.pdev.dev) 40 struct wm8350 *wm8350 = dev_get_drvdata(dev); in wm8350_rtc_readtime() local 49 ret = wm8350_block_read(wm8350, WM8350_RTC_SECONDS_MINUTES, in wm8350_rtc_readtime() 53 ret = wm8350_block_read(wm8350, WM8350_RTC_SECONDS_MINUTES, in wm8350_rtc_readtime() 99 struct wm8350 *wm8350 = dev_get_drvdata(dev); in wm8350_rtc_settime() local 117 ret = wm8350_set_bits(wm8350, WM8350_RTC_TIME_CONTROL, WM8350_RTC_SET); in wm8350_rtc_settime() 123 rtc_ctrl = wm8350_reg_read(wm8350, WM8350_RTC_TIME_CONTROL); in wm8350_rtc_settime() 133 ret = wm8350_block_write(wm8350, WM8350_RTC_SECONDS_MINUTES, 4, time); in wm8350_rtc_settime() 138 ret = wm8350_clear_bits(wm8350, WM8350_RTC_TIME_CONTROL, in wm8350_rtc_settime() 148 struct wm8350 *wm8350 = dev_get_drvdata(dev); in wm8350_rtc_readalarm() local [all …]
|
D | Makefile | 113 obj-$(CONFIG_RTC_DRV_WM8350) += rtc-wm8350.o
|
D | Kconfig | 690 will be called "rtc-wm8350".
|
/drivers/gpio/ |
D | gpio-wm8350.c | 27 struct wm8350 *wm8350; member 39 struct wm8350 *wm8350 = wm8350_gpio->wm8350; in wm8350_gpio_direction_in() local 41 return wm8350_set_bits(wm8350, WM8350_GPIO_CONFIGURATION_I_O, in wm8350_gpio_direction_in() 48 struct wm8350 *wm8350 = wm8350_gpio->wm8350; in wm8350_gpio_get() local 51 ret = wm8350_reg_read(wm8350, WM8350_GPIO_LEVEL); in wm8350_gpio_get() 64 struct wm8350 *wm8350 = wm8350_gpio->wm8350; in wm8350_gpio_set() local 67 wm8350_set_bits(wm8350, WM8350_GPIO_LEVEL, 1 << offset); in wm8350_gpio_set() 69 wm8350_clear_bits(wm8350, WM8350_GPIO_LEVEL, 1 << offset); in wm8350_gpio_set() 76 struct wm8350 *wm8350 = wm8350_gpio->wm8350; in wm8350_gpio_direction_out() local 79 ret = wm8350_clear_bits(wm8350, WM8350_GPIO_CONFIGURATION_I_O, in wm8350_gpio_direction_out() [all …]
|
D | Makefile | 64 obj-$(CONFIG_GPIO_WM8350) += gpio-wm8350.o
|
/drivers/watchdog/ |
D | wm8350_wdt.c | 42 struct wm8350 *wm8350 = watchdog_get_drvdata(wdt_dev); in wm8350_wdt_set_timeout() local 53 wm8350_reg_unlock(wm8350); in wm8350_wdt_set_timeout() 55 reg = wm8350_reg_read(wm8350, WM8350_SYSTEM_CONTROL_2); in wm8350_wdt_set_timeout() 58 ret = wm8350_reg_write(wm8350, WM8350_SYSTEM_CONTROL_2, reg); in wm8350_wdt_set_timeout() 60 wm8350_reg_lock(wm8350); in wm8350_wdt_set_timeout() 69 struct wm8350 *wm8350 = watchdog_get_drvdata(wdt_dev); in wm8350_wdt_start() local 74 wm8350_reg_unlock(wm8350); in wm8350_wdt_start() 76 reg = wm8350_reg_read(wm8350, WM8350_SYSTEM_CONTROL_2); in wm8350_wdt_start() 79 ret = wm8350_reg_write(wm8350, WM8350_SYSTEM_CONTROL_2, reg); in wm8350_wdt_start() 81 wm8350_reg_lock(wm8350); in wm8350_wdt_start() [all …]
|
/drivers/hwmon/ |
D | wm8350-hwmon.c | 47 struct wm8350 *wm8350 = dev_get_drvdata(dev); in show_voltage() local 51 val = wm8350_read_auxadc(wm8350, channel, 0, 0) * WM8350_AUX_COEFF; in show_voltage() 96 struct wm8350 *wm8350 = platform_get_drvdata(pdev); in wm8350_hwmon_probe() local 103 wm8350->hwmon.classdev = hwmon_device_register(&pdev->dev); in wm8350_hwmon_probe() 104 if (IS_ERR(wm8350->hwmon.classdev)) { in wm8350_hwmon_probe() 105 ret = PTR_ERR(wm8350->hwmon.classdev); in wm8350_hwmon_probe() 119 struct wm8350 *wm8350 = platform_get_drvdata(pdev); in wm8350_hwmon_remove() local 121 hwmon_device_unregister(wm8350->hwmon.classdev); in wm8350_hwmon_remove()
|
D | Makefile | 128 obj-$(CONFIG_SENSORS_WM8350) += wm8350-hwmon.o
|
D | Kconfig | 1339 will be called wm8350-hwmon.
|
/drivers/leds/ |
D | Makefile | 35 obj-$(CONFIG_LEDS_WM8350) += leds-wm8350.o
|