Lines Matching refs:outbuf
113 u8 outbuf[MCP4728_WRITE_EEPROM_LEN]; in mcp4728_store_eeprom() local
127 outbuf[0] = FIELD_PREP(MCP4728_CMD_MASK, MCP4728_SW_CMD); in mcp4728_store_eeprom()
133 outbuf[offset] = FIELD_PREP(MCP4728_VREF_MASK, ch->ref_mode); in mcp4728_store_eeprom()
138 outbuf[offset] |= FIELD_PREP(MCP4728_PDMODE_MASK, in mcp4728_store_eeprom()
142 outbuf[offset] |= FIELD_PREP(MCP4728_GAIN_MASK, ch->g_mode); in mcp4728_store_eeprom()
143 outbuf[offset] |= in mcp4728_store_eeprom()
145 outbuf[offset + 1] = in mcp4728_store_eeprom()
149 ret = i2c_master_send(data->client, outbuf, MCP4728_WRITE_EEPROM_LEN); in mcp4728_store_eeprom()
191 u8 outbuf[3]; in mcp4728_program_channel_cfg() local
194 outbuf[0] = FIELD_PREP(MCP4728_CMD_MASK, MCP4728_MW_CMD); in mcp4728_program_channel_cfg()
195 outbuf[0] |= FIELD_PREP(MCP4728_CHSEL_MASK, channel); in mcp4728_program_channel_cfg()
196 outbuf[0] |= FIELD_PREP(MCP4728_UDAC_MASK, 0); in mcp4728_program_channel_cfg()
198 outbuf[1] = FIELD_PREP(MCP4728_VREF_MASK, ch->ref_mode); in mcp4728_program_channel_cfg()
201 outbuf[1] |= FIELD_PREP(MCP4728_PDMODE_MASK, ch->pd_mode + 1); in mcp4728_program_channel_cfg()
203 outbuf[1] |= FIELD_PREP(MCP4728_GAIN_MASK, ch->g_mode); in mcp4728_program_channel_cfg()
204 outbuf[1] |= FIELD_PREP(MCP4728_DAC_H_MASK, ch->dac_value >> 8); in mcp4728_program_channel_cfg()
205 outbuf[2] = FIELD_PREP(MCP4728_DAC_L_MASK, ch->dac_value); in mcp4728_program_channel_cfg()
207 ret = i2c_master_send(data->client, outbuf, 3); in mcp4728_program_channel_cfg()