Lines Matching +full:scl +full:- +full:output +full:- +full:only

1 // SPDX-License-Identifier: GPL-2.0-only
3 * Copyright © 2006-2007 Intel Corporation
11 #include <linux/i2c-algo-bit.h>
26 struct drm_device *dev = chan->drm_dev; in get_clock()
29 val = REG_READ(chan->reg); in get_clock()
36 struct drm_device *dev = chan->drm_dev; in get_data()
39 val = REG_READ(chan->reg); in get_data()
46 struct drm_device *dev = chan->drm_dev; in set_clock()
51 REG_READ(chan->reg) & (GPIO_DATA_PULLUP_DISABLE | in set_clock()
59 REG_WRITE(chan->reg, reserved | clock_bits); in set_clock()
66 struct drm_device *dev = chan->drm_dev; in set_data()
71 REG_READ(chan->reg) & (GPIO_DATA_PULLUP_DISABLE | in set_data()
81 REG_WRITE(chan->reg, reserved | data_bits); in set_data()
86 * gma_i2c_create - instantiate an Intel i2c bus using the specified GPIO reg
92 * in output probing and control (e.g. DDC or SDVO control functions).
114 chan->drm_dev = dev; in gma_i2c_create()
115 chan->reg = reg; in gma_i2c_create()
116 snprintf(chan->base.name, I2C_NAME_SIZE, "intel drm %s", name); in gma_i2c_create()
117 chan->base.owner = THIS_MODULE; in gma_i2c_create()
118 chan->base.algo_data = &chan->algo; in gma_i2c_create()
119 chan->base.dev.parent = dev->dev; in gma_i2c_create()
120 chan->algo.setsda = set_data; in gma_i2c_create()
121 chan->algo.setscl = set_clock; in gma_i2c_create()
122 chan->algo.getsda = get_data; in gma_i2c_create()
123 chan->algo.getscl = get_clock; in gma_i2c_create()
124 chan->algo.udelay = 20; in gma_i2c_create()
125 chan->algo.timeout = usecs_to_jiffies(2200); in gma_i2c_create()
126 chan->algo.data = chan; in gma_i2c_create()
128 i2c_set_adapdata(&chan->base, chan); in gma_i2c_create()
130 if (i2c_bit_add_bus(&chan->base)) in gma_i2c_create()
133 /* JJJ: raise SCL and SDA? */ in gma_i2c_create()
146 * gma_i2c_destroy - unregister and free i2c bus resources
156 i2c_del_adapter(&chan->base); in gma_i2c_destroy()