/* Performs the triplet function, which reads two bits and writes a bit. The bit written is determined by the two reads: 00 => dbit, 01 => 0, 10 => 1 */
static u8 ds2482_w1_triplet(void *data, u8 dbit)
/* Performs the triplet function, which reads two bits and writes a bit. The bit written is determined by the two reads: 00 => dbit, 01 => 0, 10 => 1 */
static u8 ds2482_w1_triplet(void *data, u8 dbit)
{
	struct ds2482_w1_chan *pchan = data;
	struct ds2482_data    *pdev = pchan->pdev;
	int status = (3 << 5);
	mutex_lock(&pdev->access_lock);
	ds2482_wait_1wire_idle(pdev);
	if (pdev->w1_count > 1)
		ds2482_set_channel(pdev, pchan->channel);
	if (!ds2482_send_cmd_data(pdev, DS2482_CMD_1WIRE_TRIPLET,
				  dbit ? 0xFF : 0))
		status = ds2482_wait_1wire_idle(pdev);
	mutex_unlock(&pdev->access_lock);
	return (status >> 5);
}