Lines Matching refs:da9052
25 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()
136 return sprintf(buf, "%d\n", da9052_adc_read_temp(hwmon->da9052)); in da9052_tbat_show()
145 ret = da9052_adc_manual_read(hwmon->da9052, DA9052_ADC_VBAT); in da9052_vbat_show()
160 ret = da9052_adc_manual_read(hwmon->da9052, channel); in da9052_misc_channel_show()
186 return da9052_reg_write(hwmon->da9052, DA9052_TSI_CONT_B_REG, val); in da9052_request_tsi_read()
195 err = da9052_group_read(hwmon->da9052, DA9052_TSI_X_MSB_REG, in da9052_get_tsi_result()
247 mutex_lock(&hwmon->da9052->auxadc_lock); in da9052_tsi_show()
249 mutex_unlock(&hwmon->da9052->auxadc_lock); in da9052_tsi_show()
264 tjunc = da9052_reg_read(hwmon->da9052, DA9052_TJUNC_RES_REG); in da9052_tjunc_show()
268 toffset = da9052_reg_read(hwmon->da9052, DA9052_T_OFFSET_REG); in da9052_tjunc_show()
285 ret = da9052_adc_manual_read(hwmon->da9052, DA9052_ADC_VBBAT); in da9052_vbbat_show()
385 __ATTRIBUTE_GROUPS(da9052);
409 hwmon->da9052 = dev_get_drvdata(pdev->dev.parent); in da9052_hwmon_probe()
439 dev_err(hwmon->da9052->dev, "invalid TSIREF voltage: %d", in da9052_hwmon_probe()
446 da9052_reg_write(hwmon->da9052, DA9052_TSI_CONT_A_REG, 0x00); in da9052_hwmon_probe()
449 da9052_reg_update(hwmon->da9052, DA9052_ADC_CONT_REG, in da9052_hwmon_probe()
453 err = da9052_request_irq(hwmon->da9052, DA9052_IRQ_TSIREADY, in da9052_hwmon_probe()
474 da9052_free_irq(hwmon->da9052, DA9052_IRQ_TSIREADY, hwmon); in da9052_hwmon_probe()
487 da9052_free_irq(hwmon->da9052, DA9052_IRQ_TSIREADY, hwmon); in da9052_hwmon_remove()