Home
last modified time | relevance | path

Searched refs:ti_dac (Results 1 – 2 of 2) sorted by relevance

/drivers/iio/dac/
Dti-dac082s085.c66 static int ti_dac_cmd(struct ti_dac_chip *ti_dac, u8 cmd, u16 val) in ti_dac_cmd() argument
68 u8 shift = 12 - ti_dac->resolution; in ti_dac_cmd()
70 ti_dac->buf[0] = cmd | (val >> (8 - shift)); in ti_dac_cmd()
71 ti_dac->buf[1] = (val << shift) & 0xff; in ti_dac_cmd()
72 return spi_sync(ti_dac->mesg.spi, &ti_dac->mesg); in ti_dac_cmd()
82 struct ti_dac_chip *ti_dac = iio_priv(indio_dev); in ti_dac_get_powerdown_mode() local
84 return ti_dac->powerdown_mode; in ti_dac_get_powerdown_mode()
91 struct ti_dac_chip *ti_dac = iio_priv(indio_dev); in ti_dac_set_powerdown_mode() local
94 if (ti_dac->powerdown_mode == mode) in ti_dac_set_powerdown_mode()
97 mutex_lock(&ti_dac->lock); in ti_dac_set_powerdown_mode()
[all …]
Dti-dac7311.c58 static u8 ti_dac_get_power(struct ti_dac_chip *ti_dac, bool powerdown) in ti_dac_get_power() argument
61 return ti_dac->powerdown_mode + 1; in ti_dac_get_power()
66 static int ti_dac_cmd(struct ti_dac_chip *ti_dac, u8 power, u16 val) in ti_dac_cmd() argument
68 u8 shift = 14 - ti_dac->resolution; in ti_dac_cmd()
70 ti_dac->buf[0] = (val << shift) & 0xFF; in ti_dac_cmd()
71 ti_dac->buf[1] = (power << 6) | (val >> (8 - shift)); in ti_dac_cmd()
72 return spi_write(ti_dac->spi, ti_dac->buf, 2); in ti_dac_cmd()
84 struct ti_dac_chip *ti_dac = iio_priv(indio_dev); in ti_dac_get_powerdown_mode() local
86 return ti_dac->powerdown_mode; in ti_dac_get_powerdown_mode()
93 struct ti_dac_chip *ti_dac = iio_priv(indio_dev); in ti_dac_set_powerdown_mode() local
[all …]