Home
last modified time | relevance | path

Searched refs:da9052 (Results 1 – 22 of 22) sorted by relevance

/drivers/mfd/
Dda9052-irq.c176 static int da9052_map_irq(struct da9052 *da9052, int irq) in da9052_map_irq() argument
178 return regmap_irq_get_virq(da9052->irq_data, irq); in da9052_map_irq()
181 int da9052_enable_irq(struct da9052 *da9052, int irq) in da9052_enable_irq() argument
183 irq = da9052_map_irq(da9052, irq); in da9052_enable_irq()
193 int da9052_disable_irq(struct da9052 *da9052, int irq) in da9052_disable_irq() argument
195 irq = da9052_map_irq(da9052, irq); in da9052_disable_irq()
205 int da9052_disable_irq_nosync(struct da9052 *da9052, int irq) in da9052_disable_irq_nosync() argument
207 irq = da9052_map_irq(da9052, irq); in da9052_disable_irq_nosync()
217 int da9052_request_irq(struct da9052 *da9052, int irq, char *name, in da9052_request_irq() argument
220 irq = da9052_map_irq(da9052, irq); in da9052_request_irq()
[all …]
Dda9052-core.c374 int da9052_adc_manual_read(struct da9052 *da9052, unsigned char channel) in da9052_adc_manual_read() argument
384 mutex_lock(&da9052->auxadc_lock); in da9052_adc_manual_read()
386 reinit_completion(&da9052->done); in da9052_adc_manual_read()
391 ret = da9052_reg_write(da9052, DA9052_ADC_MAN_REG, mux_sel); in da9052_adc_manual_read()
396 if (!wait_for_completion_timeout(&da9052->done, in da9052_adc_manual_read()
398 dev_err(da9052->dev, in da9052_adc_manual_read()
404 ret = da9052_reg_read(da9052, DA9052_ADC_RES_H_REG); in da9052_adc_manual_read()
411 ret = da9052_reg_read(da9052, DA9052_ADC_RES_L_REG); in da9052_adc_manual_read()
421 mutex_unlock(&da9052->auxadc_lock); in da9052_adc_manual_read()
426 int da9052_adc_read_temp(struct da9052 *da9052) in da9052_adc_read_temp() argument
[all …]
Dda9052-i2c.c58 static int da9052_i2c_fix(struct da9052 *da9052, unsigned char reg) in da9052_i2c_fix() argument
62 switch (da9052->chip_id) { in da9052_i2c_fix()
69 return regmap_read(da9052->regmap, in da9052_i2c_fix()
89 static int da9052_i2c_disable_multiwrite(struct da9052 *da9052) in da9052_i2c_disable_multiwrite() argument
93 ret = regmap_read(da9052->regmap, DA9052_CONTROL_B_REG, &reg_val); in da9052_i2c_disable_multiwrite()
99 ret = regmap_write(da9052->regmap, DA9052_CONTROL_B_REG, in da9052_i2c_disable_multiwrite()
132 struct da9052 *da9052; in da9052_i2c_probe() local
135 da9052 = devm_kzalloc(&client->dev, sizeof(struct da9052), GFP_KERNEL); in da9052_i2c_probe()
136 if (!da9052) in da9052_i2c_probe()
139 da9052->dev = &client->dev; in da9052_i2c_probe()
[all …]
Dda9052-spi.c24 struct da9052 *da9052; in da9052_spi_probe() local
26 da9052 = devm_kzalloc(&spi->dev, sizeof(struct da9052), GFP_KERNEL); in da9052_spi_probe()
27 if (!da9052) in da9052_spi_probe()
34 da9052->dev = &spi->dev; in da9052_spi_probe()
35 da9052->chip_irq = spi->irq; in da9052_spi_probe()
37 spi_set_drvdata(spi, da9052); in da9052_spi_probe()
47 da9052->regmap = devm_regmap_init_spi(spi, &config); in da9052_spi_probe()
48 if (IS_ERR(da9052->regmap)) { in da9052_spi_probe()
49 ret = PTR_ERR(da9052->regmap); in da9052_spi_probe()
55 return da9052_device_init(da9052, id->driver_data); in da9052_spi_probe()
[all …]
DMakefile140 obj-$(CONFIG_PMIC_DA9052) += da9052-irq.o
141 obj-$(CONFIG_PMIC_DA9052) += da9052-core.o
142 obj-$(CONFIG_MFD_DA9052_SPI) += da9052-spi.o
143 obj-$(CONFIG_MFD_DA9052_I2C) += da9052-i2c.o
/drivers/input/touchscreen/
Dda9052_tsi.c21 struct da9052 *da9052; member
30 da9052_reg_update(tsi->da9052, DA9052_TSI_CONT_A_REG, 1 << 0, on); in da9052_ts_adc_toggle()
40 da9052_disable_irq_nosync(tsi->da9052, DA9052_IRQ_PENDOWN); in da9052_ts_pendwn_irq()
41 da9052_enable_irq(tsi->da9052, DA9052_IRQ_TSIREADY); in da9052_ts_pendwn_irq()
58 ret = da9052_reg_read(tsi->da9052, DA9052_TSI_X_MSB_REG); in da9052_ts_read()
64 ret = da9052_reg_read(tsi->da9052, DA9052_TSI_Y_MSB_REG); in da9052_ts_read()
70 ret = da9052_reg_read(tsi->da9052, DA9052_TSI_Z_MSB_REG); in da9052_ts_read()
76 ret = da9052_reg_read(tsi->da9052, DA9052_TSI_LSB_REG); in da9052_ts_read()
107 int ret = da9052_reg_read(tsi->da9052, DA9052_TSI_LSB_REG); in da9052_ts_pen_work()
126 ret = da9052_reg_update(tsi->da9052, in da9052_ts_pen_work()
[all …]
/drivers/watchdog/
Dda9052_wdt.c29 struct da9052 *da9052; member
53 struct da9052 *da9052 = driver_data->da9052; in da9052_wdt_set_timeout() local
60 ret = da9052_reg_update(da9052, DA9052_CONTROL_D_REG, in da9052_wdt_set_timeout()
63 dev_err(da9052->dev, "Failed to disable watchdog bit, %d\n", in da9052_wdt_set_timeout()
82 ret = da9052_reg_update(da9052, DA9052_CONTROL_D_REG, in da9052_wdt_set_timeout()
86 dev_err(da9052->dev, in da9052_wdt_set_timeout()
111 struct da9052 *da9052 = driver_data->da9052; in da9052_wdt_ping() local
124 ret = da9052_reg_update(da9052, DA9052_CONTROL_D_REG, in da9052_wdt_ping()
133 return da9052_reg_update(da9052, DA9052_CONTROL_D_REG, in da9052_wdt_ping()
154 struct da9052 *da9052 = dev_get_drvdata(dev->parent); in da9052_wdt_probe() local
[all …]
/drivers/leds/
Dleds-da9052.c29 struct da9052 *da9052; member
47 error = da9052_reg_write(led->da9052, led_reg[led->led_index], val); in da9052_set_led_brightness()
49 dev_err(led->da9052->dev, "Failed to set led brightness, %d\n", in da9052_set_led_brightness()
63 static int da9052_configure_leds(struct da9052 *da9052) in da9052_configure_leds() argument
69 error = da9052_reg_update(da9052, DA9052_GPIO_14_15_REG, in da9052_configure_leds()
74 dev_err(da9052->dev, "Failed to write GPIO 14-15 reg, %d\n", in da9052_configure_leds()
79 error = da9052_reg_update(da9052, DA9052_GPIO_14_15_REG, in da9052_configure_leds()
83 dev_err(da9052->dev, "Failed to write GPIO 14-15 reg, %d\n", in da9052_configure_leds()
92 struct da9052 *da9052; in da9052_led_probe() local
98 da9052 = dev_get_drvdata(pdev->dev.parent); in da9052_led_probe()
[all …]
DMakefile30 obj-$(CONFIG_LEDS_DA9052) += leds-da9052.o
/drivers/gpio/
Dgpio-da9052.c45 struct da9052 *da9052; member
60 ret = da9052_reg_read(gpio->da9052, in da9052_gpio_get()
75 ret = da9052_reg_read(gpio->da9052, in da9052_gpio_get()
78 ret = da9052_reg_read(gpio->da9052, in da9052_gpio_get()
99 ret = da9052_reg_update(gpio->da9052, (offset >> 1) + in da9052_gpio_set()
104 dev_err(gpio->da9052->dev, in da9052_gpio_set()
108 ret = da9052_reg_update(gpio->da9052, (offset >> 1) + in da9052_gpio_set()
113 dev_err(gpio->da9052->dev, in da9052_gpio_set()
130 ret = da9052_reg_update(gpio->da9052, (offset >> 1) + in da9052_gpio_direction_input()
136 ret = da9052_reg_update(gpio->da9052, (offset >> 1) + in da9052_gpio_direction_input()
[all …]
DMakefile51 obj-$(CONFIG_GPIO_DA9052) += gpio-da9052.o
/drivers/hwmon/
Dda9052-hwmon.c25 struct da9052 *da9052; member
72 static inline int da9052_enable_vddout_channel(struct da9052 *da9052) in da9052_enable_vddout_channel() argument
74 return da9052_reg_update(da9052, DA9052_ADC_CONT_REG, in da9052_enable_vddout_channel()
79 static inline int da9052_disable_vddout_channel(struct da9052 *da9052) in da9052_disable_vddout_channel() argument
81 return da9052_reg_update(da9052, DA9052_ADC_CONT_REG, in da9052_disable_vddout_channel()
93 ret = da9052_enable_vddout_channel(hwmon->da9052); in da9052_vddout_show()
97 vdd = da9052_reg_read(hwmon->da9052, DA9052_VDD_RES_REG); in da9052_vddout_show()
103 ret = da9052_disable_vddout_channel(hwmon->da9052); in da9052_vddout_show()
111 da9052_disable_vddout_channel(hwmon->da9052); in da9052_vddout_show()
123 ret = da9052_reg_read(hwmon->da9052, DA9052_ICHG_AV_REG); in da9052_ich_show()
[all …]
DMakefile60 obj-$(CONFIG_SENSORS_DA9052_ADC)+= da9052-hwmon.o
DKconfig506 will be called da9052-hwmon.
/drivers/input/misc/
Dda9052_onkey.c19 struct da9052 *da9052; member
28 ret = da9052_reg_read(onkey->da9052, DA9052_STATUS_A_REG); in da9052_onkey_query()
30 dev_err(onkey->da9052->dev, in da9052_onkey_query()
73 struct da9052 *da9052 = dev_get_drvdata(pdev->dev.parent); in da9052_onkey_probe() local
78 if (!da9052) { in da9052_onkey_probe()
92 onkey->da9052 = da9052; in da9052_onkey_probe()
102 error = da9052_request_irq(onkey->da9052, DA9052_IRQ_NONKEY, "ONKEY", in da9052_onkey_probe()
105 dev_err(onkey->da9052->dev, in da9052_onkey_probe()
121 da9052_free_irq(onkey->da9052, DA9052_IRQ_NONKEY, onkey); in da9052_onkey_probe()
134 da9052_free_irq(onkey->da9052, DA9052_IRQ_NONKEY, onkey); in da9052_onkey_remove()
/drivers/rtc/
Drtc-da9052.c20 dev_err(rtc->da9052->dev, "%s: " fmt, __func__, ##__VA_ARGS__)
26 struct da9052 *da9052; member
33 ret = da9052_reg_update(rtc->da9052, DA9052_ALARM_Y_REG, in da9052_rtc_enable_alarm()
39 ret = da9052_reg_update(rtc->da9052, DA9052_ALARM_Y_REG, in da9052_rtc_enable_alarm()
63 ret = da9052_group_read(rtc->da9052, DA9052_ALARM_MI_REG, 5, &v[0][0]); in da9052_read_alarm()
70 ret = da9052_group_read(rtc->da9052, in da9052_read_alarm()
101 struct da9052 *da9052 = rtc->da9052; in da9052_set_alarm() local
117 ret = da9052_reg_update(da9052, DA9052_ALARM_MI_REG, in da9052_set_alarm()
128 ret = da9052_group_write(da9052, DA9052_ALARM_H_REG, 3, v); in da9052_set_alarm()
132 ret = da9052_reg_update(da9052, DA9052_ALARM_Y_REG, in da9052_set_alarm()
[all …]
DMakefile45 obj-$(CONFIG_RTC_DRV_DA9052) += rtc-da9052.o
/drivers/regulator/
Dda9052-regulator.c69 struct da9052 *da9052; member
89 ret = da9052_reg_read(regulator->da9052, DA9052_BUCKA_REG + offset/2); in da9052_dcdc_get_current_limit()
102 if (regulator->da9052->chip_id == DA9052) in da9052_dcdc_get_current_limit()
119 if (regulator->da9052->chip_id == DA9052) in da9052_dcdc_set_current_limit()
139 return da9052_reg_update(regulator->da9052, in da9052_dcdc_set_current_limit()
144 return da9052_reg_update(regulator->da9052, in da9052_dcdc_set_current_limit()
158 if ((id == DA9052_ID_BUCK4) && (regulator->da9052->chip_id == DA9052) in da9052_list_voltage()
189 if ((id == DA9052_ID_BUCK4) && (regulator->da9052->chip_id == DA9052) in da9052_map_voltage()
213 ret = da9052_reg_update(regulator->da9052, rdev->desc->vsel_reg, in da9052_regulator_set_voltage_sel()
227 ret = da9052_reg_update(regulator->da9052, DA9052_SUPPLY_REG, in da9052_regulator_set_voltage_sel()
[all …]
DMakefile38 obj-$(CONFIG_REGULATOR_DA9052) += da9052-regulator.o
/drivers/power/supply/
Dda9052-battery.c167 struct da9052 *da9052; member
193 ret = da9052_reg_read(bat->da9052, DA9052_ICHG_END_REG); in da9052_read_chgend_current()
209 ret = da9052_reg_read(bat->da9052, DA9052_ICHG_AV_REG); in da9052_read_chg_current()
233 ret = da9052_group_read(bat->da9052, DA9052_STATUS_A_REG, 2, v); in da9052_bat_check_status()
289 volt = da9052_adc_manual_read(bat->da9052, DA9052_ADC_MAN_MUXSEL_VBAT); in da9052_bat_read_volt()
302 bat_temp = da9052_adc_read_temp(bat->da9052); in da9052_bat_check_presence()
370 adc_temp = da9052_adc_read_temp(bat->da9052); in da9052_bat_read_capacity()
441 virq = regmap_irq_get_virq(bat->da9052->irq_data, irq); in da9052_bat_irq()
470 ret = da9052_reg_read(bat->da9052, DA9052_CHGBUCK_REG); in da9052_USB_current_notifier()
474 if (bat->da9052->chip_id == DA9052) in da9052_USB_current_notifier()
[all …]
DMakefile49 obj-$(CONFIG_BATTERY_DA9052) += da9052-battery.o
/drivers/video/backlight/
Dda9052_bl.c39 struct da9052 *da9052; member
58 ret = da9052_reg_write(wleds->da9052, DA9052_BOOST_REG, boost_en); in da9052_adjust_wled_brightness()
62 ret = da9052_reg_write(wleds->da9052, DA9052_LED_CONT_REG, i_sink); in da9052_adjust_wled_brightness()
66 ret = da9052_reg_write(wleds->da9052, wled_bank[wleds->led_reg], 0x0); in da9052_adjust_wled_brightness()
73 ret = da9052_reg_write(wleds->da9052, wled_bank[wleds->led_reg], in da9052_adjust_wled_brightness()
115 wleds->da9052 = dev_get_drvdata(pdev->dev.parent); in da9052_backlight_probe()
124 wleds->da9052->dev, wleds, in da9052_backlight_probe()