[Intel-gfx] [PATCH 2/7] drm/nouveau: do a better job at hiding the NIH i2c bit-banging algo
Daniel Vetter
daniel at ffwll.ch
Mon Feb 27 18:25:48 CET 2012
Hi Ben,
Can you ack this patch for merging through drm-intel-next? Imo that's the
easiest way to get it in (assuming you don't have any objections).
Thanks, Daniel
On Tue, Feb 14, 2012 at 10:37:20PM +0100, Daniel Vetter wrote:
> I'd like to export the corresponding functions from the i2c core
> so that I can use them in fallback bit-banging in i915.ko
>
> Cc: nouveau at lists.freedesktop.org
> Signed-off-by: Daniel Vetter <daniel.vetter at ffwll.ch>
> ---
> drivers/gpu/drm/nouveau/nouveau_i2c.c | 8 ++++----
> 1 files changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/gpu/drm/nouveau/nouveau_i2c.c b/drivers/gpu/drm/nouveau/nouveau_i2c.c
> index 820ae7f..7a7e751 100644
> --- a/drivers/gpu/drm/nouveau/nouveau_i2c.c
> +++ b/drivers/gpu/drm/nouveau/nouveau_i2c.c
> @@ -242,7 +242,7 @@ i2c_addr(struct nouveau_i2c_chan *port, struct i2c_msg *msg)
> }
>
> static int
> -i2c_bit_xfer(struct i2c_adapter *adap, struct i2c_msg *msgs, int num)
> +nouveau_i2c_bit_xfer(struct i2c_adapter *adap, struct i2c_msg *msgs, int num)
> {
> struct nouveau_i2c_chan *port = (struct nouveau_i2c_chan *)adap;
> struct i2c_msg *msg = msgs;
> @@ -272,14 +272,14 @@ i2c_bit_xfer(struct i2c_adapter *adap, struct i2c_msg *msgs, int num)
> }
>
> static u32
> -i2c_bit_func(struct i2c_adapter *adap)
> +nouveau_i2c_bit_func(struct i2c_adapter *adap)
> {
> return I2C_FUNC_I2C | I2C_FUNC_SMBUS_EMUL;
> }
>
> const struct i2c_algorithm i2c_bit_algo = {
> - .master_xfer = i2c_bit_xfer,
> - .functionality = i2c_bit_func
> + .master_xfer = nouveau_i2c_bit_xfer,
> + .functionality = nouveau_i2c_bit_func
> };
>
> static const uint32_t nv50_i2c_port[] = {
> --
> 1.7.7.5
>
--
Daniel Vetter
Mail: daniel at ffwll.ch
Mobile: +41 (0)79 365 57 48
More information about the Intel-gfx
mailing list